All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC] get minimal rootfs to be even smaller
@ 2013-05-31 14:11 Marcin Juszkiewicz
  2013-05-31 14:11 ` [PATCH] udev: do not recommend pciutils/usbutils ids Marcin Juszkiewicz
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Marcin Juszkiewicz @ 2013-05-31 14:11 UTC (permalink / raw)
  To: openembedded-core

I build core-image-minimal today and got 5.1MB image (AArch64/eglibc).
Looked inside the image and found some extra files which can be dropped.

First hit: pci.ids.gz and usb.ids.gz ~350KB in total.

Normally they are needed for lspci/lsusb but they are brought by udev
which does not need them.

Next one can be ldconfig which is ~600KB.

What do you think?



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

* [PATCH] udev: do not recommend pciutils/usbutils ids
  2013-05-31 14:11 [RFC] get minimal rootfs to be even smaller Marcin Juszkiewicz
@ 2013-05-31 14:11 ` Marcin Juszkiewicz
  2013-05-31 14:50   ` Burton, Ross
  2013-05-31 14:41 ` [RFC] get minimal rootfs to be even smaller Phil Blundell
  2013-06-11  2:06 ` Khem Raj
  2 siblings, 1 reply; 14+ messages in thread
From: Marcin Juszkiewicz @ 2013-05-31 14:11 UTC (permalink / raw)
  To: openembedded-core

udev does not require those files to be operational and they add ~350KB
to rootfs

Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
---
 meta/recipes-core/udev/udev.inc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-core/udev/udev.inc b/meta/recipes-core/udev/udev.inc
index 769d861..ee05ad0 100644
--- a/meta/recipes-core/udev/udev.inc
+++ b/meta/recipes-core/udev/udev.inc
@@ -14,7 +14,6 @@ LDFLAGS += "-lrt"
 
 DEPENDS = "acl glib-2.0 libusb usbutils pciutils gperf-native libxslt-native util-linux"
 RPROVIDES_${PN} = "hotplug"
-RRECOMMENDS_${PN} += "usbutils-ids pciutils-ids"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/hotplug/udev-${PV}.tar.gz \
            file://0001-Fixing-keyboard_force_release.sh-shell-script-path.patch \
-- 
1.8.1.2



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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-05-31 14:11 [RFC] get minimal rootfs to be even smaller Marcin Juszkiewicz
  2013-05-31 14:11 ` [PATCH] udev: do not recommend pciutils/usbutils ids Marcin Juszkiewicz
@ 2013-05-31 14:41 ` Phil Blundell
  2013-05-31 15:24   ` Marcin Juszkiewicz
  2013-06-11  2:06 ` Khem Raj
  2 siblings, 1 reply; 14+ messages in thread
From: Phil Blundell @ 2013-05-31 14:41 UTC (permalink / raw)
  To: Marcin Juszkiewicz; +Cc: openembedded-core

On Fri, 2013-05-31 at 16:11 +0200, Marcin Juszkiewicz wrote:
> Next one can be ldconfig which is ~600KB.

There's already an option to turn that off: you can set USE_LDCONFIG=0
in your distro configuration (which micro does, for example).
Converting that to be a modern DISTRO_FEATURE would be a fine thing.

On the udev thing I guess my initial reaction would be that if you want
the smallest rootfs you probably don't want to be using udev at all.
But if it's installing files that are totally unnecessary then that does
seem a bit extravagant and I agree that it should be curtailed.

p.




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

* Re: [PATCH] udev: do not recommend pciutils/usbutils ids
  2013-05-31 14:11 ` [PATCH] udev: do not recommend pciutils/usbutils ids Marcin Juszkiewicz
@ 2013-05-31 14:50   ` Burton, Ross
  0 siblings, 0 replies; 14+ messages in thread
From: Burton, Ross @ 2013-05-31 14:50 UTC (permalink / raw)
  To: Marcin Juszkiewicz; +Cc: openembedded-core

On 31 May 2013 15:11, Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> wrote:
> udev does not require those files to be operational and they add ~350KB
> to rootfs
>
> Signed-off-by: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>

Well spotted.

Signed-off-by: Ross Burton <ross.burton@intel.com>

Ross


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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-05-31 14:41 ` [RFC] get minimal rootfs to be even smaller Phil Blundell
@ 2013-05-31 15:24   ` Marcin Juszkiewicz
  0 siblings, 0 replies; 14+ messages in thread
From: Marcin Juszkiewicz @ 2013-05-31 15:24 UTC (permalink / raw)
  To: openembedded-core

W dniu 31.05.2013 16:41, Phil Blundell pisze:
> On Fri, 2013-05-31 at 16:11 +0200, Marcin Juszkiewicz wrote:
>> Next one can be ldconfig which is ~600KB.
> 
> There's already an option to turn that off: you can set 
> USE_LDCONFIG=0 in your distro configuration (which micro does, for 
> example). Converting that to be a modern DISTRO_FEATURE would be a 
> fine thing.

Thanks for hint - may look at it next week.

> On the udev thing I guess my initial reaction would be that if you 
> want the smallest rootfs you probably don't want to be using udev at 
> all.

I just wanted to have smallest possible image without doing any distro
config changes. Think "minimal image for testing KVM" where KVM host
rootfs can be built with same setup.


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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-05-31 14:11 [RFC] get minimal rootfs to be even smaller Marcin Juszkiewicz
  2013-05-31 14:11 ` [PATCH] udev: do not recommend pciutils/usbutils ids Marcin Juszkiewicz
  2013-05-31 14:41 ` [RFC] get minimal rootfs to be even smaller Phil Blundell
@ 2013-06-11  2:06 ` Khem Raj
  2013-06-11  4:27   ` Saul Wold
  2013-06-11 15:03   ` Phil Blundell
  2 siblings, 2 replies; 14+ messages in thread
