busybox .config in gentoo

busybox can be configured, just like the kernel :) and we can do so in gentoo, with USE=savedconfig.

$ emerge -pv busybox

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
[ebuild   R    ] sys-apps/busybox-1.25.1::gentoo  USE="static -debug -ipv6 -livecd -make-symlinks -math -mdev -pam -savedconfig (-selinux) -sep-usr -syslog -systemd" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

gentoo savedconfig is the name of the package, and located here:
$ ls -lh /etc/portage/savedconfig/*/busybox*
-rw-r--r-- 1 root root 26K 2016-12-21 10:43 /etc/portage/savedconfig/sys-apps/busybox-1.25.1

we can edit this file manually. but it is much easier/safer to manually configure it the busybox way.

$ ebuild /usr/portage/sys-apps/busybox/busybox-1.25.1.ebuild fetch clean unpack
$ cd /var/tmp/portage/sys-apps/busybox-1.25.1/work/busybox-1.25.1
$ cp -vi /etc/portage/savedconfig/sys-apps/busybox-1.25.1 .config
$ make menuconfig
$ sudo cp -vi .config /etc/portage/savedconfig/sys-apps/busybox-1.25.1

emerge busybox with savedconfig useflag.

$ sudo rm -rf /var/tmp/portage/sys-apps/busybox-1.25.1
$ USE="savedconfig" sudo emerge busybox

reboot gentoo to test it fully. if everything works, add savedconfig flag to sys-apps/busybox in /etc/portage/package.use.

to revert back, emerge busybox without savedconfig useflag.

No comments:

Post a Comment

most viewed