-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 06/14/2012 12:05 AM, Khem Raj wrote: > On 6/13/2012 10:19 PM, Darren Hart wrote: >> When building very small systems, it can be useful to spawn a >> shell from a simple init script, rather than a full System V Init >> process. This requires the shell be the session leader and be >> able to open the controlling terminal if it is to have job >> control. > >> Enable CONFIG_CTTYHACK and CONFIG_SETSID to enable this for >> distros defining the "tiny" DISTRO_FEATURE. > >> Signed-off-by: Darren Hart <[email protected]> CC: OE Core >> <[email protected]> --- >> meta/recipes-core/busybox/busybox.inc | 2 ++ 1 files changed, >> 2 insertions(+), 0 deletions(-) > >> diff --git a/meta/recipes-core/busybox/busybox.inc >> b/meta/recipes-core/busybox/busybox.inc index 5b83d32..d07ba7e >> 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ >> b/meta/recipes-core/busybox/busybox.inc @@ -57,6 +57,8 @@ def >> features_to_busybox_settings(d): busybox_cfg('nls', >> distro_features, 'CONFIG_LOCALE_SUPPORT', cnf, rem) >> busybox_cfg('ipv4', distro_features, >> 'CONFIG_FEATURE_IFUPDOWN_IPV4', cnf, rem) busybox_cfg('ipv6', >> distro_features, 'CONFIG_FEATURE_IFUPDOWN_IPV6', cnf, rem) + >> busybox_cfg('tiny', distro_features, 'CONFIG_SETSID', cnf, rem) >> + busybox_cfg('tiny', distro_features, 'CONFIG_CTTYHACK', cnf, >> rem) return "\n".join(cnf), "\n".join(rem) > >> # X, Y = ${@features_to_uclibc_settings(d)} > > Enabling cttyhack and setsid could be a good thing in general > (thinking of initramfs kind of images) so I would propose to enable > it by default and not introduce another distro knob here. How much > does busybox code size grow which these two features turned on.? So this struck me as strange, but I did it twice to make sure I didn't mess something up: BEFORE - -rwxr-xr-x 1 dvhart dvhart 2799417 2012-06-15 15:06 busybox - -rwxr-xr-x 1 dvhart dvhart 547872 2012-06-15 15:06 busybox_stripped AFTER (w/ SETSID and CTTYHACK) - -rwxr-xr-x 1 dvhart dvhart 2805195 2012-06-15 14:45 busybox - -rwxr-xr-x 1 dvhart dvhart 547872 2012-06-15 15:05 busybox_stripped DELTA busybox: 5778 busybox_stripped: 0 The difference is <6k for the unstripped binary, and 0 bytes for the stripped binary. It must have something to do with the way busybox builds and enables features. The above was using my host strip command. I also tried building the rootfs with and without these features and comparing the cross-stripped binaries in the rootfs, delta is also 0 bytes. So the cost is "negligible" and there is a clear advantage to having these two options enabled. I'll resend with a two line change to the defconfig to enable them. - -- Darren > > otherwise second best thing is to keep it in poky-tiny distro > layer which wants to set the policy > > _______________________________________________ Openembedded-core > mailing list [email protected] > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core > > - -- Darren Hart Intel Open Source Technology Center Yocto Project - Linux Kernel -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJP27WMAAoJEKbMaAwKp364Hf0IAKpHOMWy63ZPYwN+Ay7wXPf1 KaUe4fWGBIMNJqS5FGJyhxBnWMdXJceAKMP6Wo2nIa/kvjat//IME8v41xwAb+mD 5sjZpkcBE02CFq9rZmHfiTTPbYC7iS8a6Dz5n/fTLb79b189Jv3Rx/G3GCN4ioeC xqwVU8zmdtkrHfU+UonR5G4HdNMCjOCFETLWcWW6DNTsj5PmazJV2cMIZTYJEr43 G/EyvO2fz/n+y53dsI04zwNEXuyr0pjurCK7dXt9oxlOnDvE276yS1b0Xihwm3cW G/h0udSeQ3fcF91vCxdYMAlQNJyMqiCOCeSW5gOVe6NKs+kuxzRqYFSEfD0gtmY= =aZeL -----END PGP SIGNATURE----- _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