From: Khem Raj @ 2013-06-11  2:06 UTC (permalink / raw)
  To: Marcin Juszkiewicz; +Cc: openembedded-core


On May 31, 2013, at 7:11 AM, Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> wrote:

> First hit: pci.ids.gz and usb.ids.gz ~350KB in total.

udev just RRECOMMENDS  usbutils-ids pciutils-ids so how did it get into build time dependencies to begin with ?




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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-06-11  2:06 ` Khem Raj
@ 2013-06-11  4:27   ` Saul Wold
  2013-06-11 15:03   ` Phil Blundell
  1 sibling, 0 replies; 14+ messages in thread
From: Saul Wold @ 2013-06-11  4:27 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On 06/10/2013 07:06 PM, Khem Raj wrote:
>
> On May 31, 2013, at 7:11 AM, Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> wrote:
>
>> First hit: pci.ids.gz and usb.ids.gz ~350KB in total.
>
> udev just RRECOMMENDS  usbutils-ids pciutils-ids so how did it get into build time dependencies to begin with ?
>
I looked into this a while back and it's the fact that those packages 
are built, so they are seen and get installed.  If the packages aren't 
available they won't get installed.

Since pciutils and usbutils are both DEPENDS of udev, those get built 
and the packages get deployed and then are available to be installed at 
the behest of the RRECOMMENDS.

We could maybe have added BAD_RECOMMENDATIONS for core-image-minimal so 
that on a larger system udev would still have the -id files available, I 
just thought of this, not tested.

Sau!


>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>


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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-06-11  2:06 ` Khem Raj
  2013-06-11  4:27   ` Saul Wold
@ 2013-06-11 15:03   ` Phil Blundell
  2013-06-11 15:22     ` Khem Raj
  1 sibling, 1 reply; 14+ messages in thread
From: Phil Blundell @ 2013-06-11 15:03 UTC (permalink / raw)
  To: Khem Raj; +Cc: openembedded-core

On Mon, 2013-06-10 at 19:06 -0700, Khem Raj wrote:
> On May 31, 2013, at 7:11 AM, Marcin Juszkiewicz <marcin@juszkiewicz.com.pl> wrote:
> 
> > First hit: pci.ids.gz and usb.ids.gz ~350KB in total.
> 
> udev just RRECOMMENDS  usbutils-ids pciutils-ids so how did it get into build time dependencies to begin with ?

Er, don't RRECOMMENDS always go into the build dependency list?

p.




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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-06-11 15:03   ` Phil Blundell
@ 2013-06-11 15:22     ` Khem Raj
  2013-06-11 15:26       ` Phil Blundell
  2013-06-11 15:36       ` Martin Jansa
  0 siblings, 2 replies; 14+ messages in thread
From: Khem Raj @ 2013-06-11 15:22 UTC (permalink / raw)
  To: Phil Blundell; +Cc: Patches and discussions about the oe-core layer

On Tue, Jun 11, 2013 at 8:03 AM, Phil Blundell <pb@pbcl.net> wrote:
> Er, don't RRECOMMENDS always go into the build dependency list?

if they do then whats the difference between DEPENDS and RRECOMMENDS
functionally.
since now rrecommended packages will always be available and they will
always make into images.


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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-06-11 15:22     ` Khem Raj
@ 2013-06-11 15:26       ` Phil Blundell
  2013-06-11 15:40         ` Khem Raj
  2013-06-11 15:36       ` Martin Jansa
  1 sibling, 1 reply; 14+ messages in thread
From: Phil Blundell @ 2013-06-11 15:26 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Tue, 2013-06-11 at 08:22 -0700, Khem Raj wrote:
> On Tue, Jun 11, 2013 at 8:03 AM, Phil Blundell <pb@pbcl.net> wrote:
> > Er, don't RRECOMMENDS always go into the build dependency list?
> 
> if they do then whats the difference between DEPENDS and RRECOMMENDS
> functionally.

RDEPENDS are required and the package manager will insist they are
always installed.  RRECOMMENDS are optional; you can uninstall them
after the fact, and you can (with some package managers at least)
declare them to be BAD_RECOMMENDATIONS which will be ignored.

> since now rrecommended packages will always be available and they will
> always make into images.

You say "now", but as far as I know it has always been thus.  If it
wasn't then the set of packages that get installed in the image would
depend on what things you happened to have lying around in your deploy
directory, which would not be a very good thing.

p.




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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-06-11 15:22     ` Khem Raj
  2013-06-11 15:26       ` Phil Blundell
@ 2013-06-11 15:36       ` Martin Jansa
  1 sibling, 0 replies; 14+ messages in thread
