Re: [yocto] Removing busybox completely from the generated image

2018-02-21 Thread Iván Castell
2018-02-21 4:01 GMT+01:00 Paul Eggleton :

> 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 :
> > >> 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
>


I have tested your suggestion, disabling the ALTERNATIVE_PRIORITY
declaration:

VIRTUAL-RUNTIME_base-utils = ""
# ALTERNATIVE_PRIORITY =

And effectively the generated image contains any reference to busybox
toolbox at all. Thank you very much for the clarification, Mr Paul!! :-)

I want to add that, if your custom image installs packagegroup-core-boot,
then you also need to set VIRTUAL-RUNTIME_login_manager variable with a
valid value different from "busybox". My custom image includes that
packagegroup, so to achieve my goal, I define in my distro.conf this
variable:

VIRTUAL-RUNTIME_login_manager = "shadow"

Hope this helps to somebody else.

Thank you for all your support! :-)
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-20 Thread Paul Eggleton
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 :
> >> 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


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-20 Thread Iván Castell
2018-02-20 7:45 GMT+01:00 Martin Hundebøll :

> Hi Ivan,
>
>>
>> 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.
>
> // Martin
>


Yes!! That was the trick. It works like a charm!! Thank you so much Mr.
Martin!! :-)
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-20 Thread Martin Hundebøll

Hi Ivan,

On 2018-02-19 17:13, Iván Castell wrote:



2018-02-19 16:18 GMT+01:00 Maxin B. John >:


Hi,

On Mon, Feb 19, 2018 at 02:17:38AM -0800, Khem Raj wrote:
> On Mon, Feb 19, 2018 at 12:35 AM, Iván Castell
> > wrote:
> > I have tried breaking apart packagegroup-core-boot, making a copy in my
> > custom layer, removing the line referencing busybox:
> >
> >     ## VIRTUAL-RUNTIME_login_manager ?= "busybox"

Have you considered "toybox" ? It probably wouldn't work right-away.
Still,
toybox was designed to provide a replacement for busybox. It is
available
in "meta-oe"


http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/toybox/toybox_0.7.5.bb





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.


// Martin
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-19 Thread Paul Eggleton
On Monday, 19 February 2018 11:21:20 PM NZDT Alexander Kanavin wrote:
> On 02/19/2018 10:35 AM, Iván Castell wrote:
> > I have tried breaking apart packagegroup-core-boot, making a copy in my 
> > custom layer, removing the line referencing busybox:
> > 
> >  ## VIRTUAL-RUNTIME_login_manager ?= "busybox"
> > 
> > But now bitbake complains with an error message:
> > 
> >  ERROR: Nothing RPROVIDES '${VIRTUAL-RUNTIME_login_manager}'
> 
> You need to remove the reference to VIRTUAL-RUNTIME_login_manager from 
> the list of packages to be installed, not the definition that points to 
> busybox. If the resulting image breaks, you get to keep the pieces. I'm 
> not sure what function busyybox performs here, but oe-core does not have 
> an alternative now - you are welcome to provide one.

I think the more full-featured alternative would be the "login" implementation 
provided by shadow, so you would set:

VIRTUAL-RUNTIME_login_manager = "shadow"

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-19 Thread Iván Castell
2018-02-19 16:18 GMT+01:00 Maxin B. John :

> Hi,
>
> On Mon, Feb 19, 2018 at 02:17:38AM -0800, Khem Raj wrote:
> > On Mon, Feb 19, 2018 at 12:35 AM, Iván Castell
> >  wrote:
> > > I have tried breaking apart packagegroup-core-boot, making a copy in my
> > > custom layer, removing the line referencing busybox:
> > >
> > > ## VIRTUAL-RUNTIME_login_manager ?= "busybox"
>
> Have you considered "toybox" ? It probably wouldn't work right-away. Still,
> toybox was designed to provide a replacement for busybox. It is available
> in "meta-oe"
>
> http://cgit.openembedded.org/meta-openembedded/tree/meta-
> oe/recipes-core/toybox/toybox_0.7.5.bb
>
>

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...
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-19 Thread Maxin B. John
Hi,

On Mon, Feb 19, 2018 at 02:17:38AM -0800, Khem Raj wrote:
> On Mon, Feb 19, 2018 at 12:35 AM, Iván Castell
>  wrote:
> > I have tried breaking apart packagegroup-core-boot, making a copy in my
> > custom layer, removing the line referencing busybox:
> >
> > ## VIRTUAL-RUNTIME_login_manager ?= "busybox"

Have you considered "toybox" ? It probably wouldn't work right-away. Still,
toybox was designed to provide a replacement for busybox. It is available
in "meta-oe"

http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/toybox/toybox_0.7.5.bb

> > But now bitbake complains with an error message:
> >


Hope this helps,
Maxin
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-19 Thread Alexander Kanavin

