All of lore.kernel.org
 help / color / mirror / Atom feed
* Dependency walk for busybox recipe
@ 2012-09-15 17:59 Elvis Dowson
  2012-09-16  3:54 ` Khem Raj
  0 siblings, 1 reply; 6+ messages in thread
From: Elvis Dowson @ 2012-09-15 17:59 UTC (permalink / raw)
  To: Yocto Discussion Mailing List

Hi,
      How can I do a dependency walk for the busybox recipe? 

I've added gcc-4.5 recipe support and eglibc-2.13 support against the latest poky master branch. The core-image-minimal image works for my powerpc440 soft-float target, from an older commit id, prior to the gcc toolchain rework, and it worked correctly with gcc-4.5 and eglibc-2.13.

So, as a next step after getting the image to boot correctly, I updated the recipes to work against the latest poky master. 

The resulting image crashed with a kernel init, when I passed init=/bin/sh.

The size of the /bin/busybox or /bin/sh (soft-link) executable was 600.1kb for the older commit id, with busybox-1.19.4. The size of the busybox-1.20.2 executable a bit larger(around 608kb) but that did't work with gcc-4.5 and eglibc-2.13, and caused a kernel panic.

So I added busybox-1.19.4 recipe back into my poky master branch, and the resulting size of the busybox-1.19.4 /bin/busybox or /bin/sh executable is 604.2 kb.

Same gcc-4.5, eglibc-2.13 and busybox-1.19.4 recipes and srcrevs, but different executable sizes. 

How can I find out which packages might be contributing the extra 3.2kb to the /bin/busybox executable? 

I'm hoping that if I can progressively replace each recipe in the dependency chain, till I get to the original size, I might be able to atleast narrow it down to the recipe that i causing the kernel panics for the powerpc440 target. Once I do that, then I can try with a newer gcc and eglibc version.

Best regards,

Elvis Dowson

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

* Re: Dependency walk for busybox recipe
  2012-09-15 17:59 Dependency walk for busybox recipe Elvis Dowson
@ 2012-09-16  3:54 ` Khem Raj
  2012-09-16 16:09   ` Elvis Dowson
  0 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2012-09-16  3:54 UTC (permalink / raw)
  To: Elvis Dowson; +Cc: Yocto Discussion Mailing List

On Sat, Sep 15, 2012 at 10:59 AM, Elvis Dowson <elvis.dowson@gmail.com> wrote:
>
>
> So I added busybox-1.19.4 recipe back into my poky master branch, and the resulting size of the busybox-1.19.4 /bin/busybox or /bin/sh executable is 604.2 kb.

make sure that .config of busybox has not changed even if you have
same version backported


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

* Re: Dependency walk for busybox recipe
  2012-09-16  3:54 ` Khem Raj
@ 2012-09-16 16:09   ` Elvis Dowson
  2012-09-16 18:31     ` Paul Eggleton
  0 siblings, 1 reply; 6+ messages in thread
From: Elvis Dowson @ 2012-09-16 16:09 UTC (permalink / raw)
  To: Khem Raj; +Cc: Yocto Discussion Mailing List

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

On 09/16/2012 07:54 AM, Khem Raj wrote:
> On Sat, Sep 15, 2012 at 10:59 AM, Elvis Dowson <elvis.dowson@gmail.com> wrote:
>> So I added busybox-1.19.4 recipe back into my poky master branch, and the resulting size of the busybox-1.19.4 /bin/busybox or /bin/sh executable is 604.2 kb.
> make sure that .config of busybox has not changed even if you have
> same version backported
I've made sure that the defconfig files used in the recipe are 
identical. The only addition that I notice now, is that the recent 
rework done to task-core-boot, resulting in it being renamed as 
packagegroup-core-boot.bb adds the following extra line:

