[yocto] Removing busybox

Tom Rini trini at konsulko.com
Wed Feb 27 09:06:14 PST 2019


On Wed, Feb 27, 2019 at 01:16:56PM +0100, Jean-Christian de Rivaz wrote:

> Hi all,
> 
> After reading the thread "Removing busybox completely from the generated
> image" I tested to reproduce the method but this doesn't work as expected.
> 
> git clone git://git.yoctoproject.org/poky -b thud
> cd poky
> echo 'require conf/distro/poky.conf' > meta-poky/conf/distro/poky-ng.conf
> echo 'DISTRO = "poky-ng"' >> meta-poky/conf/distro/poky-ng.conf
> echo 'VIRTUAL-RUNTIME_base-utils = ""' >> meta-poky/conf/distro/poky-ng.conf
> sed -i 's/^DISTRO.*/DISTRO = "poky-ng"/' conf/local.conf
> bitbake core-image-minimal
> runqemu core-image-minimal kvm
> 
> After login as root there still a lot of links to busybox inside /sbin/
> /bin/ /usr/sbin/ and /usr/bin/ .
> 
> Can someone provides a working method ?

You're missing a few more things, yes.  What I have is:
# Switch to systemd
DISTRO_FEATURES += "systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
VIRTUAL-RUNTIME_initscripts = ""
VIRTUAL-RUNTIME_syslog = ""
VIRTUAL-RUNTIME_login_manager = "shadow-base"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"

# Replace busybox
PREFERRED_PROVIDER_virtual/base-utils = "coreutils"
VIRTUAL-RUNTIME_base-utils = "coreutils"
VIRTUAL-RUNTIME_base-utils-hwclock = "util-linux-hwclock"
VIRTUAL-RUNTIME_base-utils-syslog = ""

If you aren't using systemd you'll need to move the login_manager
example over as well, otherwise busybox gets pulled for that.

I'm using the above on thud, today.  And that's not a 1:1 replacement as
my image pulls in a number of other packages for various things I
want/need.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20190227/d252f5d8/attachment.pgp>


More information about the yocto mailing list