From: Martin Jansa @ 2013-06-11 15:36 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

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

On Tue, Jun 11, 2013 at 08:22:27AM -0700, Khem Raj wrote:
> On Tue, Jun 11, 2013 at 8:03 AM, Phil Blundell <pb@pbcl.net> wrote:
> > Er, don't RRECOMMENDS always go into the build dependency list?
> 
> if they do then whats the difference between DEPENDS and RRECOMMENDS
> functionally.

RDEPENDS and RRECOMMENDS right?

> since now rrecommended packages will always be available and they will
> always make into images.

just the possibility to "blacklist" them with BAD_RECOMMENDATIONS.

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

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

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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-06-11 15:26       ` Phil Blundell
@ 2013-06-11 15:40         ` Khem Raj
  2013-06-11 15:43           ` Phil Blundell
  0 siblings, 1 reply; 14+ messages in thread
From: Khem Raj @ 2013-06-11 15:40 UTC (permalink / raw)
  To: Phil Blundell; +Cc: Patches and discussions about the oe-core layer

On Tue, Jun 11, 2013 at 8:26 AM, Phil Blundell <pb@pbcl.net> wrote:
> On Tue, 2013-06-11 at 08:22 -0700, Khem Raj wrote:
>> On Tue, Jun 11, 2013 at 8:03 AM, Phil Blundell <pb@pbcl.net> wrote:
>> > Er, don't RRECOMMENDS always go into the build dependency list?
>>
>> if they do then whats the difference between DEPENDS and RRECOMMENDS
>> functionally.
>
> RDEPENDS are required and the package manager will insist they are
> always installed.  RRECOMMENDS are optional; you can uninstall them
> after the fact, and you can (with some package managers at least)
> declare them to be BAD_RECOMMENDATIONS which will be ignored.
>

yeah now I see the code build is going to build RRECOMMENDS automatically hmm.
Do BAD_RECOMMENDATIONS work with rpm ?

>> since now rrecommended packages will always be available and they will
>> always make into images.
>
> You say "now", but as far as I know it has always been thus.  If it
> wasn't then the set of packages that get installed in the image would
> depend on what things you happened to have lying around in your deploy
> directory, which would not be a very good thing.
>
> p.
>
>


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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-06-11 15:40         ` Khem Raj
@ 2013-06-11 15:43           ` Phil Blundell
  2013-06-11 15:55             ` Burton, Ross
  0 siblings, 1 reply; 14+ messages in thread
From: Phil Blundell @ 2013-06-11 15:43 UTC (permalink / raw)
  To: Khem Raj; +Cc: Patches and discussions about the oe-core layer

On Tue, 2013-06-11 at 08:40 -0700, Khem Raj wrote:
> yeah now I see the code build is going to build RRECOMMENDS automatically hmm.
> Do BAD_RECOMMENDATIONS work with rpm ?

I think you mean "with smart", and as far as I know the answer is no.

p.




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

* Re: [RFC] get minimal rootfs to be even smaller
  2013-06-11 15:43           ` Phil Blundell
@ 2013-06-11 15:55             ` Burton, Ross
  0 siblings, 0 replies; 14+ messages in thread
From: Burton, Ross @ 2013-06-11 15:55 UTC (permalink / raw)
  To: Phil Blundell; +Cc: Patches and discussions about the oe-core layer

On 11 June 2013 16:43, Phil Blundell <pb@pbcl.net> wrote:
> On Tue, 2013-06-11 at 08:40 -0700, Khem Raj wrote:
>> yeah now I see the code build is going to build RRECOMMENDS automatically hmm.
>> Do BAD_RECOMMENDATIONS work with rpm ?
>
> I think you mean "with smart", and as far as I know the answer is no.

Only rootfs_ipkg respects BAD_RECOMMENDATIONS:

https://bugzilla.yoctoproject.org/show_bug.cgi?id=3916 <-- bug for rpm
https://bugzilla.yoctoproject.org/show_bug.cgi?id=4120 <-- bug for dpkg

Ross


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

end of thread, other threads:[~2013-06-11 15:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-31 14:11 [RFC] get minimal rootfs to be even smaller Marcin Juszkiewicz
2013-05-31 14:11 ` [PATCH] udev: do not recommend pciutils/usbutils ids Marcin Juszkiewicz
2013-05-31 14:50   ` Burton, Ross
2013-05-31 14:41 ` [RFC] get minimal rootfs to be even smaller Phil Blundell
2013-05-31 15:24   ` Marcin Juszkiewicz
2013-06-11  2:06 ` Khem Raj
2013-06-11  4:27   ` Saul Wold
2013-06-11 15:03   ` Phil Blundell
2013-06-11 15:22     ` Khem Raj
2013-06-11 15:26       ` Phil Blundell
2013-06-11 15:40         ` Khem Raj
2013-06-11 15:43           ` Phil Blundell
2013-06-11 15:55             ` Burton, Ross
2013-06-11 15:36       ` Martin Jansa

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.