From 184a6f0c8820707919373f4eb8648155526862fc Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Mon, 1 Apr 2013 09:18:34 -0700 Subject: [PATCH] dev-manual: Applied review comments to building tiny section. Fixes YOCTO #2568 These changes are based on Darren Hart's second review of this new section. (From yocto-docs rev: b61ef2b6cf96b45666e0f75753b76e0f875663b5) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 87 +++++++++++++++---- 1 file changed, 70 insertions(+), 17 deletions(-) diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 544a14693a..5da9861c85 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -2209,8 +2209,8 @@ This section presents information that shows you how you can trim your distribution to even smaller sizes than the - 8 Mbytes poky-tiny distribution that - can be built out-of-the-box using the Yocto Project. + poky-tiny distribution, which is around + 5 Mbytes, that can be built out-of-the-box using the Yocto Project.
@@ -2269,19 +2269,21 @@ Understand What Gives Your Image Size - You will need to have an image from which you can - work. - The Yocto Project ships with the ability to create a + It is easiest to have something to start with when creating + your own distribution. + You can use the Yocto Project out-of-the-box to create the poky-tiny distribution. - This distribution consists of a small, sub-8 Mbyte kernel - that works with two shipped Board Support Packages (BSPs): - Fish River Island 2 and QEMU. - You can use this distribution as a starting point and trim - the size down from there. - If you need to build out the poky-tiny - distribution, see the - "Creating Your Own Distribution" - section for information. + Ulitmately, you will want to make changes in your own + distribution that are likely modeled after + poky-tiny. + + To use poky-tiny in your build, + set the DISTRO variable in your + local.conf file to "poky-tiny" + as described in the + "Creating Your Own Distribution" + section. + @@ -2292,8 +2294,9 @@ in the code), and BSS (uninitialized data) sections. Dynamic memory contains memory that is allocated at runtime, stacks, hash tables, and so forth. - Temporary memory is decompressed from the expanded kernel - after boot and also includes the __init__ + Temporary memory is recovered after the boot process. + This memory consists of memory used for decompressing + the kernel and for the __init__ functions. @@ -2304,7 +2307,8 @@ the scripts directory: ksize.py: Reports - component sizes for the kernel files. + component sizes for the kernel build objects. + dirsize.py: Reports component sizes for the root filesystem. @@ -2503,6 +2507,55 @@
+
+ Look for Other Ways to Minimize Size + + + Depending on your particular circumstances, other areas that you + can trim likely exist. + The key to finding these areas is through tools and methods + described here combined with experimentation and iteration. + Here are a couple of areas to experiment with: + + eglibc: + In general, follow this process: + + Remove eglibc + features from + DISTRO_FEATURES + that you think you don't need. + Build your distribution. + + If the build fails due to missing + symbols in a package, determine if you can + reconfigure the package to not need those + features. + For example, change the configuration to not + support wide character support as is done for + ncurses. + Or, if support for those characters is needed, + determine what eglibc + features provide the support and restore the + configuration. + + Rebuild and repeat the process. + + + busybox: + For BusyBox, use a process similar as described for + eglibc. + A difference is you will need to boot the resulting + system to see if you are able to do everything you + expect from the running system. + You need to be sure to integrate configuration fragments + into Busybox because BusyBox handles its own core + features and then allows you to add configuration + fragments on top. + + + +
+
Iterate on the Process