All of lore.kernel.org
 help / color / mirror / Atom feed
* toybox in OpenEmbedded
@ 2014-08-18 13:44 Paul Barker
  2014-08-18 14:29   ` Christopher Larson
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Barker @ 2014-08-18 13:44 UTC (permalink / raw)
  To: OE Devel, Yocto discussion list

[-- Attachment #1: Type: text/plain, Size: 1496 bytes --]

Hi all,

I've been wanting to try out toybox within OpenEmbedded for quite a while and
have finally found time to put a recipe together. Toybox is a BSD-licensed
alternative to Busybox which may be of interest to a few people. It's still a
work in progress but it already covers a large number of the basic commands a
system needs. It should tie in well with the recent work Khem has done to enable
the use of musl in OpenEmbedded as toybox and musl are often used together (e.g.
Aboriginal Linux distro).

My patches are currently against openembedded-core for convenience but this
probably belongs in meta-oe for now. I've done some basic testing on qemuarm but
nothing significant. toybox builds and installs correctly though and I've set
ALTERNATIVE_PRIORITY = 60 so that it takes precedence over busybox tools.

Removing toybox after it has been installed currently bricks the system though
as the postrm script runs after '/bin/toybox' has been removed (so things like
'/bin/ln' become broken links and the update-alternatives script can't run).

I can send patches but as I say, this is a work in progress and you shouldn't
install toybox using this recipe on a production system yet. Would anyone else
be interested in testing this out? And should I send these patches against
openembedded-core or meta-oe or should I create a separate layer for this until
it stabilises?

Thanks,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk

[-- Attachment #2: Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yocto] toybox in OpenEmbedded
  2014-08-18 13:44 toybox in OpenEmbedded Paul Barker
@ 2014-08-18 14:29   ` Christopher Larson
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Larson @ 2014-08-18 14:29 UTC (permalink / raw)
  To: Paul Barker; +Cc: Yocto discussion list, OE Devel

On Mon, Aug 18, 2014 at 6:44 AM, Paul Barker <paul@paulbarker.me.uk> wrote:

> I've been wanting to try out toybox within OpenEmbedded for quite a while
> and
> have finally found time to put a recipe together. Toybox is a BSD-licensed
> alternative to Busybox which may be of interest to a few people. It's
> still a
> work in progress but it already covers a large number of the basic
> commands a
> system needs. It should tie in well with the recent work Khem has done to
> enable
> the use of musl in OpenEmbedded as toybox and musl are often used together
> (e.g.
> Aboriginal Linux distro).
>
> My patches are currently against openembedded-core for convenience but this
> probably belongs in meta-oe for now. I've done some basic testing on
> qemuarm but
> nothing significant. toybox builds and installs correctly though and I've
> set
> ALTERNATIVE_PRIORITY = 60 so that it takes precedence over busybox tools.
>
> Removing toybox after it has been installed currently bricks the system
> though
> as the postrm script runs after '/bin/toybox' has been removed (so things
> like
> '/bin/ln' become broken links and the update-alternatives script can't
> run).
>

One option for that might be to try the C implementation of alternatives
that's provided in chkconfig, rather than cworth's shell version. I haven't
tested it in that context, but I doubt it runs so many external tools.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: toybox in OpenEmbedded
@ 2014-08-18 14:29   ` Christopher Larson
  0 siblings, 0 replies; 5+ messages in thread
From: Christopher Larson @ 2014-08-18 14:29 UTC (permalink / raw)
  To: Paul Barker; +Cc: Yocto discussion list, OE Devel

[-- Attachment #1: Type: text/plain, Size: 1587 bytes --]

On Mon, Aug 18, 2014 at 6:44 AM, Paul Barker <paul@paulbarker.me.uk> wrote:

> I've been wanting to try out toybox within OpenEmbedded for quite a while
> and
> have finally found time to put a recipe together. Toybox is a BSD-licensed
> alternative to Busybox which may be of interest to a few people. It's
> still a
> work in progress but it already covers a large number of the basic
> commands a
> system needs. It should tie in well with the recent work Khem has done to
> enable
> the use of musl in OpenEmbedded as toybox and musl are often used together
> (e.g.
> Aboriginal Linux distro).
>
> My patches are currently against openembedded-core for convenience but this
> probably belongs in meta-oe for now. I've done some basic testing on
> qemuarm but
> nothing significant. toybox builds and installs correctly though and I've
> set
> ALTERNATIVE_PRIORITY = 60 so that it takes precedence over busybox tools.
>
> Removing toybox after it has been installed currently bricks the system
> though
> as the postrm script runs after '/bin/toybox' has been removed (so things
> like
> '/bin/ln' become broken links and the update-alternatives script can't
> run).
>

One option for that might be to try the C implementation of alternatives
that's provided in chkconfig, rather than cworth's shell version. I haven't
tested it in that context, but I doubt it runs so many external tools.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 2034 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [yocto] toybox in OpenEmbedded
  2014-08-18 14:29   ` Christopher Larson
