[yocto] Removing busybox completely from the generated image

Paul Eggleton paul.eggleton at linux.intel.com
Tue Feb 20 19:01:26 PST 2018


On Tuesday, 20 February 2018 9:26:49 PM NZDT Iván Castell wrote:
> 2018-02-20 7:45 GMT+01:00 Martin Hundebøll <mnhu at prevas.dk>:
> >> Thank you for the information, I will take into account that tool for
> >> future embedded projects. However, the focus of this issue was to remove
> >> completely busybox from the image, not replacing it by another
> >> application box.
> >>
> >> I have created a bbappend with a fragment of the busybox configuration
> >> disabling syslog and udhcpc applets. It works. However the busybox binary
> >> and a lot of applets are still there (adduser, unzip, fbset, traceroute,
> >> and more).
> >>
> >> Disabling all different applets and installing native tools instead could
> >> be the right way to procede. Not a nice solution, but at least it should
> >> work...
> >>
> >
> > Here's what we have in our distro config to disable busybox:
> >
> > > # Disable busybox
> > > VIRTUAL-RUNTIME_base-utils = ""
> > > ALTERNATIVE_PRIORITY_pn-busybox = "1"
> >
> > The priority setting make bitbake pull in alternatives from util-linux /
> > coreutils when appropriate.
> 
> Yes!! That was the trick. It works like a charm!! Thank you so much Mr.
> Martin!! :-)

I will note that the priority currently set in busybox.inc is 50, which is 
lower than coreutils 100 (or 90 for hostname), so that part shouldn't be 
needed for coreutils. There are one or two other recipes that set a priority 
lower than 50 for reasons that are not immediately clear to me. 

Additionally, ALTERNATIVE_PRIORITY won't do anything to control what goes into 
the image - it only controls which binary is selected at runtime when more 
than one providing the same binary is installed. Thus I can only assume that 
it was the VIRTUAL-RUNTIME_base-utils = "" that finally removed the packages 
you wished removed.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre





More information about the yocto mailing list