summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
authorScott Rifenbark <scott.m.rifenbark@intel.com>2013-03-22 13:44:47 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-04-04 14:12:49 +0100
commit30a806dcbd8470bb97b52b246aab3b39389bb763 (patch)
treeb59422b7fe17cc7c2b6f0fd139a030cbb6260e4f /documentation
parentde4f0d1ded239a3af6e876bce87a963426f54074 (diff)
downloadpoky-30a806dcbd8470bb97b52b246aab3b39389bb763.tar.gz
dev-manual: Applied review comments to poky-tiny section
Fixes YOCTO #2568 Applied Darren's review comments where I could for his review. Not all questions are answered but this represents the third draft of the section. (From yocto-docs rev: da0bc9542259238caf7b474bb15157d80a2b3651) Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation')
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml54
1 files changed, 32 insertions, 22 deletions
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
index 0f6c78b855..aa52d17025 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -2197,12 +2197,13 @@
2197 2197
2198 <para> 2198 <para>
2199 Very small distributions have some significant advantages such 2199 Very small distributions have some significant advantages such
2200 as requiring less on-die memory (cheaper), better performance 2200 as requiring less on-die or in-package memory (cheaper), better
2201 through efficient cache usage, lower power requirements due to less 2201 performance through efficient cache usage, lower power requirements
2202 memory, faster boot times, and reduced development overhead. 2202 due to less memory, faster boot times, and reduced development
2203 overhead.
2203 Some real-world examples where a very small distribution gives 2204 Some real-world examples where a very small distribution gives
2204 you distinct advantages are digital cameras, medical devices, 2205 you distinct advantages are digital cameras, medical devices,
2205 small headless systems, and partitioned flash. 2206 and small headless systems.
2206 </para> 2207 </para>
2207 2208
2208 <para> 2209 <para>
@@ -2217,10 +2218,9 @@
2217 2218
2218 <para> 2219 <para>
2219 The following list presents the overall steps you need to 2220 The following list presents the overall steps you need to
2220 consider and perform to create very small systems that 2221 consider and perform to create distributions with smaller
2221 have a kernel and root filesystem under 4 Mbytes, boot to the 2222 filesystems, faster boot times, maintain your critical
2222 shell in under two seconds, maintain <filename>ipv4</filename> 2223 functionality, and avoid initial RAM disks:
2223 functionality, and avoid an initial RAM disk:
2224 <itemizedlist> 2224 <itemizedlist>
2225 <listitem><para>Determine your goals and guiding 2225 <listitem><para>Determine your goals and guiding
2226 principles.</para></listitem> 2226 principles.</para></listitem>
@@ -2254,7 +2254,7 @@
2254 </para></listitem> 2254 </para></listitem>
2255 <listitem><para>Do not create any difficult "hacks" 2255 <listitem><para>Do not create any difficult "hacks"
2256 to achieve your goals.</para></listitem> 2256 to achieve your goals.</para></listitem>
2257 <listitem><para>Leverage off the device-specific 2257 <listitem><para>Leverage the device-specific
2258 options.</para></listitem> 2258 options.</para></listitem>
2259 <listitem><para>Work in a separate layer so that you 2259 <listitem><para>Work in a separate layer so that you
2260 keep changes isolated. 2260 keep changes isolated.
@@ -2290,11 +2290,10 @@
2290 Memory consists of static, dynamic, and temporary memory. 2290 Memory consists of static, dynamic, and temporary memory.
2291 Static memory is the TEXT (the code), DATA (initialized data 2291 Static memory is the TEXT (the code), DATA (initialized data
2292 in the code), and BSS (uninitialized data) sections. 2292 in the code), and BSS (uninitialized data) sections.
2293 Dynamic memory contains memory that is allocate at runtime, 2293 Dynamic memory contains memory that is allocated at runtime,
2294 stacks, hash tables, and so forth. 2294 stacks, hash tables, and so forth.
2295 Temporary memory is decompressed from the expanded kernel 2295 Temporary memory is decompressed from the expanded kernel
2296 after boot. 2296 after boot and also includes the <filename>__init__</filename>
2297 Temporary memory also includes the <filename>__init__</filename>
2298 functions. 2297 functions.
2299 </para> 2298 </para>
2300 2299
@@ -2305,9 +2304,9 @@
2305 the <filename>scripts</filename> directory: 2304 the <filename>scripts</filename> directory:
2306 <itemizedlist> 2305 <itemizedlist>
2307 <listitem><para><filename>ksize.py</filename>: Reports 2306 <listitem><para><filename>ksize.py</filename>: Reports
2308 the size of the kernel files.</para></listitem> 2307 component sizes for the kernel files.</para></listitem>
2309 <listitem><para><filename>dirsize.py</filename>: Reports 2308 <listitem><para><filename>dirsize.py</filename>: Reports
2310 the size of the root filesystem.</para></listitem> 2309 component sizes for root filesystem.</para></listitem>
2311 </itemizedlist> 2310 </itemizedlist>
2312 This next tool and command helps you organize configuration 2311 This next tool and command helps you organize configuration
2313 fragments and view file dependencies in a human-readable form: 2312 fragments and view file dependencies in a human-readable form:
@@ -2332,12 +2331,12 @@
2332 section of the Yocto Project Linux Kernel Development 2331 section of the Yocto Project Linux Kernel Development
2333 Manual and the "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>" 2332 Manual and the "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
2334 section, which is in this manual.</para></listitem> 2333 section, which is in this manual.</para></listitem>
2335 <listitem><para><filename>bitbake -u depexp -g core-image-*</filename>: 2334 <listitem><para><filename>bitbake -u depexp -g &lt;bitbake_target&gt;</filename>:
2336 Using the BitBake command with these options brings up 2335 Using the BitBake command with these options brings up
2337 a Dependency Explorer from which you can view file 2336 a Dependency Explorer from which you can view file
2338 dependencies. 2337 dependencies.
2339 Understanding these dependencies allows you to make 2338 Understanding these dependencies allows you to make
2340 sane decisions when cutting out various pieces of the 2339 informed decisions when cutting out various pieces of the
2341 kernel and root filesystem.</para></listitem> 2340 kernel and root filesystem.</para></listitem>
2342 </itemizedlist> 2341 </itemizedlist>
2343 </para> 2342 </para>
@@ -2357,7 +2356,7 @@
2357 2356
2358 <para> 2357 <para>
2359 First, check out what is hogging your file system running the 2358 First, check out what is hogging your file system running the
2360 <filename>dirsize.sh</filename> script from your root directory: 2359 <filename>dirsize.py</filename> script from your root directory:
2361 <literallayout class='monospaced'> 2360 <literallayout class='monospaced'>
2362 $ cd &lt;root-directory-of-image&gt; 2361 $ cd &lt;root-directory-of-image&gt;
2363 $ dirsize.py 100000 > dirsize-100k.log 2362 $ dirsize.py 100000 > dirsize-100k.log
@@ -2366,6 +2365,9 @@
2366 You can apply a filter to the script to ignore files under 2365 You can apply a filter to the script to ignore files under
2367 a certain size. 2366 a certain size.
2368 This example filters out anything below 100 Kbytes. 2367 This example filters out anything below 100 Kbytes.
2368 The sizes reported by the tool are uncompressed and thus,
2369 will be smaller by a relatively constant factor in a
2370 compressed root filesystem.
2369 When you examine your log file, you can focus on areas of the 2371 When you examine your log file, you can focus on areas of the
2370 root filesystem that take up large amounts of memory. 2372 root filesystem that take up large amounts of memory.
2371 </para> 2373 </para>
@@ -2388,7 +2390,8 @@
2388 result in minimal impact on the feature set. 2390 result in minimal impact on the feature set.
2389 For example, you might not need a VGA display. 2391 For example, you might not need a VGA display.
2390 Or, you might be able to get by with <filename>devtmpfs</filename> 2392 Or, you might be able to get by with <filename>devtmpfs</filename>
2391 and <filename>mdev</filename>. 2393 and <filename>mdev</filename> instead of
2394 <filename>udev</filename>.
2392 </para> 2395 </para>
2393 2396
2394 <para> 2397 <para>
@@ -2402,10 +2405,14 @@
2402 </para> 2405 </para>
2403 2406
2404 <para> 2407 <para>
2405 Some other examples of where you can look to eliminate size 2408 Finally, you should consider exactly what filesystem you need
2406 from the root filesystem are using <filename>ext2</filename> 2409 to meet your needs while also reducing size.
2407 rather than <filename>ext3</filename>, which requires a 2410 For example, consider <filename>cramfs</filename>,
2408 1 Mbyte journal. 2411 <filename>squashfs</filename>, <filename>ubifs</filename>,
2412 <filename>ext2</filename>, or an <filename>initramfs</filename>
2413 using <filename>initramfs</filename>.
2414 Be aware that <filename>ext3</filename> requires a 1 Mbyte
2415 journal.
2409 If you are okay with running read-only you don't need this 2416 If you are okay with running read-only you don't need this
2410 journal. 2417 journal.
2411 </para> 2418 </para>
@@ -2446,6 +2453,9 @@
2446 taken up with the built-in <filename>.o</filename> files for 2453 taken up with the built-in <filename>.o</filename> files for
2447 drivers, networking, core kernel files, filesystem, sound, 2454 drivers, networking, core kernel files, filesystem, sound,
2448 and so forth. 2455 and so forth.
2456 The sizes reported by the tool are uncompressed and thus,
2457 will be smaller by a relatively constant factor in a compressed
2458 kernel image.
2449 Look to reduce the areas that are large and taking up around 2459 Look to reduce the areas that are large and taking up around
2450 the "90% rule". 2460 the "90% rule".
2451 </para> 2461 </para>