${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \

My virtex5.conf machine features entry does not specify an rtc,

MACHINE_FEATURES = "kernel26 apm ext2 ext3 vfat ethernet keyboard screen 
serial"

yet the current poky master attempts to pull it in:

NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'busybox-hwclock' (but 
/tool/yocto/poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb 
RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'busybox-hwclock' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['busybox-hwclock']
NOTE: Runtime target 'packagegroup-core-boot' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-core-boot', 
'busybox-hwclock']
ERROR: Required build target 'core-image-minimal' has no buildable 
providers.
Missing or unbuildable dependency chain was: ['core-image-minimal', 
'packagegroup-core-boot', 'busybox-hwclock']

Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Is this a bug? Is the rtc being added from somewhere else? Should this 
be happening?

Best regards,

Elvis Dowson

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

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

* Re: Dependency walk for busybox recipe
  2012-09-16 16:09   ` Elvis Dowson
@ 2012-09-16 18:31     ` Paul Eggleton
  2012-09-17 16:32       ` Elvis Dowson
  0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2012-09-16 18:31 UTC (permalink / raw)
  To: Elvis Dowson; +Cc: yocto

On Sunday 16 September 2012 20:09:10 Elvis Dowson wrote:
> On 09/16/2012 07:54 AM, Khem Raj wrote:
> > On Sat, Sep 15, 2012 at 10:59 AM, Elvis Dowson <elvis.dowson@gmail.com> 
wrote:
> >> So I added busybox-1.19.4 recipe back into my poky master branch, and the
> >> resulting size of the busybox-1.19.4 /bin/busybox or /bin/sh executable
> >> is 604.2 kb.> 
> > make sure that .config of busybox has not changed even if you have
> > same version backported
> 
> I've made sure that the defconfig files used in the recipe are
> identical. The only addition that I notice now, is that the recent
> rework done to task-core-boot, resulting in it being renamed as
> packagegroup-core-boot.bb adds the following extra line:
> 
> ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \
> 
> My virtex5.conf machine features entry does not specify an rtc,
> 
> MACHINE_FEATURES = "kernel26 apm ext2 ext3 vfat ethernet keyboard screen
> serial"
> 
> yet the current poky master attempts to pull it in:
> 
> NOTE: Resolving any missing task queue dependencies
> ERROR: Nothing RPROVIDES 'busybox-hwclock' (but
> /tool/yocto/poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
> RDEPENDS on or otherwise requires it)
> NOTE: Runtime target 'busybox-hwclock' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['busybox-hwclock']
> NOTE: Runtime target 'packagegroup-core-boot' is unbuildable, removing...
> Missing or unbuildable dependency chain was: ['packagegroup-core-boot',
> 'busybox-hwclock']
> ERROR: Required build target 'core-image-minimal' has no buildable
> providers.
> Missing or unbuildable dependency chain was: ['core-image-minimal',
> 'packagegroup-core-boot', 'busybox-hwclock']
> 
> Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
> 
> Is this a bug? Is the rtc being added from somewhere else? Should this
> be happening?

It's not a bug, this is meant to happen. This is a result of 
MACHINE_FEATURES_BACKFILL, which is intended to ensure that we can introduce 
new items to MACHINE_FEATURES controlling existing functionality without 
breaking existing machine configurations by disabling the existing 
functionality because the configuration doesn't include it. (In older versions 
of busybox the hwclock feature was on by default - an hwclock item was added 
at the MACHINE_FEATURES level to be able to control it).

To fix this, just add hwclock to MACHINE_FEATURES_BACKFILL_CONSIDERED in your 
machine configuration.

Cheers,
Paul


-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: Dependency walk for busybox recipe
  2012-09-16 18:31     ` Paul Eggleton
@ 2012-09-17 16:32       ` Elvis Dowson
  2012-09-17 17:41         ` Burton, Ross
  0 siblings, 1 reply; 6+ messages in thread
From: Elvis Dowson @ 2012-09-17 16:32 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: yocto

Hi Paul,

On Sep 16, 2012, at 10:31 PM, Paul Eggleton wrote:

> On Sunday 16 September 2012 20:09:10 Elvis Dowson wrote:
>> On 09/16/2012 07:54 AM, Khem Raj wrote:
>>> On Sat, Sep 15, 2012 at 10:59 AM, Elvis Dowson <elvis.dowson@gmail.com> 
> wrote:
>>>> So I added busybox-1.19.4 recipe back into my poky master branch, and the
>>>> resulting size of the busybox-1.19.4 /bin/busybox or /bin/sh executable
>>>> is 604.2 kb.> 
>>> make sure that .config of busybox has not changed even if you have
>>> same version backported
>> 
>> I've made sure that the defconfig files used in the recipe are
>> identical. The only addition that I notice now, is that the recent
>> rework done to task-core-boot, resulting in it being renamed as
>> packagegroup-core-boot.bb adds the following extra line:
>> 
>> ${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \
>> 
>> My virtex5.conf machine features entry does not specify an rtc,
>> 
>> MACHINE_FEATURES = "kernel26 apm ext2 ext3 vfat ethernet keyboard screen
>> serial"
>> 
>> yet the current poky master attempts to pull it in:
>> 
>> NOTE: Resolving any missing task queue dependencies
>> ERROR: Nothing RPROVIDES 'busybox-hwclock' (but
>> /tool/yocto/poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb
>> RDEPENDS on or otherwise requires it)
>> NOTE: Runtime target 'busybox-hwclock' is unbuildable, removing...
>> Missing or unbuildable dependency chain was: ['busybox-hwclock']
>> NOTE: Runtime target 'packagegroup-core-boot' is unbuildable, removing...
>> Missing or unbuildable dependency chain was: ['packagegroup-core-boot',
>> 'busybox-hwclock']
>> ERROR: Required build target 'core-image-minimal' has no buildable
>> providers.
>> Missing or unbuildable dependency chain was: ['core-image-minimal',
>> 'packagegroup-core-boot', 'busybox-hwclock']
>> 
>> Summary: There were 2 ERROR messages shown, returning a non-zero exit code.
>> 
>> Is this a bug? Is the rtc being added from somewhere else? Should this
>> be happening?
> 
> It's not a bug, this is meant to happen. This is a result of 
> MACHINE_FEATURES_BACKFILL, which is intended to ensure that we can introduce 
> new items to MACHINE_FEATURES controlling existing functionality without 
> breaking existing machine configurations by disabling the existing 
> functionality because the configuration doesn't include it. (In older versions 
> of busybox the hwclock feature was on by default - an hwclock item was added 
> at the MACHINE_FEATURES level to be able to control it).
> 
> To fix this, just add hwclock to MACHINE_FEATURES_BACKFILL_CONSIDERED in your 
> machine configuration.

My target board doesn't have an rtc, and busybox tries to look for a busybox-hwclock.

Hence, I don't need an rtc and would like to prevent the hwclock.sh script from being 
copied onto the target by default.

In my machine configuration file, even if I set
MACHINE_FEATURES_BACKFILL = ""
MACHINE_FEATURES_BACKFILL_CONSIDERED = ""

it still complains with the same error 
Nothing RPROVIDES 'busybox-hwclock' (but
/tool/yocto/poky/meta/recipes-core/packagegroups/packagegroup-core-boot.bb

The only way to suppress that error is to remove the line 
${@base_contains("MACHINE_FEATURES", "rtc", "busybox-hwclock", "", d)} \

but the hwclock.sh script gets copied onto the rootfilesystem any way into /sbin

So, I'm not sure what's being achieved. The MACHINE_FEATURES_BACKFILL
and MACHINE_FEATURES_BACKFILL_CONSIDERED = "" has not effect

and the hwclock.sh gets copied to the target in all cases.

Best regards,

Elvis Dowson



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

* Re: Dependency walk for busybox recipe
  2012-09-17 16:32       ` Elvis Dowson
@ 2012-09-17 17:41         ` Burton, Ross
  0 siblings, 0 replies; 6+ messages in thread
From: Burton, Ross @ 2012-09-17 17:41 UTC (permalink / raw)
  To: Elvis Dowson; +Cc: Paul Eggleton, yocto

On 17 September 2012 17:32, Elvis Dowson <elvis.dowson@gmail.com> wrote:
> MACHINE_FEATURES_BACKFILL_CONSIDERED = "" has not effect

Set MACHINE_FEATURES_BACKFILL_CONSIDERED = "hwclock", not "".  It's
value is a list of features that are being backfilled, and you need to
declare that you've considered adding it to the features and
explicitly are not.

Ross


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

end of thread, other threads:[~2012-09-17 17:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-15 17:59 Dependency walk for busybox recipe Elvis Dowson
2012-09-16  3:54 ` Khem Raj
2012-09-16 16:09   ` Elvis Dowson
2012-09-16 18:31     ` Paul Eggleton
2012-09-17 16:32       ` Elvis Dowson
2012-09-17 17:41         ` Burton, Ross

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.