Right now, you can create a workable sub-8MB image using the poky-tiny distro. But there is no documentation about this and how to use it. Darren did a presentation October 2011 about steps you take to trim out the size. this seems like a really good BKM, and should be in a chapter in the dev guide someplace. The other urgent-ish thing here is that apparently if you choose poky-tiny as your distro, you need to make sure you clean out libc or some such or the build should fail.
Darren, Can you point me to your presentation? I will see how to fix this. Scott
Darren, Do we have information on this? Scott
Added Darren to the CC list :) @Darren: Can you please help Scott out? Thanks!
Created attachment 1100 [details] ELCE 2011 Tiny Presentation Ah yes, adding me to CC helps! :-) Not sure how helpful my presentation will be to document this, but here it is. The 45 minute video is here: http://free-electrons.com/blog/elce-2011-videos/ http://free-electrons.com/pub/video/2011/elce/elce-2011-hart-tuning-linux-embedded.webm
Just adding some summarizing notes here to help with the design of the documentation to satisfy this bug. Darren - Can you check this high-level understanding and strategy out for me and add or correct as necessary? Thanks, Scott ---------------------------------------------- * We now have a poky-tiny distro available in YP that is the bare minimum distribution with which a developer can get started. This distro and the supporting metadata is the culmination of the work that Darren did and was outlined in 2011 in his slide deck and presentation. Because we have this "result" now we don't need to duplicate in manual/section form all the information found in the presentation deck and presentation video. * We need to have the topic "creating a minimal image" (or something like that) in the YP Development manual as the launching point for this information. It needs to be easily found from the table of contents or search results. * The topics we need to cover are as follows: - Some introduction as to why a developer wants to create a minimal image and the benefits to doing so. (in dev-manual) - The kernel configuration requirements (in kernel-dev) - The libc configuration requirements (in dev-manual) - The busybox configuration requirements (in dev-manual) * The basic premise for creating this tiny image is going to be the same as creating a distro other than the default poky image. The user will be creating a "poky-tiny" image instead. They will be starting with the reference image we provide and, if necessary, adding in features that they need. * There are some scripts that Darren has that will help the user "measure" the size of the image as they do the configurations so that they can be sure they are keeping within the minimum memory requirements and boot speed times as they add features in. * We have two BSPs that work with our released poky-tiny distribution (FRI2 and QEMU I think). If the user has target hardware that differs from these supported BSPs, they need to take steps to configure a new BSP and thus create their customized image.
That looks good. We should avoid using the phrase "building a minimal image" as that conflicts a bit with the "core-image-minimal" recipe, which in fact you can build using 'DISTRO="poky-tiny"'. We should probably use "building a tiny image" or even better "building a tiny BSP" or "building a tiny system". Just to avoid confusion.
Sounds good Darren - thanks for the quick look and comments.
Darren, Here is the link for the first look. This is far from done but I want you to look at it now because there are areas I have not covered and the entire topic will eventually span two manuals: dev-manual and kernel-dev. Right now it is in one contained section in the dev-manual. You can think of that as my "layer." :) Missing stuff: * Busybox changes * eglibc adjustments * Messing with the distro.conf file Also, I have not done a second pass through it to tighten up wording and such so don't focus on that unless I am off in terminology. Thanks, Scott --------------------- http://www.yoctoproject.org/docs/1.4/dev-manual/dev-manual.html#building-a-tiny-system
Darren, Here is the latest (second) draft of this new section. I have incorporated changes based on your first review. Please review and comment. http://www.yoctoproject.org/docs/1.4/dev-manual/dev-manual.html#building-a-tiny-system Scott
Got stuck on the first sentence. :-) "Very small distributions have some significant advantages such as requiring less on-die or in-package memory (cheaper), better performance through efficient cache usage, lower power requirements due to less memory, faster boot times, and reduced development overhead." My comment is on "faster boot times" - although you can get a faster boot with a tiny image, there are some space-time tradeoffs. We probably want to expand on that, perhaps in a separate section on "fast boot." In fact if we decide to create a new section, I can open a new bugzilla for it.
(In reply to comment #11) > Got stuck on the first sentence. :-) > > "Very small distributions have some significant advantages such as requiring > less on-die or in-package memory (cheaper), better performance through > efficient cache usage, lower power requirements due to less memory, faster > boot times, and reduced development overhead." > > My comment is on "faster boot times" - although you can get a faster boot > with a tiny image, there are some space-time tradeoffs. We probably want to > expand on that, perhaps in a separate section on "fast boot." In fact if we > decide to create a new section, I can open a new bugzilla for it. Pretty much everything here can be qualified in some way. Smaller images won't use less power if they have polling busy loops, they won't use less memory if they have a single app that allocates tons of memory, the development overhead will be large if they use a lot of patches that are maintained out of tree, etc etc etc. However, all the reasons mentioned above are true and valid reasons why people seek to build smaller images. So I'm not sure what the feedback here is about really. Would you just like to see some documentation on booting faster?
> Would you just like to see some documentation on booting faster? Yes
The section "Building a Tiny System" at http://www.yoctoproject.org/docs/1.4/dev-manual/dev-manual#building-a-tiny-system has addressed this bug. I think it should be resolved. The issue about seeing boot times sped up should probably be a separate bug. Scott
Updated the whiteboard information. I forgot to do that when I posted my last comment about this bug.
The documentation is in place and contains the needed information for building tiny images by following the poky-tiny distribution example. This is verified.