@ 2014-08-18 14:43     ` Paul Barker
  -1 siblings, 0 replies; 5+ messages in thread
From: Paul Barker @ 2014-08-18 14:43 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Yocto discussion list, OE Devel

[-- Attachment #1: Type: text/plain, Size: 2398 bytes --]

On Mon, Aug 18, 2014 at 07:29:33AM -0700, Christopher Larson wrote:
> On Mon, Aug 18, 2014 at 6:44 AM, Paul Barker <paul@paulbarker.me.uk> wrote:
> 
> > I've been wanting to try out toybox within OpenEmbedded for quite a while
> > and
> > have finally found time to put a recipe together. Toybox is a BSD-licensed
> > alternative to Busybox which may be of interest to a few people. It's
> > still a
> > work in progress but it already covers a large number of the basic
> > commands a
> > system needs. It should tie in well with the recent work Khem has done to
> > enable
> > the use of musl in OpenEmbedded as toybox and musl are often used together
> > (e.g.
> > Aboriginal Linux distro).
> >
> > My patches are currently against openembedded-core for convenience but this
> > probably belongs in meta-oe for now. I've done some basic testing on
> > qemuarm but
> > nothing significant. toybox builds and installs correctly though and I've
> > set
> > ALTERNATIVE_PRIORITY = 60 so that it takes precedence over busybox tools.
> >
> > Removing toybox after it has been installed currently bricks the system
> > though
> > as the postrm script runs after '/bin/toybox' has been removed (so things
> > like
> > '/bin/ln' become broken links and the update-alternatives script can't
> > run).
> >
> 
> One option for that might be to try the C implementation of alternatives
> that's provided in chkconfig, rather than cworth's shell version. I haven't
> tested it in that context, but I doubt it runs so many external tools.

I did try that at one point in the last year or so but couldn't get it to work.
I think it was something to do with it lacking offline root support. The only
implementation I've been able to get working is the shell script one which is
now in opkg-utils.

I'm actually looking at making a new update-alternatives implementation in C as
I wanted to explore a few alternative ways of doing things. I was going to post
about that once I have some basic working code.

I think the solution for the removal problem is to call update-alternatives in a
pre-rm script rather than a post-rm script. There's already an entry in the opkg
issue tracker for adding support for pre-rm scripts, that's another thing I'm
planning on fixing soon.

Thanks,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk

[-- Attachment #2: Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: toybox in OpenEmbedded
@ 2014-08-18 14:43     ` Paul Barker
  0 siblings, 0 replies; 5+ messages in thread
From: Paul Barker @ 2014-08-18 14:43 UTC (permalink / raw)
  To: Christopher Larson; +Cc: Yocto discussion list, OE Devel

[-- Attachment #1: Type: text/plain, Size: 2398 bytes --]

On Mon, Aug 18, 2014 at 07:29:33AM -0700, Christopher Larson wrote:
> On Mon, Aug 18, 2014 at 6:44 AM, Paul Barker <paul@paulbarker.me.uk> wrote:
> 
> > I've been wanting to try out toybox within OpenEmbedded for quite a while
> > and
> > have finally found time to put a recipe together. Toybox is a BSD-licensed
> > alternative to Busybox which may be of interest to a few people. It's
> > still a
> > work in progress but it already covers a large number of the basic
> > commands a
> > system needs. It should tie in well with the recent work Khem has done to
> > enable
> > the use of musl in OpenEmbedded as toybox and musl are often used together
> > (e.g.
> > Aboriginal Linux distro).
> >
> > My patches are currently against openembedded-core for convenience but this
> > probably belongs in meta-oe for now. I've done some basic testing on
> > qemuarm but
> > nothing significant. toybox builds and installs correctly though and I've
> > set
> > ALTERNATIVE_PRIORITY = 60 so that it takes precedence over busybox tools.
> >
> > Removing toybox after it has been installed currently bricks the system
> > though
> > as the postrm script runs after '/bin/toybox' has been removed (so things
> > like
> > '/bin/ln' become broken links and the update-alternatives script can't
> > run).
> >
> 
> One option for that might be to try the C implementation of alternatives
> that's provided in chkconfig, rather than cworth's shell version. I haven't
> tested it in that context, but I doubt it runs so many external tools.

I did try that at one point in the last year or so but couldn't get it to work.
I think it was something to do with it lacking offline root support. The only
implementation I've been able to get working is the shell script one which is
now in opkg-utils.

I'm actually looking at making a new update-alternatives implementation in C as
I wanted to explore a few alternative ways of doing things. I was going to post
about that once I have some basic working code.

I think the solution for the removal problem is to call update-alternatives in a
pre-rm script rather than a post-rm script. There's already an entry in the opkg
issue tracker for adding support for pre-rm scripts, that's another thing I'm
planning on fixing soon.

Thanks,

-- 
Paul Barker

Email: paul@paulbarker.me.uk
http://www.paulbarker.me.uk

[-- Attachment #2: Type: application/pgp-signature, Size: 484 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-08-18 14:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-18 13:44 toybox in OpenEmbedded Paul Barker
2014-08-18 14:29 ` [yocto] " Christopher Larson
2014-08-18 14:29   ` Christopher Larson
2014-08-18 14:43   ` [yocto] " Paul Barker
2014-08-18 14:43     ` Paul Barker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.