On 02/19/2018 10:35 AM, Iván Castell wrote:
I have tried breaking apart packagegroup-core-boot, making a copy in my 
custom layer, removing the line referencing busybox:


     ## VIRTUAL-RUNTIME_login_manager ?= "busybox"

But now bitbake complains with an error message:

     ERROR: Nothing RPROVIDES '${VIRTUAL-RUNTIME_login_manager}'


You need to remove the reference to VIRTUAL-RUNTIME_login_manager from 
the list of packages to be installed, not the definition that points to 
busybox. If the resulting image breaks, you get to keep the pieces. I'm 
not sure what function busyybox performs here, but oe-core does not have 
an alternative now - you are welcome to provide one.


Alex
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-19 Thread Khem Raj
On Mon, Feb 19, 2018 at 12:35 AM, Iván Castell
 wrote:
> I have tried breaking apart packagegroup-core-boot, making a copy in my
> custom layer, removing the line referencing busybox:
>
> ## VIRTUAL-RUNTIME_login_manager ?= "busybox"
>
> But now bitbake complains with an error message:
>
> ERROR: Nothing RPROVIDES '${VIRTUAL-RUNTIME_login_manager}'
>
> It seems "VIRTUAL-RUNTIME_login_manager" needs to be defined with a valid
> option. I have tested with the option "tinylogin" but that options seems not
> implemented in "rocko" branch, because I'm getting this error:
>
> ERROR: Nothing RPROVIDES 'tinylogin'
>
> Is there some valid alternative available? Where are these alternatives
> defined?
>

tinylogin has been removed few releases ago. So it wont work out of box.

> In general, is it posible to build yocto images without using busybox at
> all?
>



>
> 2018-02-16 16:56 GMT+01:00 Iván Castell :
>>
>> Hello forum!
>>
>> I'm trying to build a yocto image without busybox and without any busybox
>> applet deployed.
>>
>> I have tried that configuring my distro.conf file in this way:
>>
>> DISTRO_FEATURES_remove = " busybox"
>> VIRTUAL-RUNTIME_base-utils = ""
>> PREFERRED_PROVIDER_virtual/base-utils = ""
>>
>> Nonetheless, busybox binary and two related applets (syslog and udhcpc)
>> are installed in the generated image:
>>
>> $ rpm -qa | grep busybox
>> busybox-syslog-1.24.1-r0.corei7_64
>> busybox-1.24.1-r0.corei7_64
>> busybox-udhcpc-1.24.1-r0.corei7_64
>>
>> I have tried disabling syslog applet appending to my distro.conf file:
>>
>> VIRTUAL-RUNTIME_syslog ?= ""
>>
>> But syslogd applet is still installed:
>>
>> # ls -l /sbin/syslogd
>> lrwxrwxrwx 1 root root 19 Feb 15 14:03 /sbin/syslogd ->
>> /bin/busybox.nosuid
>>
>> Is there some way to remove busybox completely from the generated image?
>>
>> Thank you in advance! :-)
>
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Removing busybox completely from the generated image

2018-02-19 Thread Iván Castell
I have tried breaking apart packagegroup-core-boot, making a copy in my
custom layer, removing the line referencing busybox:

## VIRTUAL-RUNTIME_login_manager ?= "busybox"

But now bitbake complains with an error message:

ERROR: Nothing RPROVIDES '${VIRTUAL-RUNTIME_login_manager}'

It seems "VIRTUAL-RUNTIME_login_manager" needs to be defined with a valid
option. I have tested with the option "tinylogin" but that options seems
not implemented in "rocko" branch, because I'm getting this error:

ERROR: Nothing RPROVIDES 'tinylogin'

Is there some valid alternative available? Where are these alternatives
defined?

In general, is it posible to build yocto images without using busybox at
all?


2018-02-16 16:56 GMT+01:00 Iván Castell :

> Hello forum!
>
> I'm trying to build a yocto image without busybox and without any busybox
> applet deployed.
>
> I have tried that configuring my distro.conf file in this way:
>
> DISTRO_FEATURES_remove = " busybox"
> VIRTUAL-RUNTIME_base-utils = ""
> PREFERRED_PROVIDER_virtual/base-utils = ""
>
> Nonetheless, busybox binary and two related applets (syslog and udhcpc)
> are installed in the generated image:
>
> $ rpm -qa | grep busybox
> busybox-syslog-1.24.1-r0.corei7_64
> busybox-1.24.1-r0.corei7_64
> busybox-udhcpc-1.24.1-r0.corei7_64
>
> I have tried disabling syslog applet appending to my distro.conf file:
>
> VIRTUAL-RUNTIME_syslog ?= ""
>
> But syslogd applet is still installed:
>
> # ls -l /sbin/syslogd
> lrwxrwxrwx 1 root root 19 Feb 15 14:03 /sbin/syslogd ->
> /bin/busybox.nosuid
>
> Is there some way to remove busybox completely from the generated image?
>
> Thank you in advance! :-)
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto