<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.elinux.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://www.elinux.org/api.php?action=feedcontributions&amp;user=Tim+Bird&amp;feedformat=atom</id>
		<title>eLinux.org - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://www.elinux.org/api.php?action=feedcontributions&amp;user=Tim+Bird&amp;feedformat=atom"/>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Special:Contributions/Tim_Bird"/>
		<updated>2013-05-19T07:43:37Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.21alpha</generator>

	<entry>
		<id>http://www.elinux.org/File:0001-Add-option-to-omit-unused-syscalls.patch</id>
		<title>File:0001-Add-option-to-omit-unused-syscalls.patch</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/File:0001-Add-option-to-omit-unused-syscalls.patch"/>
				<updated>2013-05-13T23:20:25Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/File:0001-Support-elimination-of-unused-kernel-parameters.patch</id>
		<title>File:0001-Support-elimination-of-unused-kernel-parameters.patch</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/File:0001-Support-elimination-of-unused-kernel-parameters.patch"/>
				<updated>2013-05-13T23:20:01Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-05-13T23:19:20Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Materials */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Automatic reduction (intro)===&lt;br /&gt;
The problem with automatic reduction is that &amp;quot;the system&amp;quot; doesn't know what&lt;br /&gt;
software is needed and what is not.  there needs to be a way to tell it&lt;br /&gt;
about things that are not going to be used.&lt;br /&gt;
&lt;br /&gt;
=== auto-reduce - story of 8 bytes of bloat ===&lt;br /&gt;
Story of the conditional check in kdb:&lt;br /&gt;
* I found a bug in kdb, when a particular option was using in the configuration file&lt;br /&gt;
* not everyone uses the configuration file&lt;br /&gt;
* not everyone uses the particular option&lt;br /&gt;
* bug only triggered in those circumstances&lt;br /&gt;
* I wrote a small patch, to guard against use of a variable prematurely&lt;br /&gt;
* problem: all users of KDB now have this check, and suffer this overhead&lt;br /&gt;
** it wasn't much, just a single compare&lt;br /&gt;
** but this is how bloat builds up over time&lt;br /&gt;
** It bothered me because I knew most people didn't need the check&lt;br /&gt;
* &amp;quot;correct&amp;quot; solution would be to parse the config file, and make the code compile-time configurable&lt;br /&gt;
** this adds more complexity than it is worth.&lt;br /&gt;
&lt;br /&gt;
=== generalizing the problem of bloat ===&lt;br /&gt;
System doesn't know inputs:&lt;br /&gt;
&lt;br /&gt;
* It's very easy to configure the kernel to omit the driver for missing hardware.&lt;br /&gt;
* It's very difficult to configure the kernel to omit error handling for bugs that &lt;br /&gt;
will never occur due to fixed use cases.&lt;br /&gt;
&lt;br /&gt;
=== An example of fixed input (uid in kernel) ===&lt;br /&gt;
* throughout the kernel, there are references to uid&lt;br /&gt;
** comparisons, storing, referencing&lt;br /&gt;
* it turns out this is set by setuid(), by the 'login' program.&lt;br /&gt;
** login does a lookup and validates user account name in /etc/passwd&lt;br /&gt;
* what if /etc/passwd only has 'root' and no others?&lt;br /&gt;
* setuid() could only be called with a value of 0&lt;br /&gt;
* can I encode this constraint on the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== types of constraints ===&lt;br /&gt;
There are numerous other examples of constraints:&lt;br /&gt;
* kernel command line arguments never used&lt;br /&gt;
* syscalls never called by any program&lt;br /&gt;
* parameters that are never used, or parameter values that are never passed in&lt;br /&gt;
** e.g. ioctl value that is not possible&lt;br /&gt;
** this only works in a fixed&lt;br /&gt;
* /proc values never referenced&lt;br /&gt;
* /sys values never referenced&lt;br /&gt;
&lt;br /&gt;
=== also goes back up to user-space ===&lt;br /&gt;
* return values that are not possible&lt;br /&gt;
&lt;br /&gt;
=== kernel command line args ===&lt;br /&gt;
* Documented in Documentation/kernel-parameters.txt&lt;br /&gt;
* defined with __setup() and early_param from include/linux/init.h&lt;br /&gt;
** approximately 480 __setup routines in kernel&lt;br /&gt;
** about 200 __setup_* in System.map on ARM kernel build (98 __setup_str_*)&lt;br /&gt;
** about 230 early_param routines in kernel&lt;br /&gt;
* points to function&lt;br /&gt;
* almost always sets a variable, which would default to 0&lt;br /&gt;
&lt;br /&gt;
* on ARM, with only console_setup and early_mem marked as 'used', there was a 19K difference in size:&lt;br /&gt;
(non-LTO kernel)&lt;br /&gt;
&lt;br /&gt;
 vmlinux.baseline-setup-used  =&amp;gt;  vmlinux-param-used&lt;br /&gt;
        baseline   other   change  percent&lt;br /&gt;
  text:  7680084  7663472   -16612   0%&lt;br /&gt;
  data:   362868   360516    -2352   0%&lt;br /&gt;
   bss:   745312   745184     -128   0%&lt;br /&gt;
 total:  8788264  8769172   -19092   0% &lt;br /&gt;
&lt;br /&gt;
* on ARM, with only console_setup and early_mem marked as 'used', there was a 19K difference in size:&lt;br /&gt;
(LTO kernel)&lt;br /&gt;
&lt;br /&gt;
 vmlinux.lto-param  =&amp;gt;  vmlinux.param-used&lt;br /&gt;
        baseline   other   change  percent&lt;br /&gt;
  text:  1653672  1648920    -4752   0%&lt;br /&gt;
  data:   131636   130244    -1392  -1%&lt;br /&gt;
   bss:    50688    50528     -160   0%&lt;br /&gt;
 total:  1835996  1829692    -6304   0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
System.map from kernel with console_setup and early_mem as only routines marked 'used':&lt;br /&gt;
&lt;br /&gt;
 $ grep __setup System.map&lt;br /&gt;
 c00ea4bc T __setup_irq.153323&lt;br /&gt;
 c00f1adc t __setup_per_zone_wmarks.172539.15755&lt;br /&gt;
 c019d570 t __setup_str_early_mem.21664.160821&lt;br /&gt;
 c019d884 t __setup_str_console_setup.61958.160201&lt;br /&gt;
 c019ef00 t __setup_early_mem.21659.160819&lt;br /&gt;
 c019ef00 T __setup_start&lt;br /&gt;
 c019ef0c t __setup_console_setup.61953.160195&lt;br /&gt;
 c019ef18 T __setup_end&lt;br /&gt;
&lt;br /&gt;
=== /proc values ===&lt;br /&gt;
* Includes sysctl values&lt;br /&gt;
* there are approximately 1200, NOT related specifically to a process&lt;br /&gt;
* about 120 per process&lt;br /&gt;
** about 80 related to networking (on my desktop box)&lt;br /&gt;
* 40 others&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
* [[File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch]]&lt;br /&gt;
* [[File:0001-Support-elimination-of-unused-kernel-parameters.patch]]&lt;br /&gt;
* [[File:0001-Add-option-to-omit-unused-syscalls.patch]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/User:Tim_Bird</id>
		<title>User:Tim Bird</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/User:Tim_Bird"/>
				<updated>2013-04-30T22:48:10Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: change company info and e-mail&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird is a Linux developer working for Sony Mobile Communications - a part of Sony Corporation.&lt;br /&gt;
&lt;br /&gt;
Tim is Chair of the Architecture Group of the [http://www.linuxfoundation.org/collaborate/workgroups/celf CE Workgroup of the Linux Foundation] (formerly the [[CE Linux Forum]]).  In the past, Tim worked at Lineo, Caldera, and Novell.&lt;br /&gt;
&lt;br /&gt;
== Current contact information ==&lt;br /&gt;
You can contact Tim at the following address, which has been made spam-resistant:&lt;br /&gt;
&lt;br /&gt;
* e-mail: tim (dot) bird (at) sonymobile (dot) com.&lt;br /&gt;
&lt;br /&gt;
== Bookmarks for things I'm working on in this wiki ==&lt;br /&gt;
* [[System Size Auto-Reduction]] - presentation for LCJ 2013 - wrapping up my auto-reduce work&lt;br /&gt;
* [[Tim's Tips and Tricks]] - Miscelaneous development tips gleaned over the years&lt;br /&gt;
* [[Ftrace]] - with my knowledge of ftrace, this page really needs a fixup&lt;br /&gt;
* [[Embedded linux status]] - list of things for embedded linux status reports (which I do frequently)&lt;br /&gt;
* [[elinux issues]] - list of things that need fixing&lt;br /&gt;
* [[Embedded Wiki wanted features]]&lt;br /&gt;
* [[Kernel Timer Systems]] - needs a major overhaul to bring it up to date&lt;br /&gt;
* [[Reasons to participate in open source]] - my own thoughts on open source contributions&lt;br /&gt;
&lt;br /&gt;
* [[Android Boot-time Readahead]]&lt;br /&gt;
* [[Beginning Programming]]&lt;br /&gt;
&lt;br /&gt;
=== Pages needing LOTS of HELP!! ===&lt;br /&gt;
Here are some high priority candidates for work...&lt;br /&gt;
* [[Android Kernel Build]]&lt;br /&gt;
&lt;br /&gt;
=== Samples and help ===&lt;br /&gt;
* See [[Table Examples]]&lt;br /&gt;
&lt;br /&gt;
== Areas of interest ==&lt;br /&gt;
Here are some things Tim is interested in on this site:&lt;br /&gt;
* [[Other wikis]] - a list of other wikis to examine the design of&lt;br /&gt;
* [http://www.linuxworld.com/news/2006/120606-closed-modules1.html?page=1 Good article on US case law related to closed-source kernel modules]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikibooks.org/wiki/MediaWiki_Administrator's_Handbook MediaWiki Administrator's Handbook]&lt;br /&gt;
&lt;br /&gt;
== Things I want to add to the wiki ==&lt;br /&gt;
* diffinfo, qdiff, reisolate - see [[Diff And Patch Tricks]], [[Source Management Tools]], and&lt;br /&gt;
[[Tim's patch management tools]]&lt;br /&gt;
* review each portal page and try to hook up material I know is orphaned&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
[http://www.edn.com/article/CA6582852.html Free software encircles embedded design] Warren Web, EDN 8/7/2008&lt;br /&gt;
&lt;br /&gt;
=== Videos, Articles, Presentations of, by or about me ===&lt;br /&gt;
* http://video.linuxfoundation.org/video/1654 - JLS 2009 - Status of Embedded Linux presentation&lt;br /&gt;
* http://www.vimeo.com/8042326 - Measuring Function Duration with Ftrace&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-19T22:02:43Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* kernel command line args */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Automatic reduction (intro)===&lt;br /&gt;
The problem with automatic reduction is that &amp;quot;the system&amp;quot; doesn't know what&lt;br /&gt;
software is needed and what is not.  there needs to be a way to tell it&lt;br /&gt;
about things that are not going to be used.&lt;br /&gt;
&lt;br /&gt;
=== auto-reduce - story of 8 bytes of bloat ===&lt;br /&gt;
Story of the conditional check in kdb:&lt;br /&gt;
* I found a bug in kdb, when a particular option was using in the configuration file&lt;br /&gt;
* not everyone uses the configuration file&lt;br /&gt;
* not everyone uses the particular option&lt;br /&gt;
* bug only triggered in those circumstances&lt;br /&gt;
* I wrote a small patch, to guard against use of a variable prematurely&lt;br /&gt;
* problem: all users of KDB now have this check, and suffer this overhead&lt;br /&gt;
** it wasn't much, just a single compare&lt;br /&gt;
** but this is how bloat builds up over time&lt;br /&gt;
** It bothered me because I knew most people didn't need the check&lt;br /&gt;
* &amp;quot;correct&amp;quot; solution would be to parse the config file, and make the code compile-time configurable&lt;br /&gt;
** this adds more complexity than it is worth.&lt;br /&gt;
&lt;br /&gt;
=== generalizing the problem of bloat ===&lt;br /&gt;
System doesn't know inputs:&lt;br /&gt;
&lt;br /&gt;
* It's very easy to configure the kernel to omit the driver for missing hardware.&lt;br /&gt;
* It's very difficult to configure the kernel to omit error handling for bugs that &lt;br /&gt;
will never occur due to fixed use cases.&lt;br /&gt;
&lt;br /&gt;
=== An example of fixed input (uid in kernel) ===&lt;br /&gt;
* throughout the kernel, there are references to uid&lt;br /&gt;
** comparisons, storing, referencing&lt;br /&gt;
* it turns out this is set by setuid(), by the 'login' program.&lt;br /&gt;
** login does a lookup and validates user account name in /etc/passwd&lt;br /&gt;
* what if /etc/passwd only has 'root' and no others?&lt;br /&gt;
* setuid() could only be called with a value of 0&lt;br /&gt;
* can I encode this constraint on the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== types of constraints ===&lt;br /&gt;
There are numerous other examples of constraints:&lt;br /&gt;
* kernel command line arguments never used&lt;br /&gt;
* syscalls never called by any program&lt;br /&gt;
* parameters that are never used, or parameter values that are never passed in&lt;br /&gt;
** e.g. ioctl value that is not possible&lt;br /&gt;
** this only works in a fixed&lt;br /&gt;
* /proc values never referenced&lt;br /&gt;
* /sys values never referenced&lt;br /&gt;
&lt;br /&gt;
=== also goes back up to user-space ===&lt;br /&gt;
* return values that are not possible&lt;br /&gt;
&lt;br /&gt;
=== kernel command line args ===&lt;br /&gt;
* Documented in Documentation/kernel-parameters.txt&lt;br /&gt;
* defined with __setup() and early_param from include/linux/init.h&lt;br /&gt;
** approximately 480 __setup routines in kernel&lt;br /&gt;
** about 200 __setup_* in System.map on ARM kernel build (98 __setup_str_*)&lt;br /&gt;
** about 230 early_param routines in kernel&lt;br /&gt;
* points to function&lt;br /&gt;
* almost always sets a variable, which would default to 0&lt;br /&gt;
&lt;br /&gt;
* on ARM, with only console_setup and early_mem marked as 'used', there was a 19K difference in size:&lt;br /&gt;
(non-LTO kernel)&lt;br /&gt;
&lt;br /&gt;
 vmlinux.baseline-setup-used  =&amp;gt;  vmlinux-param-used&lt;br /&gt;
        baseline   other   change  percent&lt;br /&gt;
  text:  7680084  7663472   -16612   0%&lt;br /&gt;
  data:   362868   360516    -2352   0%&lt;br /&gt;
   bss:   745312   745184     -128   0%&lt;br /&gt;
 total:  8788264  8769172   -19092   0% &lt;br /&gt;
&lt;br /&gt;
* on ARM, with only console_setup and early_mem marked as 'used', there was a 19K difference in size:&lt;br /&gt;
(LTO kernel)&lt;br /&gt;
&lt;br /&gt;
 vmlinux.lto-param  =&amp;gt;  vmlinux.param-used&lt;br /&gt;
        baseline   other   change  percent&lt;br /&gt;
  text:  1653672  1648920    -4752   0%&lt;br /&gt;
  data:   131636   130244    -1392  -1%&lt;br /&gt;
   bss:    50688    50528     -160   0%&lt;br /&gt;
 total:  1835996  1829692    -6304   0%&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
System.map from kernel with console_setup and early_mem as only routines marked 'used':&lt;br /&gt;
&lt;br /&gt;
 $ grep __setup System.map&lt;br /&gt;
 c00ea4bc T __setup_irq.153323&lt;br /&gt;
 c00f1adc t __setup_per_zone_wmarks.172539.15755&lt;br /&gt;
 c019d570 t __setup_str_early_mem.21664.160821&lt;br /&gt;
 c019d884 t __setup_str_console_setup.61958.160201&lt;br /&gt;
 c019ef00 t __setup_early_mem.21659.160819&lt;br /&gt;
 c019ef00 T __setup_start&lt;br /&gt;
 c019ef0c t __setup_console_setup.61953.160195&lt;br /&gt;
 c019ef18 T __setup_end&lt;br /&gt;
&lt;br /&gt;
=== /proc values ===&lt;br /&gt;
* Includes sysctl values&lt;br /&gt;
* there are approximately 1200, NOT related specifically to a process&lt;br /&gt;
* about 120 per process&lt;br /&gt;
** about 80 related to networking (on my desktop box)&lt;br /&gt;
* 40 others&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
* [[File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-19T21:59:01Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* kernel command line args */ add info about size reduction for param-used feature&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Automatic reduction (intro)===&lt;br /&gt;
The problem with automatic reduction is that &amp;quot;the system&amp;quot; doesn't know what&lt;br /&gt;
software is needed and what is not.  there needs to be a way to tell it&lt;br /&gt;
about things that are not going to be used.&lt;br /&gt;
&lt;br /&gt;
=== auto-reduce - story of 8 bytes of bloat ===&lt;br /&gt;
Story of the conditional check in kdb:&lt;br /&gt;
* I found a bug in kdb, when a particular option was using in the configuration file&lt;br /&gt;
* not everyone uses the configuration file&lt;br /&gt;
* not everyone uses the particular option&lt;br /&gt;
* bug only triggered in those circumstances&lt;br /&gt;
* I wrote a small patch, to guard against use of a variable prematurely&lt;br /&gt;
* problem: all users of KDB now have this check, and suffer this overhead&lt;br /&gt;
** it wasn't much, just a single compare&lt;br /&gt;
** but this is how bloat builds up over time&lt;br /&gt;
** It bothered me because I knew most people didn't need the check&lt;br /&gt;
* &amp;quot;correct&amp;quot; solution would be to parse the config file, and make the code compile-time configurable&lt;br /&gt;
** this adds more complexity than it is worth.&lt;br /&gt;
&lt;br /&gt;
=== generalizing the problem of bloat ===&lt;br /&gt;
System doesn't know inputs:&lt;br /&gt;
&lt;br /&gt;
* It's very easy to configure the kernel to omit the driver for missing hardware.&lt;br /&gt;
* It's very difficult to configure the kernel to omit error handling for bugs that &lt;br /&gt;
will never occur due to fixed use cases.&lt;br /&gt;
&lt;br /&gt;
=== An example of fixed input (uid in kernel) ===&lt;br /&gt;
* throughout the kernel, there are references to uid&lt;br /&gt;
** comparisons, storing, referencing&lt;br /&gt;
* it turns out this is set by setuid(), by the 'login' program.&lt;br /&gt;
** login does a lookup and validates user account name in /etc/passwd&lt;br /&gt;
* what if /etc/passwd only has 'root' and no others?&lt;br /&gt;
* setuid() could only be called with a value of 0&lt;br /&gt;
* can I encode this constraint on the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== types of constraints ===&lt;br /&gt;
There are numerous other examples of constraints:&lt;br /&gt;
* kernel command line arguments never used&lt;br /&gt;
* syscalls never called by any program&lt;br /&gt;
* parameters that are never used, or parameter values that are never passed in&lt;br /&gt;
** e.g. ioctl value that is not possible&lt;br /&gt;
** this only works in a fixed&lt;br /&gt;
* /proc values never referenced&lt;br /&gt;
* /sys values never referenced&lt;br /&gt;
&lt;br /&gt;
=== also goes back up to user-space ===&lt;br /&gt;
* return values that are not possible&lt;br /&gt;
&lt;br /&gt;
=== kernel command line args ===&lt;br /&gt;
* Documented in Documentation/kernel-parameters.txt&lt;br /&gt;
* defined with __setup() and early_param from include/linux/init.h&lt;br /&gt;
** approximately 480 __setup routines in kernel&lt;br /&gt;
** about 200 __setup_* in System.map on ARM kernel build (98 __setup_str_*)&lt;br /&gt;
** about 230 early_param routines in kernel&lt;br /&gt;
* points to function&lt;br /&gt;
* almost always sets a variable, which would default to 0&lt;br /&gt;
&lt;br /&gt;
* on ARM, with only console_setup and early_mem marked as 'used', there was a 19K difference in size:&lt;br /&gt;
(non-LTO kernel)&lt;br /&gt;
{{{&lt;br /&gt;
vmlinux.baseline-setup-used  =&amp;gt;  vmlinux-param-used&lt;br /&gt;
       baseline   other   change  percent&lt;br /&gt;
 text:  7680084  7663472   -16612   0%&lt;br /&gt;
 data:   362868   360516    -2352   0%&lt;br /&gt;
  bss:   745312   745184     -128   0%&lt;br /&gt;
total:  8788264  8769172   -19092   0%&lt;br /&gt;
}}}&lt;br /&gt;
&lt;br /&gt;
* on ARM, with only console_setup and early_mem marked as 'used', there was a 19K difference in size:&lt;br /&gt;
(LTO kernel)&lt;br /&gt;
{{{&lt;br /&gt;
vmlinux.lto-param  =&amp;gt;  vmlinux.param-used&lt;br /&gt;
       baseline   other   change  percent&lt;br /&gt;
 text:  1653672  1648920    -4752   0%&lt;br /&gt;
 data:   131636   130244    -1392  -1%&lt;br /&gt;
  bss:    50688    50528     -160   0%&lt;br /&gt;
total:  1835996  1829692    -6304   0%&lt;br /&gt;
}}}&lt;br /&gt;
&lt;br /&gt;
System.map from kernel with console_setup and early_mem as only routines marked 'used':&lt;br /&gt;
{{{&lt;br /&gt;
$ grep __setup System.map&lt;br /&gt;
c00ea4bc T __setup_irq.153323&lt;br /&gt;
c00f1adc t __setup_per_zone_wmarks.172539.15755&lt;br /&gt;
c019d570 t __setup_str_early_mem.21664.160821&lt;br /&gt;
c019d884 t __setup_str_console_setup.61958.160201&lt;br /&gt;
c019ef00 t __setup_early_mem.21659.160819&lt;br /&gt;
c019ef00 T __setup_start&lt;br /&gt;
c019ef0c t __setup_console_setup.61953.160195&lt;br /&gt;
c019ef18 T __setup_end&lt;br /&gt;
}}}&lt;br /&gt;
&lt;br /&gt;
=== /proc values ===&lt;br /&gt;
* Includes sysctl values&lt;br /&gt;
* there are approximately 1200, NOT related specifically to a process&lt;br /&gt;
* about 120 per process&lt;br /&gt;
** about 80 related to networking (on my desktop box)&lt;br /&gt;
* 40 others&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
* [[File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-19T21:23:37Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* kernel command line args */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Automatic reduction (intro)===&lt;br /&gt;
The problem with automatic reduction is that &amp;quot;the system&amp;quot; doesn't know what&lt;br /&gt;
software is needed and what is not.  there needs to be a way to tell it&lt;br /&gt;
about things that are not going to be used.&lt;br /&gt;
&lt;br /&gt;
=== auto-reduce - story of 8 bytes of bloat ===&lt;br /&gt;
Story of the conditional check in kdb:&lt;br /&gt;
* I found a bug in kdb, when a particular option was using in the configuration file&lt;br /&gt;
* not everyone uses the configuration file&lt;br /&gt;
* not everyone uses the particular option&lt;br /&gt;
* bug only triggered in those circumstances&lt;br /&gt;
* I wrote a small patch, to guard against use of a variable prematurely&lt;br /&gt;
* problem: all users of KDB now have this check, and suffer this overhead&lt;br /&gt;
** it wasn't much, just a single compare&lt;br /&gt;
** but this is how bloat builds up over time&lt;br /&gt;
** It bothered me because I knew most people didn't need the check&lt;br /&gt;
* &amp;quot;correct&amp;quot; solution would be to parse the config file, and make the code compile-time configurable&lt;br /&gt;
** this adds more complexity than it is worth.&lt;br /&gt;
&lt;br /&gt;
=== generalizing the problem of bloat ===&lt;br /&gt;
System doesn't know inputs:&lt;br /&gt;
&lt;br /&gt;
* It's very easy to configure the kernel to omit the driver for missing hardware.&lt;br /&gt;
* It's very difficult to configure the kernel to omit error handling for bugs that &lt;br /&gt;
will never occur due to fixed use cases.&lt;br /&gt;
&lt;br /&gt;
=== An example of fixed input (uid in kernel) ===&lt;br /&gt;
* throughout the kernel, there are references to uid&lt;br /&gt;
** comparisons, storing, referencing&lt;br /&gt;
* it turns out this is set by setuid(), by the 'login' program.&lt;br /&gt;
** login does a lookup and validates user account name in /etc/passwd&lt;br /&gt;
* what if /etc/passwd only has 'root' and no others?&lt;br /&gt;
* setuid() could only be called with a value of 0&lt;br /&gt;
* can I encode this constraint on the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== types of constraints ===&lt;br /&gt;
There are numerous other examples of constraints:&lt;br /&gt;
* kernel command line arguments never used&lt;br /&gt;
* syscalls never called by any program&lt;br /&gt;
* parameters that are never used, or parameter values that are never passed in&lt;br /&gt;
** e.g. ioctl value that is not possible&lt;br /&gt;
** this only works in a fixed&lt;br /&gt;
* /proc values never referenced&lt;br /&gt;
* /sys values never referenced&lt;br /&gt;
&lt;br /&gt;
=== also goes back up to user-space ===&lt;br /&gt;
* return values that are not possible&lt;br /&gt;
&lt;br /&gt;
=== kernel command line args ===&lt;br /&gt;
* Documented in Documentation/kernel-parameters.txt&lt;br /&gt;
* defined with __setup() and early_param from include/linux/init.h&lt;br /&gt;
** approximately 480 __setup routines in kernel&lt;br /&gt;
** about 200 __setup_* in System.map on ARM kernel build (98 __setup_str_*)&lt;br /&gt;
** about 230 early_param routines in kernel&lt;br /&gt;
* points to function&lt;br /&gt;
* almost always sets a variable, which would default to 0&lt;br /&gt;
&lt;br /&gt;
=== /proc values ===&lt;br /&gt;
* Includes sysctl values&lt;br /&gt;
* there are approximately 1200, NOT related specifically to a process&lt;br /&gt;
* about 120 per process&lt;br /&gt;
** about 80 related to networking (on my desktop box)&lt;br /&gt;
* 40 others&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
* [[File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-19T19:01:51Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* kernel command line args */ add some info about ARM kernel&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Automatic reduction (intro)===&lt;br /&gt;
The problem with automatic reduction is that &amp;quot;the system&amp;quot; doesn't know what&lt;br /&gt;
software is needed and what is not.  there needs to be a way to tell it&lt;br /&gt;
about things that are not going to be used.&lt;br /&gt;
&lt;br /&gt;
=== auto-reduce - story of 8 bytes of bloat ===&lt;br /&gt;
Story of the conditional check in kdb:&lt;br /&gt;
* I found a bug in kdb, when a particular option was using in the configuration file&lt;br /&gt;
* not everyone uses the configuration file&lt;br /&gt;
* not everyone uses the particular option&lt;br /&gt;
* bug only triggered in those circumstances&lt;br /&gt;
* I wrote a small patch, to guard against use of a variable prematurely&lt;br /&gt;
* problem: all users of KDB now have this check, and suffer this overhead&lt;br /&gt;
** it wasn't much, just a single compare&lt;br /&gt;
** but this is how bloat builds up over time&lt;br /&gt;
** It bothered me because I knew most people didn't need the check&lt;br /&gt;
* &amp;quot;correct&amp;quot; solution would be to parse the config file, and make the code compile-time configurable&lt;br /&gt;
** this adds more complexity than it is worth.&lt;br /&gt;
&lt;br /&gt;
=== generalizing the problem of bloat ===&lt;br /&gt;
System doesn't know inputs:&lt;br /&gt;
&lt;br /&gt;
* It's very easy to configure the kernel to omit the driver for missing hardware.&lt;br /&gt;
* It's very difficult to configure the kernel to omit error handling for bugs that &lt;br /&gt;
will never occur due to fixed use cases.&lt;br /&gt;
&lt;br /&gt;
=== An example of fixed input (uid in kernel) ===&lt;br /&gt;
* throughout the kernel, there are references to uid&lt;br /&gt;
** comparisons, storing, referencing&lt;br /&gt;
* it turns out this is set by setuid(), by the 'login' program.&lt;br /&gt;
** login does a lookup and validates user account name in /etc/passwd&lt;br /&gt;
* what if /etc/passwd only has 'root' and no others?&lt;br /&gt;
* setuid() could only be called with a value of 0&lt;br /&gt;
* can I encode this constraint on the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== types of constraints ===&lt;br /&gt;
There are numerous other examples of constraints:&lt;br /&gt;
* kernel command line arguments never used&lt;br /&gt;
* syscalls never called by any program&lt;br /&gt;
* parameters that are never used, or parameter values that are never passed in&lt;br /&gt;
** e.g. ioctl value that is not possible&lt;br /&gt;
** this only works in a fixed&lt;br /&gt;
* /proc values never referenced&lt;br /&gt;
* /sys values never referenced&lt;br /&gt;
&lt;br /&gt;
=== also goes back up to user-space ===&lt;br /&gt;
* return values that are not possible&lt;br /&gt;
&lt;br /&gt;
=== kernel command line args ===&lt;br /&gt;
* Documented in Documentation/kernel-parameters.txt&lt;br /&gt;
* defined with __setup(), from include/linux/init.h&lt;br /&gt;
** approximately 480 __setup routines in kernel&lt;br /&gt;
** about 200 __setup_* in System.map on ARM kernel build (98 __setup_str_*)&lt;br /&gt;
* points to function&lt;br /&gt;
* almost always sets a variable, which would default to 0&lt;br /&gt;
&lt;br /&gt;
=== /proc values ===&lt;br /&gt;
* Includes sysctl values&lt;br /&gt;
* there are approximately 1200, NOT related specifically to a process&lt;br /&gt;
* about 120 per process&lt;br /&gt;
** about 80 related to networking (on my desktop box)&lt;br /&gt;
* 40 others&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
* [[File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Reasons_to_participate_in_open_source</id>
		<title>Reasons to participate in open source</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Reasons_to_participate_in_open_source"/>
				<updated>2013-04-19T17:46:14Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: add some more info&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird's notes on participating in open source.&lt;br /&gt;
&lt;br /&gt;
== Other people's talks ==&lt;br /&gt;
Many people have written papers or given presentations on the value of participating in open source.&lt;br /&gt;
Over time, I may collect the ones I know about, and list them here.&lt;br /&gt;
&lt;br /&gt;
(For starters, there are the excellent presentations by Andrew Morton and James Bottomly)&lt;br /&gt;
Andrew Morton gave one of the best talks I have heard, at Embedded Linux Conference 2008&lt;br /&gt;
See: [[Session:The_Relationship_Between_kernel.org_Development_and_the_Use_of_Linux_for_Embedded_Applications_ELC_2008]]&lt;br /&gt;
&lt;br /&gt;
James Bottomley gave a great talk at LinuxCon Japan, 2011 (I think), where he described the&lt;br /&gt;
reasons that it is valuable for a company to contribute to open source.  I'll try to get a link&lt;br /&gt;
to the talk and any video that was recorded.&lt;br /&gt;
&lt;br /&gt;
I'm sure that Greg KH has given talks of this nature as well.&lt;br /&gt;
&lt;br /&gt;
== my old talks ==&lt;br /&gt;
[Note to self: Look up my old talks.]  In the early days, I presented on this topic a lot, but&lt;br /&gt;
I haven't recently.  However, many companies still don't participate in open source like they should.&lt;br /&gt;
I should put some links to my own talks here.&lt;br /&gt;
&lt;br /&gt;
== Metaphors ==&lt;br /&gt;
=== Pioneers ===&lt;br /&gt;
Some of my ancestors crossed the plains and mountains of the western United States as pioneers.&lt;br /&gt;
One interesting story from this era, was that earlier parties would perform work for parties that&lt;br /&gt;
were to come subsequently.  In one extreme example, one group of pioneers planted seeds, another&lt;br /&gt;
group of pioneers tended crops, and a later group of pioneers harvested the crops, all along a route&lt;br /&gt;
that none of them expected to visit again.  The first two groups put in labor that benefited the third&lt;br /&gt;
group.&lt;br /&gt;
&lt;br /&gt;
One question that arises, is how could the third group contribute to the first group's work?&lt;br /&gt;
They couldn't plant the seeds, because they weren't physically there.&lt;br /&gt;
They couldn't break the trail, because they came later.  Even though they benefited from the work,&lt;br /&gt;
they couldn't help with it initially.&lt;br /&gt;
&lt;br /&gt;
Now, software development is not nearly as linear a pursuit as is crossing (what to them was) a wilderness.&lt;br /&gt;
However, there are parallels.&lt;br /&gt;
&lt;br /&gt;
Companies often don't have the expertise to contribute upstream.  Even long-term users of open source&lt;br /&gt;
software may be several versions behind the upstream releases of software they are using.  This makes&lt;br /&gt;
it difficult for them to contribute in a meaningful way.&lt;br /&gt;
&lt;br /&gt;
However, companies can hire experts, and have them work directly on the upstream source.  This would&lt;br /&gt;
be similar to a pioneer company sending a few of their individuals in the advance parties, going ahead&lt;br /&gt;
of them to help guide the initial group, and help break the trail for their passage.&lt;br /&gt;
&lt;br /&gt;
One difficulty is that it's very difficult to measure the value of such people to the group that sends&lt;br /&gt;
them ahead.&lt;br /&gt;
&lt;br /&gt;
=== standards organizations ===&lt;br /&gt;
Companies used to put a lot of effort into standards organizations, because by controlling&lt;br /&gt;
what standards were adopted they could help themselves and hurt their competitors.&lt;br /&gt;
When standards are needed for interoperability, if a company invests in a particular technology&lt;br /&gt;
by developing it for market and integrating it into their products, if that technology becomes a&lt;br /&gt;
standard, they have leveraged their investment.  Network effects make that technology more valuable.&lt;br /&gt;
If something does not become a standard, then the opposite happens.  Network effects tend to&lt;br /&gt;
discourage adoption of the technology, and the investment can be a total loss.&lt;br /&gt;
&lt;br /&gt;
For this reasons, for particular standards there were huge, costly battles to promote one &lt;br /&gt;
technology or another.&lt;br /&gt;
&lt;br /&gt;
This is tree to some degree with open source software as well.  A first-mover in providing&lt;br /&gt;
an upstream implementation has an advantage against their competitors.  Admittedly, the&lt;br /&gt;
advantage is less, since competitors can use the open source code sooner than they would&lt;br /&gt;
if the implementations were proprietary and unavailable.  However, there is still an advantage&lt;br /&gt;
to the entity that has their code accepted upstream.&lt;br /&gt;
&lt;br /&gt;
== List of reasons ==&lt;br /&gt;
* control of direction&lt;br /&gt;
* first-move advantage&lt;br /&gt;
* reduced maintenance cost (vs. maintaining out of tree)&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Reasons_to_participate_in_open_source</id>
		<title>Reasons to participate in open source</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Reasons_to_participate_in_open_source"/>
				<updated>2013-04-19T17:38:47Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: add pioneer metaphor&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird's notes on participating in open source.&lt;br /&gt;
&lt;br /&gt;
== Other people's talks ==&lt;br /&gt;
Many people have written papers or given presentations on the value of participating in open source.&lt;br /&gt;
Over time, I may collect the ones I know about, and list them here.&lt;br /&gt;
&lt;br /&gt;
(For starters, there are the excellent presentations by Andrew Morton and James Bottomly)&lt;br /&gt;
Andrew Morton gave one of the best talks I have heard, at Embedded Linux Conference 2008&lt;br /&gt;
See: [[Session:The_Relationship_Between_kernel.org_Development_and_the_Use_of_Linux_for_Embedded_Applications_ELC_2008]]&lt;br /&gt;
&lt;br /&gt;
James Bottomley gave a great talk at LinuxCon Japan, 2011 (I think), where he described the&lt;br /&gt;
reasons that it is valuable for a company to contribute to open source.  I'll try to get a link&lt;br /&gt;
to the talk and any video that was recorded.&lt;br /&gt;
&lt;br /&gt;
I'm sure that Greg KH has given talks of this nature as well.&lt;br /&gt;
&lt;br /&gt;
== my old talks ==&lt;br /&gt;
[Note to self: Look up my old talks.]  In the early days, I presented on this topic a lot, but&lt;br /&gt;
I haven't recently.  However, many companies still don't participate in open source like they should.&lt;br /&gt;
I should put some links to my own talks here.&lt;br /&gt;
&lt;br /&gt;
== Metaphors ==&lt;br /&gt;
=== Pioneers ===&lt;br /&gt;
Some of my ancestors crossed the plains and mountains of the western United States as pioneers.&lt;br /&gt;
One interesting story from this era, was that earlier parties would perform work for parties that&lt;br /&gt;
were to come subsequently.  In one extreme example, one group of pioneers planted seeds, another&lt;br /&gt;
group of pioneers tended crops, and a later group of pioneers harvested the crops, all along a route&lt;br /&gt;
that none of them expected to visit again.  The first two groups put in labor that benefited the third&lt;br /&gt;
group.&lt;br /&gt;
&lt;br /&gt;
One question that arises, is how could the third group contribute to the first group's work?&lt;br /&gt;
They couldn't plant the seeds, because they weren't physically there.&lt;br /&gt;
They couldn't break the trail, because they came later.  Even though they benefited from the work,&lt;br /&gt;
they couldn't help with it initially.&lt;br /&gt;
&lt;br /&gt;
Now, software development is not nearly as linear a pursuit as is crossing (what to them was) a wilderness.&lt;br /&gt;
However, there are parallels.&lt;br /&gt;
&lt;br /&gt;
Companies often don't have the expertise to contribute upstream.  Even long-term users of open source&lt;br /&gt;
software may be several versions behind the upstream releases of software they are using.  This makes&lt;br /&gt;
it difficult for them to contribute in a meaningful way.&lt;br /&gt;
&lt;br /&gt;
However, companies can hire experts, and have them work directly on the upstream source.  This would&lt;br /&gt;
be similar to a pioneer company sending a few of their individuals in the advance parties, going ahead&lt;br /&gt;
of them to help guide the initial group, and help break the trail for their passage.&lt;br /&gt;
&lt;br /&gt;
One difficulty is that it's very difficult to measure the value of such people to the group that sends&lt;br /&gt;
them ahead.&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/User:Tim_Bird</id>
		<title>User:Tim Bird</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/User:Tim_Bird"/>
				<updated>2013-04-19T17:17:25Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Bookmarks for things I'm working on in this wiki */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird is a Linux developer working for Sony Network Entertainment - a subsidiary of Sony Corporation.&lt;br /&gt;
&lt;br /&gt;
Tim is Chair of the Architecture Group of the [http://www.linuxfoundation.org/collaborate/workgroups/celf CE Workgroup of the Linux Foundation] (formerly the [[CE Linux Forum]]).  In the past, Tim worked at Lineo, Caldera, and Novell.&lt;br /&gt;
&lt;br /&gt;
== Current contact information ==&lt;br /&gt;
You can contact Tim at the following address, which has been made spam-resistant:&lt;br /&gt;
&lt;br /&gt;
* e-mail: tim (dot) bird (at) am (dot) sony (dot) com.&lt;br /&gt;
&lt;br /&gt;
== Bookmarks for things I'm working on in this wiki ==&lt;br /&gt;
* [[System Size Auto-Reduction]] - presentation for LCJ 2013 - wrapping up my auto-reduce work&lt;br /&gt;
* [[Tim's Tips and Tricks]] - Miscelaneous development tips gleaned over the years&lt;br /&gt;
* [[Ftrace]] - with my knowledge of ftrace, this page really needs a fixup&lt;br /&gt;
* [[Embedded linux status]] - list of things for embedded linux status reports (which I do frequently)&lt;br /&gt;
* [[elinux issues]] - list of things that need fixing&lt;br /&gt;
* [[Embedded Wiki wanted features]]&lt;br /&gt;
* [[Kernel Timer Systems]] - needs a major overhaul to bring it up to date&lt;br /&gt;
* [[Reasons to participate in open source]] - my own thoughts on open source contributions&lt;br /&gt;
&lt;br /&gt;
* [[Android Boot-time Readahead]]&lt;br /&gt;
* [[Beginning Programming]]&lt;br /&gt;
&lt;br /&gt;
=== Pages needing LOTS of HELP!! ===&lt;br /&gt;
Here are some high priority candidates for work...&lt;br /&gt;
* [[Android Kernel Build]]&lt;br /&gt;
&lt;br /&gt;
=== Samples and help ===&lt;br /&gt;
* See [[Table Examples]]&lt;br /&gt;
&lt;br /&gt;
== Areas of interest ==&lt;br /&gt;
Here are some things Tim is interested in on this site:&lt;br /&gt;
* [[Other wikis]] - a list of other wikis to examine the design of&lt;br /&gt;
* [http://www.linuxworld.com/news/2006/120606-closed-modules1.html?page=1 Good article on US case law related to closed-source kernel modules]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikibooks.org/wiki/MediaWiki_Administrator's_Handbook MediaWiki Administrator's Handbook]&lt;br /&gt;
&lt;br /&gt;
== Things I want to add to the wiki ==&lt;br /&gt;
* diffinfo, qdiff, reisolate - see [[Diff And Patch Tricks]], [[Source Management Tools]], and&lt;br /&gt;
[[Tim's patch management tools]]&lt;br /&gt;
* review each portal page and try to hook up material I know is orphaned&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
[http://www.edn.com/article/CA6582852.html Free software encircles embedded design] Warren Web, EDN 8/7/2008&lt;br /&gt;
&lt;br /&gt;
=== Videos, Articles, Presentations of, by or about me ===&lt;br /&gt;
* http://video.linuxfoundation.org/video/1654 - JLS 2009 - Status of Embedded Linux presentation&lt;br /&gt;
* http://www.vimeo.com/8042326 - Measuring Function Duration with Ftrace&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Tim%27s_Tips_and_Tricks</id>
		<title>Tim's Tips and Tricks</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Tim%27s_Tips_and_Tricks"/>
				<updated>2013-04-19T16:53:59Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Git tips */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sources ==&lt;br /&gt;
* Hugh Blemings - Learning Kernel Hacking from clever people - [[Media:Elc-us-2008-slides-final.pdf|elc-us-2008-slides-final.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Ideas for individual tips ==&lt;br /&gt;
&lt;br /&gt;
=== Git tips ===&lt;br /&gt;
* Show when a commit was entered in the tree: &amp;quot;git describe &amp;lt;commit&amp;gt;&amp;quot;&lt;br /&gt;
* Show the version of software where a change first appeared: &amp;quot;git describe --contains &amp;lt;commit&amp;gt;&amp;quot;&lt;br /&gt;
* git log &amp;lt;file&amp;gt;  # narrow scope of log&lt;br /&gt;
** git log &amp;lt;dir&amp;gt;&lt;br /&gt;
** git lg [&amp;lt;dir_or_file&amp;gt;]   # nice summary&lt;br /&gt;
*** alias.lg=log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative&lt;br /&gt;
*** how to do a git alias, with colors!&lt;br /&gt;
&lt;br /&gt;
* find the commit for a specific line in a file: &amp;quot;git annotate &amp;lt;file&amp;gt; | grep &amp;lt;regex_of_line&amp;gt;&amp;quot;&lt;br /&gt;
** Then do: &amp;quot;git show &amp;lt;commit_of_interest&amp;gt;&amp;quot;&lt;br /&gt;
** This is good to find out: why is it here? who did this?, when did it get changed to this?&lt;br /&gt;
&lt;br /&gt;
* git bisect&lt;br /&gt;
&lt;br /&gt;
* git proxy (finally!!)&lt;br /&gt;
** See [[Using git with a proxy]]&lt;br /&gt;
&lt;br /&gt;
* git grep (grep only git-managed files) (credit to Thomas Petazzoni)&lt;br /&gt;
&lt;br /&gt;
Note also that you can use 'git grep', that will only grep the source&lt;br /&gt;
files that are under version control, skipping all object files and&lt;br /&gt;
other generated files you may have in your tree, if you're not doing&lt;br /&gt;
out of tree builds. I use 'git grep' routinely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Reflog: Git reflog is great for finding commits that you have 'lost' but how do you see where they went? I use reflog piped into gitk....&lt;br /&gt;
** git reflog |  awk '{ print $1 }' | xargs gitk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* several people said: &amp;quot;git rebase -i&amp;quot; as a replacement for quilt&lt;br /&gt;
** git add -p&lt;br /&gt;
** git commit --amend&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For fixup commits,&lt;br /&gt;
* git commit --fixup &amp;lt;commit-id&amp;gt;&lt;br /&gt;
followed by&lt;br /&gt;
* git rebase origin/master --autosquash&lt;br /&gt;
- Automatically updates an existing patch&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
More miscellaneous items&lt;br /&gt;
* git add -i &amp;lt;files&amp;gt; - add interactive (select individual hunks)&lt;br /&gt;
* git log -G&amp;lt;search_string&amp;gt; --all&lt;br /&gt;
** show log entries for the entire git history (including deleted files) for the search string on any added or removed lines&lt;br /&gt;
* git log -- file1&lt;br /&gt;
** show log for deleted file 'file1'&lt;br /&gt;
&lt;br /&gt;
=== patch management ===&lt;br /&gt;
* quilt - patches as first class objects&lt;br /&gt;
** git for development work, then convert to quilt patches&lt;br /&gt;
** git rebase --interactive&lt;br /&gt;
* precommit - quilt pop -a, basediff, quilt push -a, scripts/fix-filemodes.sh&lt;br /&gt;
* diffinfo - my own tool for managing patches&lt;br /&gt;
** splitting a patch: splitpatch - tool to break patches apart&lt;br /&gt;
&lt;br /&gt;
=== source finding ===&lt;br /&gt;
* cgrep, mgrep, confgrep, kgrep, armcgrep, jgrep - scan C code, Makefiles, .config, Kconfig, arm C files, and java code, respectively for a search pattern&lt;br /&gt;
** thin wrappers on 'find . [some conditions] -exec egrep $1'&lt;br /&gt;
* finds - find a string in a set of files (Credit to Todd Fischer of RidgeRun)&lt;br /&gt;
&lt;br /&gt;
I use a tool, finds, I got from someone about 15 years ago.  It simply&lt;br /&gt;
does a recursive look for a string in all files of interest in a&lt;br /&gt;
directory tree.  When I get a big tarball of code that I don't intend to&lt;br /&gt;
build, but want to grab some logic, I use finds.  I have created a&lt;br /&gt;
variety of variations of finds (which I usually later throw away) as my&lt;br /&gt;
search needs change.  Essentially finds is&lt;br /&gt;
&lt;br /&gt;
 find . -exec fgrep -H &amp;quot;$1&amp;quot; {} \;&lt;br /&gt;
&lt;br /&gt;
but with lots and lots of other qualifiers.  You can see a usable&lt;br /&gt;
version at&lt;br /&gt;
&lt;br /&gt;
https://www.ridgerun.com/developer/wiki/index.php/Tip_of_the_day#finds_-_find_a_string_in_common_text_files&lt;br /&gt;
&lt;br /&gt;
=== kernel debugging ===&lt;br /&gt;
* use of fs/sync.c:SYSCALL_DEFINE0(sync) for user-space triggered printks&lt;br /&gt;
* use of qemu for kernel debugging&lt;br /&gt;
&lt;br /&gt;
=== testing ===&lt;br /&gt;
* tbtorture.sh - for stress testing&lt;br /&gt;
&lt;br /&gt;
=== board handling ===&lt;br /&gt;
* consistent board setup (including remote access)&lt;br /&gt;
** connections: serial, network, power (web-based control) [images]&lt;br /&gt;
*** power port controller [image]&lt;br /&gt;
** Usually use tftp boot kernel, with NFS rootfs&lt;br /&gt;
*** but can do other setups: feed kernel through serial line, put kernel on SD card using known-good kernel, etc.&lt;br /&gt;
&lt;br /&gt;
* [[Ttc]] - command line tool for board control&lt;br /&gt;
** abstracts differences between boards&lt;br /&gt;
** allows for board sharing (ttc reserve)&lt;br /&gt;
** everything is scritable, and remotable&lt;br /&gt;
** object-oriented: inheritance to quickly modify attributes of a board &amp;quot;class&amp;quot;&lt;br /&gt;
** items abstracted:&lt;br /&gt;
*** kernel source, toolchain, architecture, defconfig, kernel image name, tool paths&lt;br /&gt;
*** kernel build, install&lt;br /&gt;
*** board console access, reboot, run arbitrary commands, reset&lt;br /&gt;
*** filesystem access (copy from/to)&lt;br /&gt;
&lt;br /&gt;
Finding the ttyUSB* for a board connected to a multi-port hub:&lt;br /&gt;
(Credit to Todd Fischer of RidgeRun):&lt;br /&gt;
A recurring problem I had was finding the right /dev/ttyUSB? device.  I&lt;br /&gt;
have a nice USB to 4 serial port adaptor in a metal box I have screwed&lt;br /&gt;
to my bench.  I also use several USB serial dongles.  For reasons I&lt;br /&gt;
don't understand, they change association (at least under Ubuntu).  I&lt;br /&gt;
created two scripts lsuart and uart.  The output of lsuart gives me&lt;br /&gt;
information about the serial ports, like&lt;br /&gt;
&lt;br /&gt;
 Available USB UARTs&lt;br /&gt;
 -------------------&lt;br /&gt;
 a:/dev/ttyUSB0 FTDI USB Serial Device 0000:00:04.1-4.1 (4 port jack A)&lt;br /&gt;
 b:/dev/ttyUSB1 FTDI USB Serial Device 0000:00:04.1-4.2 (4 port jack B)&lt;br /&gt;
 c:/dev/ttyUSB2 FTDI USB Serial Device 0000:00:04.1-4.3 (4 port jack C)&lt;br /&gt;
 :/dev/ttyUSB3 pl2303 0000:00:02.1-4.2 ()&lt;br /&gt;
 d:/dev/ttyUSB4 FTDI USB Serial Device 0000:00:04.1-4.4 (4 port jack D)&lt;br /&gt;
&lt;br /&gt;
 In use&lt;br /&gt;
 ------&lt;br /&gt;
 /dev/ttyUSB4: 9705: picocom -b 115200 -r -l /dev/ttyUSB4&lt;br /&gt;
&lt;br /&gt;
I gave names (a, b, c, d) to the 4 fixed uarts.  Now I look at which&lt;br /&gt;
port my serial cable is plugged into - say the 3rd one, which I call c,&lt;br /&gt;
and I can fire up picocom with the standard setting using&lt;br /&gt;
&lt;br /&gt;
 uart c&lt;br /&gt;
&lt;br /&gt;
Sometimes I can't find a terminal session (too many windows open), so I&lt;br /&gt;
use the PID from the In use section of the lsuart output to kill it.&lt;br /&gt;
&lt;br /&gt;
If others have the &amp;quot;where is my USB serial port&amp;quot; problem, I can love up&lt;br /&gt;
my shell script (lsuart is a symbolic link to uart), which is around 200&lt;br /&gt;
lines of ugly sysfs parsing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* ser2net (Credit to Jean-Christophe PLAGNIOL-VILLARD)&lt;br /&gt;
&lt;br /&gt;
* ptxdist and barebox (Credit to Robert Schwebel)&lt;br /&gt;
** can load kernel via nfs server (does not require root privileges on host)&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
How to copy data over serial line to Linux: (credit to Alan Carvalho de Assis)&lt;br /&gt;
http://acassis.wordpress.com/2012/10/21/how-to-transfer-files-to-a-linux-embedded-system-over-serial/&lt;br /&gt;
&lt;br /&gt;
=== personal productivity ===&lt;br /&gt;
* my workflow:&lt;br /&gt;
** different day for each topic area&lt;br /&gt;
** today script&lt;br /&gt;
* multiple todo's, NOTES all over the place (several in each work directory)&lt;br /&gt;
** must do a context save in each directory, before moving on&lt;br /&gt;
** git branch is essential - commit changes (even if flaky) before moving on&lt;br /&gt;
&lt;br /&gt;
* my favoriate mailing lists:&lt;br /&gt;
** sorry, but linux-embedded seems to be dead&lt;br /&gt;
** lkml, linux-arm, yocto-devel&lt;br /&gt;
** celinux-dev&lt;br /&gt;
&lt;br /&gt;
* attend conferences, talk to smart people&lt;br /&gt;
* conferences I attend:&lt;br /&gt;
** ELC, ELCE, linuxcon US, Linuxcon Japan, Linuxcon Europe (by serendipity)&lt;br /&gt;
** what about plumbers??  other regional events??&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Tim%27s_Tips_and_Tricks</id>
		<title>Tim's Tips and Tricks</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Tim%27s_Tips_and_Tricks"/>
				<updated>2013-04-19T16:52:42Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Git tips */ add a few more tips&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Sources ==&lt;br /&gt;
* Hugh Blemings - Learning Kernel Hacking from clever people - [[Media:Elc-us-2008-slides-final.pdf|elc-us-2008-slides-final.pdf]]&lt;br /&gt;
&lt;br /&gt;
== Ideas for individual tips ==&lt;br /&gt;
&lt;br /&gt;
=== Git tips ===&lt;br /&gt;
* Show when a commit was entered in the tree: &amp;quot;git describe &amp;lt;commit&amp;gt;&amp;quot;&lt;br /&gt;
* Show the version of software where a change first appeared: &amp;quot;git describe --contains &amp;lt;commit&amp;gt;&amp;quot;&lt;br /&gt;
* git log &amp;lt;file&amp;gt;  # narrow scope of log&lt;br /&gt;
** git log &amp;lt;dir&amp;gt;&lt;br /&gt;
** git lg [&amp;lt;dir_or_file&amp;gt;]   # nice summary&lt;br /&gt;
*** alias.lg=log --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr %an)%Creset' --abbrev-commit --date=relative&lt;br /&gt;
*** how to do a git alias, with colors!&lt;br /&gt;
&lt;br /&gt;
* find the commit for a specific line in a file: &amp;quot;git annotate &amp;lt;file&amp;gt; | grep &amp;lt;regex_of_line&amp;gt;&amp;quot;&lt;br /&gt;
** Then do: &amp;quot;git show &amp;lt;commit_of_interest&amp;gt;&amp;quot;&lt;br /&gt;
** This is good to find out: why is it here? who did this?, when did it get changed to this?&lt;br /&gt;
&lt;br /&gt;
* git bisect&lt;br /&gt;
&lt;br /&gt;
* git proxy (finally!!)&lt;br /&gt;
** See [[Using git with a proxy]]&lt;br /&gt;
&lt;br /&gt;
* git grep (grep only git-managed files) (credit to Thomas Petazzoni)&lt;br /&gt;
&lt;br /&gt;
Note also that you can use 'git grep', that will only grep the source&lt;br /&gt;
files that are under version control, skipping all object files and&lt;br /&gt;
other generated files you may have in your tree, if you're not doing&lt;br /&gt;
out of tree builds. I use 'git grep' routinely.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Reflog: Git reflog is great for finding commits that you have 'lost' but how do you see where they went? I use reflog piped into gitk....&lt;br /&gt;
** git reflog |  awk '{ print $1 }' | xargs gitk&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* several people said: &amp;quot;git rebase -i&amp;quot; as a replacement for quilt&lt;br /&gt;
** git add -p&lt;br /&gt;
** git commit --amend&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For fixup commits,&lt;br /&gt;
* git commit --fixup &amp;lt;commit-id&amp;gt;&lt;br /&gt;
followed by&lt;br /&gt;
* git rebase origin/master --autosquash&lt;br /&gt;
- Automatically updates an existing patch&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
More miscellaneous items&lt;br /&gt;
* git add -i &amp;lt;files&amp;gt; - add interactive (select individual hunks)&lt;br /&gt;
* git log -G&amp;lt;search_string&amp;gt; --all&lt;br /&gt;
** show log entries for the entire git history (including deleted files) for the search string on any added or removed lines&lt;br /&gt;
&lt;br /&gt;
=== patch management ===&lt;br /&gt;
* quilt - patches as first class objects&lt;br /&gt;
** git for development work, then convert to quilt patches&lt;br /&gt;
** git rebase --interactive&lt;br /&gt;
* precommit - quilt pop -a, basediff, quilt push -a, scripts/fix-filemodes.sh&lt;br /&gt;
* diffinfo - my own tool for managing patches&lt;br /&gt;
** splitting a patch: splitpatch - tool to break patches apart&lt;br /&gt;
&lt;br /&gt;
=== source finding ===&lt;br /&gt;
* cgrep, mgrep, confgrep, kgrep, armcgrep, jgrep - scan C code, Makefiles, .config, Kconfig, arm C files, and java code, respectively for a search pattern&lt;br /&gt;
** thin wrappers on 'find . [some conditions] -exec egrep $1'&lt;br /&gt;
* finds - find a string in a set of files (Credit to Todd Fischer of RidgeRun)&lt;br /&gt;
&lt;br /&gt;
I use a tool, finds, I got from someone about 15 years ago.  It simply&lt;br /&gt;
does a recursive look for a string in all files of interest in a&lt;br /&gt;
directory tree.  When I get a big tarball of code that I don't intend to&lt;br /&gt;
build, but want to grab some logic, I use finds.  I have created a&lt;br /&gt;
variety of variations of finds (which I usually later throw away) as my&lt;br /&gt;
search needs change.  Essentially finds is&lt;br /&gt;
&lt;br /&gt;
 find . -exec fgrep -H &amp;quot;$1&amp;quot; {} \;&lt;br /&gt;
&lt;br /&gt;
but with lots and lots of other qualifiers.  You can see a usable&lt;br /&gt;
version at&lt;br /&gt;
&lt;br /&gt;
https://www.ridgerun.com/developer/wiki/index.php/Tip_of_the_day#finds_-_find_a_string_in_common_text_files&lt;br /&gt;
&lt;br /&gt;
=== kernel debugging ===&lt;br /&gt;
* use of fs/sync.c:SYSCALL_DEFINE0(sync) for user-space triggered printks&lt;br /&gt;
* use of qemu for kernel debugging&lt;br /&gt;
&lt;br /&gt;
=== testing ===&lt;br /&gt;
* tbtorture.sh - for stress testing&lt;br /&gt;
&lt;br /&gt;
=== board handling ===&lt;br /&gt;
* consistent board setup (including remote access)&lt;br /&gt;
** connections: serial, network, power (web-based control) [images]&lt;br /&gt;
*** power port controller [image]&lt;br /&gt;
** Usually use tftp boot kernel, with NFS rootfs&lt;br /&gt;
*** but can do other setups: feed kernel through serial line, put kernel on SD card using known-good kernel, etc.&lt;br /&gt;
&lt;br /&gt;
* [[Ttc]] - command line tool for board control&lt;br /&gt;
** abstracts differences between boards&lt;br /&gt;
** allows for board sharing (ttc reserve)&lt;br /&gt;
** everything is scritable, and remotable&lt;br /&gt;
** object-oriented: inheritance to quickly modify attributes of a board &amp;quot;class&amp;quot;&lt;br /&gt;
** items abstracted:&lt;br /&gt;
*** kernel source, toolchain, architecture, defconfig, kernel image name, tool paths&lt;br /&gt;
*** kernel build, install&lt;br /&gt;
*** board console access, reboot, run arbitrary commands, reset&lt;br /&gt;
*** filesystem access (copy from/to)&lt;br /&gt;
&lt;br /&gt;
Finding the ttyUSB* for a board connected to a multi-port hub:&lt;br /&gt;
(Credit to Todd Fischer of RidgeRun):&lt;br /&gt;
A recurring problem I had was finding the right /dev/ttyUSB? device.  I&lt;br /&gt;
have a nice USB to 4 serial port adaptor in a metal box I have screwed&lt;br /&gt;
to my bench.  I also use several USB serial dongles.  For reasons I&lt;br /&gt;
don't understand, they change association (at least under Ubuntu).  I&lt;br /&gt;
created two scripts lsuart and uart.  The output of lsuart gives me&lt;br /&gt;
information about the serial ports, like&lt;br /&gt;
&lt;br /&gt;
 Available USB UARTs&lt;br /&gt;
 -------------------&lt;br /&gt;
 a:/dev/ttyUSB0 FTDI USB Serial Device 0000:00:04.1-4.1 (4 port jack A)&lt;br /&gt;
 b:/dev/ttyUSB1 FTDI USB Serial Device 0000:00:04.1-4.2 (4 port jack B)&lt;br /&gt;
 c:/dev/ttyUSB2 FTDI USB Serial Device 0000:00:04.1-4.3 (4 port jack C)&lt;br /&gt;
 :/dev/ttyUSB3 pl2303 0000:00:02.1-4.2 ()&lt;br /&gt;
 d:/dev/ttyUSB4 FTDI USB Serial Device 0000:00:04.1-4.4 (4 port jack D)&lt;br /&gt;
&lt;br /&gt;
 In use&lt;br /&gt;
 ------&lt;br /&gt;
 /dev/ttyUSB4: 9705: picocom -b 115200 -r -l /dev/ttyUSB4&lt;br /&gt;
&lt;br /&gt;
I gave names (a, b, c, d) to the 4 fixed uarts.  Now I look at which&lt;br /&gt;
port my serial cable is plugged into - say the 3rd one, which I call c,&lt;br /&gt;
and I can fire up picocom with the standard setting using&lt;br /&gt;
&lt;br /&gt;
 uart c&lt;br /&gt;
&lt;br /&gt;
Sometimes I can't find a terminal session (too many windows open), so I&lt;br /&gt;
use the PID from the In use section of the lsuart output to kill it.&lt;br /&gt;
&lt;br /&gt;
If others have the &amp;quot;where is my USB serial port&amp;quot; problem, I can love up&lt;br /&gt;
my shell script (lsuart is a symbolic link to uart), which is around 200&lt;br /&gt;
lines of ugly sysfs parsing.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* ser2net (Credit to Jean-Christophe PLAGNIOL-VILLARD)&lt;br /&gt;
&lt;br /&gt;
* ptxdist and barebox (Credit to Robert Schwebel)&lt;br /&gt;
** can load kernel via nfs server (does not require root privileges on host)&lt;br /&gt;
&lt;br /&gt;
---&lt;br /&gt;
How to copy data over serial line to Linux: (credit to Alan Carvalho de Assis)&lt;br /&gt;
http://acassis.wordpress.com/2012/10/21/how-to-transfer-files-to-a-linux-embedded-system-over-serial/&lt;br /&gt;
&lt;br /&gt;
=== personal productivity ===&lt;br /&gt;
* my workflow:&lt;br /&gt;
** different day for each topic area&lt;br /&gt;
** today script&lt;br /&gt;
* multiple todo's, NOTES all over the place (several in each work directory)&lt;br /&gt;
** must do a context save in each directory, before moving on&lt;br /&gt;
** git branch is essential - commit changes (even if flaky) before moving on&lt;br /&gt;
&lt;br /&gt;
* my favoriate mailing lists:&lt;br /&gt;
** sorry, but linux-embedded seems to be dead&lt;br /&gt;
** lkml, linux-arm, yocto-devel&lt;br /&gt;
** celinux-dev&lt;br /&gt;
&lt;br /&gt;
* attend conferences, talk to smart people&lt;br /&gt;
* conferences I attend:&lt;br /&gt;
** ELC, ELCE, linuxcon US, Linuxcon Japan, Linuxcon Europe (by serendipity)&lt;br /&gt;
** what about plumbers??  other regional events??&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-18T22:32:07Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: add some stuff about kernel command line args and /proc entries&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Automatic reduction (intro)===&lt;br /&gt;
The problem with automatic reduction is that &amp;quot;the system&amp;quot; doesn't know what&lt;br /&gt;
software is needed and what is not.  there needs to be a way to tell it&lt;br /&gt;
about things that are not going to be used.&lt;br /&gt;
&lt;br /&gt;
=== auto-reduce - story of 8 bytes of bloat ===&lt;br /&gt;
Story of the conditional check in kdb:&lt;br /&gt;
* I found a bug in kdb, when a particular option was using in the configuration file&lt;br /&gt;
* not everyone uses the configuration file&lt;br /&gt;
* not everyone uses the particular option&lt;br /&gt;
* bug only triggered in those circumstances&lt;br /&gt;
* I wrote a small patch, to guard against use of a variable prematurely&lt;br /&gt;
* problem: all users of KDB now have this check, and suffer this overhead&lt;br /&gt;
** it wasn't much, just a single compare&lt;br /&gt;
** but this is how bloat builds up over time&lt;br /&gt;
** It bothered me because I knew most people didn't need the check&lt;br /&gt;
* &amp;quot;correct&amp;quot; solution would be to parse the config file, and make the code compile-time configurable&lt;br /&gt;
** this adds more complexity than it is worth.&lt;br /&gt;
&lt;br /&gt;
=== generalizing the problem of bloat ===&lt;br /&gt;
System doesn't know inputs:&lt;br /&gt;
&lt;br /&gt;
* It's very easy to configure the kernel to omit the driver for missing hardware.&lt;br /&gt;
* It's very difficult to configure the kernel to omit error handling for bugs that &lt;br /&gt;
will never occur due to fixed use cases.&lt;br /&gt;
&lt;br /&gt;
=== An example of fixed input (uid in kernel) ===&lt;br /&gt;
* throughout the kernel, there are references to uid&lt;br /&gt;
** comparisons, storing, referencing&lt;br /&gt;
* it turns out this is set by setuid(), by the 'login' program.&lt;br /&gt;
** login does a lookup and validates user account name in /etc/passwd&lt;br /&gt;
* what if /etc/passwd only has 'root' and no others?&lt;br /&gt;
* setuid() could only be called with a value of 0&lt;br /&gt;
* can I encode this constraint on the system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== types of constraints ===&lt;br /&gt;
There are numerous other examples of constraints:&lt;br /&gt;
* kernel command line arguments never used&lt;br /&gt;
* syscalls never called by any program&lt;br /&gt;
* parameters that are never used, or parameter values that are never passed in&lt;br /&gt;
** e.g. ioctl value that is not possible&lt;br /&gt;
** this only works in a fixed&lt;br /&gt;
* /proc values never referenced&lt;br /&gt;
* /sys values never referenced&lt;br /&gt;
&lt;br /&gt;
=== also goes back up to user-space ===&lt;br /&gt;
* return values that are not possible&lt;br /&gt;
&lt;br /&gt;
=== kernel command line args ===&lt;br /&gt;
* Documented in Documentation/kernel-parameters.txt&lt;br /&gt;
* defined with __setup()&lt;br /&gt;
** approximately 480 __setup routines in kernel&lt;br /&gt;
* points to function&lt;br /&gt;
* almost always sets a variable, which would default to 0&lt;br /&gt;
&lt;br /&gt;
=== /proc values ===&lt;br /&gt;
* Includes sysctl values&lt;br /&gt;
* there are approximately 1200, NOT related specifically to a process&lt;br /&gt;
* about 120 per process&lt;br /&gt;
** about 80 related to networking (on my desktop box)&lt;br /&gt;
* 40 others&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
* [[File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-17T18:39:11Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Automatic reduction (intro)===&lt;br /&gt;
The problem with automatic reduction is that &amp;quot;the system&amp;quot; doesn't know what&lt;br /&gt;
software is needed and what is not.  there needs to be a way to tell it&lt;br /&gt;
about things that are not going to be used.&lt;br /&gt;
&lt;br /&gt;
=== auto-reduce - story of 8 bytes of bloat ===&lt;br /&gt;
Story of the conditional check in kdb:&lt;br /&gt;
* I found a bug in kdb, when a particular option was using in the configuration file&lt;br /&gt;
* not everyone uses the configuration file&lt;br /&gt;
* not everyone uses the particular option&lt;br /&gt;
* bug only triggered in those circumstances&lt;br /&gt;
* I wrote a small patch, to guard against use of a variable prematurely&lt;br /&gt;
* problem: all users of KDB now have this check, and suffer this overhead&lt;br /&gt;
** it wasn't much, just a single compare&lt;br /&gt;
** but this is how bloat builds up over time&lt;br /&gt;
** It bothered me because I knew most people didn't need the check&lt;br /&gt;
* &amp;quot;correct&amp;quot; solution would be to parse the config file, and make the code compile-time configurable&lt;br /&gt;
** this adds more complexity than it is worth.&lt;br /&gt;
&lt;br /&gt;
=== generalizing the problem of bloat ===&lt;br /&gt;
System doesn't know inputs:&lt;br /&gt;
&lt;br /&gt;
* It's very easy to configure the kernel to omit the driver for missing hardware.&lt;br /&gt;
* It's very difficult to configure the kernel to omit error handling for bugs that &lt;br /&gt;
will never occur due to fixed use cases.&lt;br /&gt;
&lt;br /&gt;
=== An example of fixed input (uid in kernel) ===&lt;br /&gt;
* throughout the kernel, there are references to uid&lt;br /&gt;
** comparisons, storing, referencing&lt;br /&gt;
* it turns out this is set by setuid(), by the 'login' program.&lt;br /&gt;
** login does a lookup and validates user account name in /etc/passwd&lt;br /&gt;
* what if /etc/passwd only has 'root' and no others?&lt;br /&gt;
* setuid() could only be called with a value of 0&lt;br /&gt;
* can I encode this constraint on the system.&lt;br /&gt;
&lt;br /&gt;
=== types of constraints ===&lt;br /&gt;
There are numerous other examples of constraints:&lt;br /&gt;
* kernel command line arguments never used&lt;br /&gt;
* syscalls never called by any program&lt;br /&gt;
* parameters that are never used, or parameter values that are never passed in&lt;br /&gt;
** e.g. ioctl value that is not possible&lt;br /&gt;
** this only works in a fixed&lt;br /&gt;
* /proc values never referenced&lt;br /&gt;
* /sys values never referenced&lt;br /&gt;
&lt;br /&gt;
=== also goes back up to user-space ===&lt;br /&gt;
* return values that are not possible&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
* [[File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch</id>
		<title>File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch"/>
				<updated>2013-04-11T19:00:32Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-11T19:00:07Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: add link to LTO-for-arm patch&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;br /&gt;
&lt;br /&gt;
== Materials ==&lt;br /&gt;
* [[File:0001-ARM-LTO-avoid-errors-on-unified-assembly-macros.patch]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-10T00:20:09Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
== Talk info ==&lt;br /&gt;
=== Title ===&lt;br /&gt;
Advanced size optimization of the Linux kernel&lt;br /&gt;
=== Abstract ===&lt;br /&gt;
This presentation will cover recent research by Tim on aggressive size reduction of the Linux kernel.  This will include results from using gcc link-time optimization (LTO) with the ARM architecture (using Andi Kleen's out-of-tree patches), as well as results and discussion of other optimization techniques (including whole-system optimization for embedded devices).&lt;br /&gt;
&lt;br /&gt;
This talk is directed at kernel developers interested in reducing the size of their Linux systems (and possible improving their performance in the process).  The talk will be highly technical.&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
* D. Chanet did cold code compression&lt;br /&gt;
* consists of:&lt;br /&gt;
** profiling the kernel&lt;br /&gt;
** marking code regions as cold or frozen&lt;br /&gt;
** replacing them with stubs&lt;br /&gt;
** compressing them&lt;br /&gt;
* At execution time:&lt;br /&gt;
** if a stub is called, it decompresses the code and calls it&lt;br /&gt;
** stub is fixed up to directly call decompressed code in future&lt;br /&gt;
** code is left decompressed forever&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Results:&lt;br /&gt;
** MUST see paper for details (it's quite complicated)&lt;br /&gt;
* on 2.4.25 kernel&lt;br /&gt;
** cold code compression resulted in 7% reduction for i386 kernel and&lt;br /&gt;
** 11.7% reduction for ARM kernel&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
* Advanced size optimization of the Linux kernel&lt;br /&gt;
** by Tim Bird, Sony Mobile Communication&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** pre-professional: first program on TRS-80, in basic, 8K ram&lt;br /&gt;
** NetWare Lite - file and print server in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* Software gets more generalized over time&lt;br /&gt;
* Can't use strategy of manual tuning (config options)&lt;br /&gt;
** It gets harder and harder to remove things over time&lt;br /&gt;
** About 13,000 config items now (2.6.12 had 4700)&lt;br /&gt;
** You have to be an expert in too many things to reduce the kernel&lt;br /&gt;
* Must rely on automated methods of reduction&lt;br /&gt;
* Should use an additive, rather than subtractive method of building a system&lt;br /&gt;
** ultimate vision: indicate what you want/need, and build up system to support it&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont. 2) ===&lt;br /&gt;
* In desktop or server, virtual memory makes bloat issue less important for user-space programs&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
** For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
* Good for testing and further research&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* Chanet D. ... &amp;quot;Automated reduction of the memory footprint of the linux kernel&amp;quot;&lt;br /&gt;
* Haifen He. ...&amp;quot;Code Compaction of an Operating System Kernel&amp;quot;&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-08T18:50:02Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* The problem of Bloat */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Report existing research&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
Report existing research&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** NetWare Lite - file and print server on DOS in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
* bloat problem is:&lt;br /&gt;
** How to re-specialize the software, eliminating unused features and dead code?&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* In desktop or server, virtual memory makes this not so important (for user-space programs)&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
* For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see &lt;br /&gt;
* Good for testing and further research&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-08T18:48:38Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* LTO */ add bullets to LTO section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
* What is it?&lt;br /&gt;
* what was required to get it to work?&lt;br /&gt;
* Andi Kleen's patch set&lt;br /&gt;
** what do they do?&lt;br /&gt;
** how big are they?&lt;br /&gt;
** mainline status?&lt;br /&gt;
* what is the size gain (see ELC poster)&lt;br /&gt;
* what can be done with it?&lt;br /&gt;
* long-term possibilities for LTO&lt;br /&gt;
&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Report existing research&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
Report existing research&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** NetWare Lite - file and print server on DOS in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* In desktop or server, virtual memory makes this not so important (for user-space programs)&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
* For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see &lt;br /&gt;
* Good for testing and further research&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/User:Tim_Bird</id>
		<title>User:Tim Bird</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/User:Tim_Bird"/>
				<updated>2013-04-08T18:37:27Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird is a Linux developer working for Sony Network Entertainment - a subsidiary of Sony Corporation.&lt;br /&gt;
&lt;br /&gt;
Tim is Chair of the Architecture Group of the [http://www.linuxfoundation.org/collaborate/workgroups/celf CE Workgroup of the Linux Foundation] (formerly the [[CE Linux Forum]]).  In the past, Tim worked at Lineo, Caldera, and Novell.&lt;br /&gt;
&lt;br /&gt;
== Current contact information ==&lt;br /&gt;
You can contact Tim at the following address, which has been made spam-resistant:&lt;br /&gt;
&lt;br /&gt;
* e-mail: tim (dot) bird (at) am (dot) sony (dot) com.&lt;br /&gt;
&lt;br /&gt;
== Bookmarks for things I'm working on in this wiki ==&lt;br /&gt;
* [[System Size Auto-Reduction]] - presentation for LCJ 2013 - wrapping up my auto-reduce work&lt;br /&gt;
* [[Tim's Tips and Tricks]] - Miscelaneous development tips gleaned over the years&lt;br /&gt;
* [[Ftrace]] - with my knowledge of ftrace, this page really needs a fixup&lt;br /&gt;
* [[Embedded linux status]] - list of things for embedded linux status reports (which I do frequently)&lt;br /&gt;
* [[elinux issues]] - list of things that need fixing&lt;br /&gt;
* [[Embedded Wiki wanted features]]&lt;br /&gt;
* [[Kernel Timer Systems]] - needs a major overhaul to bring it up to date&lt;br /&gt;
&lt;br /&gt;
* [[Android Boot-time Readahead]]&lt;br /&gt;
* [[Beginning Programming]]&lt;br /&gt;
&lt;br /&gt;
=== Pages needing LOTS of HELP!! ===&lt;br /&gt;
Here are some high priority candidates for work...&lt;br /&gt;
* [[Android Kernel Build]]&lt;br /&gt;
&lt;br /&gt;
=== Samples and help ===&lt;br /&gt;
* See [[Table Examples]]&lt;br /&gt;
&lt;br /&gt;
== Areas of interest ==&lt;br /&gt;
Here are some things Tim is interested in on this site:&lt;br /&gt;
* [[Other wikis]] - a list of other wikis to examine the design of&lt;br /&gt;
* [http://www.linuxworld.com/news/2006/120606-closed-modules1.html?page=1 Good article on US case law related to closed-source kernel modules]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikibooks.org/wiki/MediaWiki_Administrator's_Handbook MediaWiki Administrator's Handbook]&lt;br /&gt;
&lt;br /&gt;
== Things I want to add to the wiki ==&lt;br /&gt;
* diffinfo, qdiff, reisolate - see [[Diff And Patch Tricks]], [[Source Management Tools]], and&lt;br /&gt;
[[Tim's patch management tools]]&lt;br /&gt;
* review each portal page and try to hook up material I know is orphaned&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
[http://www.edn.com/article/CA6582852.html Free software encircles embedded design] Warren Web, EDN 8/7/2008&lt;br /&gt;
&lt;br /&gt;
=== Videos, Articles, Presentations of, by or about me ===&lt;br /&gt;
* http://video.linuxfoundation.org/video/1654 - JLS 2009 - Status of Embedded Linux presentation&lt;br /&gt;
* http://www.vimeo.com/8042326 - Measuring Function Duration with Ftrace&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-06T15:11:05Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* global constraints */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
* overall idea: create constraints external to code, and use for optimization&lt;br /&gt;
* rationale: can't maintain in-tree - too many config items&lt;br /&gt;
* make the application of constraints automatic&lt;br /&gt;
* use existing constraints to generate new constraints&lt;br /&gt;
* constraints can flow between user-space and kernel&lt;br /&gt;
&lt;br /&gt;
* example: uid=0&lt;br /&gt;
* constraint language&lt;br /&gt;
* application by commenting out references (replace with 0 constant)&lt;br /&gt;
** use compiler to find code references (via error messages)&lt;br /&gt;
*** eliminates problem with duplicate names (uid in different structure)&lt;br /&gt;
* constant propagation (by, e.g. LTO) reduces code&lt;br /&gt;
&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Report existing research&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
Report existing research&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** NetWare Lite - file and print server on DOS in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* In desktop or server, virtual memory makes this not so important (for user-space programs)&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
* For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see &lt;br /&gt;
* Good for testing and further research&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-06T15:01:47Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: add more&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Research Areas ==&lt;br /&gt;
=== LTO ===&lt;br /&gt;
=== global constraints ===&lt;br /&gt;
=== syscall elimination ===&lt;br /&gt;
* scan file system&lt;br /&gt;
* create report of used and unused system calls&lt;br /&gt;
* mark syscalls unused in kernel&lt;br /&gt;
** arch/arm/kernel/calls.S (and arch/arm/kernel/entry-common.S&lt;br /&gt;
* make sure unused syscalls are not __attribute__(externally_visible)&lt;br /&gt;
** technique of asmlinkage_&amp;lt;syscall&amp;gt;&lt;br /&gt;
* use LTO to eliminate calls&lt;br /&gt;
* results: 50K-90K&lt;br /&gt;
&lt;br /&gt;
=== ARM stack reduction ===&lt;br /&gt;
* 4k stacks&lt;br /&gt;
* stack extensions&lt;br /&gt;
&lt;br /&gt;
=== cold code compression ===&lt;br /&gt;
Report existing research&lt;br /&gt;
=== link-time rewriting ===&lt;br /&gt;
Report existing research&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
=== Title ===&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
=== Self-Introduction ===&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** NetWare Lite - file and print server on DOS in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
=== The problem of Bloat ===&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
&lt;br /&gt;
=== Bloat (cont.) ===&lt;br /&gt;
* In desktop or server, virtual memory makes this not so important (for user-space programs)&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
* For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
=== Tiny Distribution ===&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see &lt;br /&gt;
* Good for testing and further research&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size_Auto-Reduction</id>
		<title>System Size Auto-Reduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size_Auto-Reduction"/>
				<updated>2013-04-06T14:56:51Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: initial draft&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page has notes and an outline for Tim Bird's Linux Auto-Reduction research.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Link-Time Optimization ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Talk outline ==&lt;br /&gt;
This talk will be presented at LinuxCon Japan 2013:&lt;br /&gt;
&lt;br /&gt;
== Title ==&lt;br /&gt;
*&lt;br /&gt;
&lt;br /&gt;
== Self-Introduction ==&lt;br /&gt;
* I am Tim Bird&lt;br /&gt;
* Now working at Sony Mobile&lt;br /&gt;
* Researching system size for many years&lt;br /&gt;
* Long background in extremely small systems&lt;br /&gt;
** NetWare Lite - file and print server on DOS in 50K (in 1991)&lt;br /&gt;
&lt;br /&gt;
== The problem of Bloat ==&lt;br /&gt;
* Software bloat occurs because systems are built with more software than is really needed for a given task&lt;br /&gt;
* Open Source software meets the needs of thousands of different systems&lt;br /&gt;
** Linux scales from tiny sensors to supercomputers (extreme SMP and high-end clusters)&lt;br /&gt;
** Linux supports many, many features, only some of which are configurable&lt;br /&gt;
* Software must be generalized for many use cases&lt;br /&gt;
&lt;br /&gt;
== Bloat (cont.) ==&lt;br /&gt;
* In desktop or server, virtual memory makes this not so important (for user-space programs)&lt;br /&gt;
** Only working set of program is loaded - pages are loaded on demand&lt;br /&gt;
* For kernel, all pages are always loaded&lt;br /&gt;
&lt;br /&gt;
== Tiny Distribution ==&lt;br /&gt;
* poky-tiny distribution (yocto project)&lt;br /&gt;
* see &lt;br /&gt;
* Good for testing and further research&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size</id>
		<title>System Size</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size"/>
				<updated>2013-04-06T14:35:05Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Auto-reduction */ style cleanup&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Here are some links to information and projects related to Linux system size.&lt;br /&gt;
&lt;br /&gt;
== Technologies for decreasing system size ==&lt;br /&gt;
=== Kernel size reduction ===&lt;br /&gt;
==== Configuration Options ====&lt;br /&gt;
* [[Kernel Size Tuning Guide]] - document about measuring kernel size and configuring the kernel for smallest size&lt;br /&gt;
&lt;br /&gt;
==== The Linux-tiny patchset ====&lt;br /&gt;
* The [[Linux Tiny]] patch set is a collection of patches which can be used to make the Linux kernel consume less space.  The long-term goal of the Linux-tiny project is to mainline these patches.  Several patches have been mainlined over the last few years, and work continues in this area.&lt;br /&gt;
&lt;br /&gt;
==== Compiler options for reducing kernel size ====&lt;br /&gt;
An LWN article talks about three gcc options to shrink the kernel.&lt;br /&gt;
&lt;br /&gt;
[http://lwn.net/Articles/67175/ Shrinking the Kernel with GCC]&lt;br /&gt;
&lt;br /&gt;
The first option is -Os which is already in the tiny kernel patch.&lt;br /&gt;
&lt;br /&gt;
Since version 3.4, gcc offered a -funit-at-a-time option.&lt;br /&gt;
This apparently made gcc do a much better job of inlining and dead code removal,&lt;br /&gt;
reducing the size of both text and data. It depended on another inlining patch.&lt;br /&gt;
According to gcc's manual, this option no longer does anything.&lt;br /&gt;
&lt;br /&gt;
The -fwhole-program --combine option set is equivalent to grouping all source files&lt;br /&gt;
and making all variables static. These options are still supported by gcc, but not longer offered in BusyBox&lt;br /&gt;
configuration options. What happened?&lt;br /&gt;
&lt;br /&gt;
Another option, -mregparm=3, seems to be x86 specific, it instructs the&lt;br /&gt;
compiler to use registers for the first three function arguments. by John Rigby&lt;br /&gt;
&lt;br /&gt;
See [http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html] for all&lt;br /&gt;
available optimization switches.&lt;br /&gt;
See [[Compiler_Optimization]] for more details on effects of optimization options.&lt;br /&gt;
&lt;br /&gt;
==== Section garbage collection patchset ====&lt;br /&gt;
These [http://busybox.net/~vda/k-sections/ patches] can shrink kernel size by ~10% by improving dead code/data elimination at link time. They are being pushed to mainline. Due to a linker [https://bugzilla.redhat.com/show_bug.cgi?id=621742 bug], their acceptance depends on a newer, fixed linker (will be in binutils-2.21). Good news are that the bug affects only certain architectures (parisc), so the patches are usable even with &amp;quot;old&amp;quot; linker.&lt;br /&gt;
&lt;br /&gt;
==== Runtime size of kernel ====&lt;br /&gt;
Often, the focus of memory size reduction for the kernel is on the size of the&lt;br /&gt;
statically compiled image for the kernel.  However, the kernel also allocates&lt;br /&gt;
memory dynamically when it runs.  On loading, the kernel creates several tables&lt;br /&gt;
for things like network and file system structures.&lt;br /&gt;
&lt;br /&gt;
Here is a table showing different kernel hash tables, and their approximate&lt;br /&gt;
size for a 2.6 kernel.  (Table taken from page 25 of&lt;br /&gt;
http://logfs.org/~joern/data_structures.pdf )&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!Hash Table         !!memory &amp;lt; 512MiB RAM !! memory &amp;gt;=512MiB RAM&lt;br /&gt;
|-&lt;br /&gt;
!                   !!32b/64b       !!32b/64b &lt;br /&gt;
|-&lt;br /&gt;
|TCP established    ||96k/192k      ||384k/768k&lt;br /&gt;
|-&lt;br /&gt;
|TCP bind           || 64k/128k     || 256k/512k&lt;br /&gt;
|-&lt;br /&gt;
|IP route cache     || 128k/256k    ||   512k/1M&lt;br /&gt;
|-&lt;br /&gt;
|Inode-cache        ||  64k/128k    ||   64k/128k&lt;br /&gt;
|-&lt;br /&gt;
|Dentry cache       ||   32k/64k    ||    32k/64k&lt;br /&gt;
|-&lt;br /&gt;
||Total             ||  384k/768k   || 1248k/2496k&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== kernel stack size =====&lt;br /&gt;
There used to be a configuration option for reducing the size of the kernel stack for each process to 4K.&lt;br /&gt;
By default (as of 2011), the default kernel stack size is 8K.  If you have a lot of processes, then &lt;br /&gt;
using 4K stacks can reduce the kernel stack usage.&lt;br /&gt;
&lt;br /&gt;
Some notes about this are at: [[Kernel Small Stacks]]&lt;br /&gt;
&lt;br /&gt;
=== Auto-reduction ===&lt;br /&gt;
In 2012, Tim Bird studied a few different techniques related to automatic size reduction and whole-system optimization.&lt;br /&gt;
Specifically, he studied the following items:&lt;br /&gt;
* link-time optimization of the kernel&lt;br /&gt;
* syscall elimination&lt;br /&gt;
* global constraints&lt;br /&gt;
* kernel stack reduction&lt;br /&gt;
&lt;br /&gt;
Tim also found some very interesting academic research on link-time re-writing and cold-code compression.&lt;br /&gt;
Tim's work will be presented at LinuxCon Japan in May, 2013.&lt;br /&gt;
&lt;br /&gt;
An outline for the talk is at [[System Size Auto-Reduction]]&lt;br /&gt;
&lt;br /&gt;
=== File system compression ===&lt;br /&gt;
For read-only data, it is useful to utilize a compressed file system.&lt;br /&gt;
The following are used heavily in embedded systems:&lt;br /&gt;
* Cramfs and SquashFS, for block storage.&lt;br /&gt;
* JFFS2 and its successor UBIFS, for flash (MTD) storage. &lt;br /&gt;
&lt;br /&gt;
Note that Cramfs and Squashfs, due to their &amp;quot;write-only-once&amp;quot; nature, can also be used on MTD storage. &lt;br /&gt;
&lt;br /&gt;
See the [[File Systems]] page for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shrinking your application ===&lt;br /&gt;
==== Compiler options for program size ====&lt;br /&gt;
You can use &amp;quot;gcc -Os&amp;quot; to optimize for size.&lt;br /&gt;
&lt;br /&gt;
==== Stripping your program ====&lt;br /&gt;
You can use the 'strip' command to eliminate unneeded symbols from your application.&lt;br /&gt;
The 'strip' command should be included with your toolchain, and may be architecture-specific.&lt;br /&gt;
(I.e. you may need to run it with a toolchain prefix, like &amp;quot;arm-linux-strip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Note that this makes debugging your application more difficult, because the debug&lt;br /&gt;
symbols are no longer available.&lt;br /&gt;
&lt;br /&gt;
By default, strip just removes debug symbols.  You can remove everything but the essential&lt;br /&gt;
symbols used for dynamic linking. To get the highest savings, use &amp;quot;strip --strip-unneeded &amp;lt;app&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This can save a lot of space, especially if debug symbols were included in the build.&lt;br /&gt;
&lt;br /&gt;
 $ gcc -g hello.c -o hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 6143 2009-02-10 09:43 hello&lt;br /&gt;
 $ strip hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:43 hello&lt;br /&gt;
 $ strip --strip-unneeded hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:43 hello&lt;br /&gt;
&lt;br /&gt;
Now, compiles without debug symbols to start with:&lt;br /&gt;
&lt;br /&gt;
 $ gcc hello.c -o hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 4903 2009-02-10 09:45 hello&lt;br /&gt;
 $ strip hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:45 hello&lt;br /&gt;
&lt;br /&gt;
You can strip both executables as well as shared libraries.&lt;br /&gt;
&lt;br /&gt;
There is a &amp;quot;super-strip&amp;quot; utility, which removes additional material from an ELF executable program (which 'strip'&lt;br /&gt;
usually misses).  It is available at: http://muppetlabs.com/~breadbox/software/elfkickers.html&lt;br /&gt;
''This program appears to be obsolete now.  I couldn't get it to compile on Fedora 8''.&lt;br /&gt;
&lt;br /&gt;
Some information about stripping individual sections by hand, using the -R command is available at: http://reverse.lostrealm.com/protect/strip.html&lt;br /&gt;
&lt;br /&gt;
==== Hand-optimizing programs, for size ====&lt;br /&gt;
If you are very intent on creating small binaries, you can use some techniques to manually&lt;br /&gt;
create the smallest Linux executables possible.&lt;br /&gt;
&lt;br /&gt;
See [http://muppetlabs.com/~breadbox/software/tiny/teensy.html A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux]&lt;br /&gt;
&lt;br /&gt;
=== Library savings ===&lt;br /&gt;
==== Use of a smaller libc ====&lt;br /&gt;
Glibc is the default C library used for Linux systems.  Glibc is about 2 meg. in size.  Other C libraries&lt;br /&gt;
are also available for Linux, and they offer varying degrees of compatibility and size savings.&lt;br /&gt;
In general, uClibc is considered a very good alternative to glibc, for systems where size is an issue.&lt;br /&gt;
&lt;br /&gt;
* [http://uclibc.org/ uClibc] - small footprint but complete C library&lt;br /&gt;
* [http://www.fefe.de/dietlibc/ dietlibc] - another library to produce very small statically compiled executables.&lt;br /&gt;
* [http://www.kernel.org/pub/linux/libs/klibc/ klibc] - very small library for use in init ram filesystems&lt;br /&gt;
* [http://www.eglibc.org/home eglibc] - a version of glibc designed for embedded systems. Reduced footprint is one of the design goals.&lt;br /&gt;
* [http://www.musl-libc.org/ musl libc] - a lightweight, fast, simple, and standards-compliant C library&lt;br /&gt;
* [http://olibc.github.com/ olibc] - another C library optimized for size and performance, derived from Android bionic libc&lt;br /&gt;
* Subset Libc Specification - CELF once considered the possibility of creating a subset libc specification.  Some companies have also examined the possibility of modularizing glibc, so that parts of it can be made configurable.  Preliminary research indicates that this could be a very difficult thing, since glibc has very messy function interdependencies.&lt;br /&gt;
&lt;br /&gt;
==== Static Linking ====&lt;br /&gt;
If your set of applications is small, sometimes it makes more sense to statically link&lt;br /&gt;
your applications than to use shared libraries.  Shared libraries by default include all&lt;br /&gt;
symbols (functions and data structures) for the features a library provides.  However, when&lt;br /&gt;
you static link a program to a library, only the symbols that are actually referenced&lt;br /&gt;
are linked in and included in the program.&lt;br /&gt;
&lt;br /&gt;
==== Library reduction ====&lt;br /&gt;
It is possible to reduce the size of shared libraries, by eliminating unused symbols.&lt;br /&gt;
&lt;br /&gt;
MontaVista released a tool for library optimization.  This tool scans the entire file system,&lt;br /&gt;
and can rebuild the shared libraries for the system, including only the symbols needed for&lt;br /&gt;
the set of applications in the indicated file system.&lt;br /&gt;
&lt;br /&gt;
Care needs to be taken with this approach, since it may make it difficult to use add-on&lt;br /&gt;
programs or or do in-field upgrades (since symbols required by the new software may not&lt;br /&gt;
be present in the optimized libraries).  But for some fixed-function devices, this can&lt;br /&gt;
reduce your library footprint dramatically.&lt;br /&gt;
&lt;br /&gt;
See http://libraryopt.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
==== Deferred Library Loading ====&lt;br /&gt;
It is possible to reduce the RAM runtime footprint for a product, by lazily loading shared&lt;br /&gt;
libraries, and by breaking up library dependencies.  Panasonic did some research into&lt;br /&gt;
a process called Deferred Library Loading, which they presented at ELC 2007.&lt;br /&gt;
&lt;br /&gt;
See the [http://tree.celinuxforum.org/CelfPubWiki/ELC2007Presentations?action=AttachFile&amp;amp;do=get&amp;amp;target=DefferdDynamicLoading_20070417.pdf Deferred Dynamic Loading] presentation.&lt;br /&gt;
&lt;br /&gt;
=== Execute-in-place ===&lt;br /&gt;
You can save RAM memory by using some text or data directly from flash.&lt;br /&gt;
&lt;br /&gt;
==== Kernel XIP ====&lt;br /&gt;
By executing the kernel in-place from flash, it is possible to save RAM space.&lt;br /&gt;
*see [[Kernel XIP]]&lt;br /&gt;
&lt;br /&gt;
==== Application XIP ====&lt;br /&gt;
By executing applications in-place from flash, it is possible to save RAM space.&lt;br /&gt;
*see [[Application XIP]]&lt;br /&gt;
&lt;br /&gt;
==== Data Read In Place (DRIP) ====&lt;br /&gt;
This is a technique for keeping data in flash, until it is written to, and then&lt;br /&gt;
making a RAM page for it.&lt;br /&gt;
*see [[Data Read In Place]]&lt;br /&gt;
&lt;br /&gt;
== Size measurement tools and techniques ==&lt;br /&gt;
=== Kernel size measurement data ===&lt;br /&gt;
* [http://www.selenic.com/bloatwatch/ Bloatwatch] - a kernel size regression analysis tool.&lt;br /&gt;
** Bloatwatch provides a great amount of detail, and the ability to compare the size of kernel versions over time.&lt;br /&gt;
&lt;br /&gt;
=== How to measure the kernel image size ===&lt;br /&gt;
*to see the size of the major kernel sections (code and data):&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;size vmlinux */built-in.o&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[tbird@crest ebony]$ size vmlinux */built-in.o&lt;br /&gt;
   text    data     bss     dec     hex filename&lt;br /&gt;
2921377  369712  132996 3424085  343f55 vmlinux&lt;br /&gt;
 764472   35692   22768  822932   c8e94 drivers/built-in.o&lt;br /&gt;
 918344   22364   36824  977532   eea7c fs/built-in.o&lt;br /&gt;
  18260    1868    1604   21732    54e4 init/built-in.o&lt;br /&gt;
  39960     864     224   41048    a058 ipc/built-in.o&lt;br /&gt;
 257292   14656   34516  306464   4ad20 kernel/built-in.o&lt;br /&gt;
  34728     156    2280   37164    912c lib/built-in.o&lt;br /&gt;
 182312    2704     736  185752   2d598 mm/built-in.o&lt;br /&gt;
 620864   20820   26676  668360   a32c8 net/built-in.o&lt;br /&gt;
   1912       0       0    1912     778 security/built-in.o&lt;br /&gt;
    133       0       0     133      85 usr/built-in.o&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
*to see the size of the largest kernel symbols:&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;nm --size -r vmlinux&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[tbird@crest ebony]$ nm --size -r vmlinux | head -10&lt;br /&gt;
00008000 b read_buffers&lt;br /&gt;
00004000 b __log_buf&lt;br /&gt;
00003100 B ide_hwifs&lt;br /&gt;
000024f8 T jffs2_garbage_collect_pass&lt;br /&gt;
00002418 T journal_commit_transaction&lt;br /&gt;
00002400 b futex_queues&lt;br /&gt;
000021a8 t jedec_probe_chip&lt;br /&gt;
00002000 b write_buf&lt;br /&gt;
00002000 D init_thread_union&lt;br /&gt;
00001e6c t tcp_ack&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How to measure the memory usage at runtime ===&lt;br /&gt;
See [[Runtime Memory Measurement]] for a description of ways to measure runtime memory usage in Linux.&lt;br /&gt;
&lt;br /&gt;
Also, see [[Accurate Memory Measurement]] for a description of techniques (and patches) which can be used to measure the runtime memory more accurately.&lt;br /&gt;
&lt;br /&gt;
=== Linux size increase from 2.4 to 2.6 ===&lt;br /&gt;
Linux increased in size by between 10% and 30% from version 2.4 to 2.6.  This incremental growth in kernel size has been a big concern by forum members.&lt;br /&gt;
&lt;br /&gt;
Please see the [[Szwg Linux 26Data]] page for supporting data.&lt;br /&gt;
&lt;br /&gt;
* [[Size Tunables]]&lt;br /&gt;
&lt;br /&gt;
=== GCC Code-Size Benchmarking ===&lt;br /&gt;
CSiBE is a code size benchmark for the GCC compiler. The primary purpose of CSiBE is to monitor the size of the code generated by GCC. In addition, compilation time and code performance measurements are also provided.&lt;br /&gt;
&lt;br /&gt;
[http://www.inf.u-szeged.hu/csibe/ CSiBE]&lt;br /&gt;
&lt;br /&gt;
== Case Studies ==&lt;br /&gt;
* Motorola reduction of system size (presumably for cell phones) using 2.4 Linux:  MotSizeReduction.ppt - this is a placeholder for this Powerpoint as it was too big to upload to the wiki.&lt;br /&gt;
&lt;br /&gt;
== Reduced-size distribution efforts ==&lt;br /&gt;
Here are some projects aimed at building small-sized systems:&lt;br /&gt;
* http://cgit.openembedded.org/meta-micro/&lt;br /&gt;
** It's maintained by Phil Blundell. It appears pretty successful in reducing size of the resulting image whilst keeping the system fairly functional. It uses uClibc&lt;br /&gt;
* There is a project called Poky-tiny, to produce an extremely stripped-down distribution of embedded Linux using the Yocto project.&lt;br /&gt;
** See https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
** Poky-tiny is an effort to build a small-footprint system using Yocto, by Darren Hart&lt;br /&gt;
 meta-tiny is my experimental layer where I'm looking at what we can&lt;br /&gt;
 build with our existing sources and infrastructure. I've found that we&lt;br /&gt;
 can cut the image size to about 10% of core-image-minimal without&lt;br /&gt;
 changes to source code, but dropping a lot of functionality. We can get&lt;br /&gt;
 to something like 20% while still maintaining ipv4 networking.&lt;br /&gt;
** [http://git.infradead.org/users/dvhart/meta-tiny.git Meta-tiny git repository]&lt;br /&gt;
&lt;br /&gt;
== Other Tidbits on System Size ==&lt;br /&gt;
=== Memory leak detection for the kernel ===&lt;br /&gt;
Catalin Marinas of ARM has been recently (as of 2.6.17?) been posting a memory leak detector for the Linux kernel.  It may get mainlined in the future.  Here's a link to the LKML discussions around it: http://lkml.org/lkml/2006/6/11/39&lt;br /&gt;
&lt;br /&gt;
=== How System Size may affect performance ===&lt;br /&gt;
It has long been theorized that reducing system size could provide a performance benefit&lt;br /&gt;
because it could reduce cache misses.  There does not appear to be hard data to support&lt;br /&gt;
this theory on Linux, but this has been discussed on the kernel mailing list.&lt;br /&gt;
&lt;br /&gt;
See [http://groups.google.com/group/linux.kernel/msg/e1f9f579a946333e?hl=en&amp;amp; this post by Linus Torvalds]&lt;br /&gt;
&lt;br /&gt;
=== Stripping down the filesystem of a desktop distribution ===&lt;br /&gt;
Here is a good document with tips on how to strip out unneeded files from a desktop distribution.&lt;br /&gt;
The example distribution used here is Linux From Scratch, but the tips should work with many&lt;br /&gt;
distributions.&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfromscratch.org/hints/downloads/files/OLD/stripped-down.txt&lt;br /&gt;
&lt;br /&gt;
=== Extremely-minimal systems ===&lt;br /&gt;
This section lists various efforts to produce the absolute smallest system possible.&lt;br /&gt;
&lt;br /&gt;
* Someone is running an old version of BSD on a small processor with only 128K (that's right 'K'!!) of RAM.&lt;br /&gt;
** http://olimex.wordpress.com/2012/04/04/unix-on-pic32-meet-retrobsd-for-duinomite/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Size]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size</id>
		<title>System Size</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size"/>
				<updated>2013-04-06T14:30:31Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: merge poky-tiny stuff with meta-tiny stuff&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Here are some links to information and projects related to Linux system size.&lt;br /&gt;
&lt;br /&gt;
== Technologies for decreasing system size ==&lt;br /&gt;
=== Kernel size reduction ===&lt;br /&gt;
==== Configuration Options ====&lt;br /&gt;
* [[Kernel Size Tuning Guide]] - document about measuring kernel size and configuring the kernel for smallest size&lt;br /&gt;
&lt;br /&gt;
==== The Linux-tiny patchset ====&lt;br /&gt;
* The [[Linux Tiny]] patch set is a collection of patches which can be used to make the Linux kernel consume less space.  The long-term goal of the Linux-tiny project is to mainline these patches.  Several patches have been mainlined over the last few years, and work continues in this area.&lt;br /&gt;
&lt;br /&gt;
==== Compiler options for reducing kernel size ====&lt;br /&gt;
An LWN article talks about three gcc options to shrink the kernel.&lt;br /&gt;
&lt;br /&gt;
[http://lwn.net/Articles/67175/ Shrinking the Kernel with GCC]&lt;br /&gt;
&lt;br /&gt;
The first option is -Os which is already in the tiny kernel patch.&lt;br /&gt;
&lt;br /&gt;
Since version 3.4, gcc offered a -funit-at-a-time option.&lt;br /&gt;
This apparently made gcc do a much better job of inlining and dead code removal,&lt;br /&gt;
reducing the size of both text and data. It depended on another inlining patch.&lt;br /&gt;
According to gcc's manual, this option no longer does anything.&lt;br /&gt;
&lt;br /&gt;
The -fwhole-program --combine option set is equivalent to grouping all source files&lt;br /&gt;
and making all variables static. These options are still supported by gcc, but not longer offered in BusyBox&lt;br /&gt;
configuration options. What happened?&lt;br /&gt;
&lt;br /&gt;
Another option, -mregparm=3, seems to be x86 specific, it instructs the&lt;br /&gt;
compiler to use registers for the first three function arguments. by John Rigby&lt;br /&gt;
&lt;br /&gt;
See [http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html] for all&lt;br /&gt;
available optimization switches.&lt;br /&gt;
See [[Compiler_Optimization]] for more details on effects of optimization options.&lt;br /&gt;
&lt;br /&gt;
==== Section garbage collection patchset ====&lt;br /&gt;
These [http://busybox.net/~vda/k-sections/ patches] can shrink kernel size by ~10% by improving dead code/data elimination at link time. They are being pushed to mainline. Due to a linker [https://bugzilla.redhat.com/show_bug.cgi?id=621742 bug], their acceptance depends on a newer, fixed linker (will be in binutils-2.21). Good news are that the bug affects only certain architectures (parisc), so the patches are usable even with &amp;quot;old&amp;quot; linker.&lt;br /&gt;
&lt;br /&gt;
==== Runtime size of kernel ====&lt;br /&gt;
Often, the focus of memory size reduction for the kernel is on the size of the&lt;br /&gt;
statically compiled image for the kernel.  However, the kernel also allocates&lt;br /&gt;
memory dynamically when it runs.  On loading, the kernel creates several tables&lt;br /&gt;
for things like network and file system structures.&lt;br /&gt;
&lt;br /&gt;
Here is a table showing different kernel hash tables, and their approximate&lt;br /&gt;
size for a 2.6 kernel.  (Table taken from page 25 of&lt;br /&gt;
http://logfs.org/~joern/data_structures.pdf )&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!Hash Table         !!memory &amp;lt; 512MiB RAM !! memory &amp;gt;=512MiB RAM&lt;br /&gt;
|-&lt;br /&gt;
!                   !!32b/64b       !!32b/64b &lt;br /&gt;
|-&lt;br /&gt;
|TCP established    ||96k/192k      ||384k/768k&lt;br /&gt;
|-&lt;br /&gt;
|TCP bind           || 64k/128k     || 256k/512k&lt;br /&gt;
|-&lt;br /&gt;
|IP route cache     || 128k/256k    ||   512k/1M&lt;br /&gt;
|-&lt;br /&gt;
|Inode-cache        ||  64k/128k    ||   64k/128k&lt;br /&gt;
|-&lt;br /&gt;
|Dentry cache       ||   32k/64k    ||    32k/64k&lt;br /&gt;
|-&lt;br /&gt;
||Total             ||  384k/768k   || 1248k/2496k&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== kernel stack size =====&lt;br /&gt;
There used to be a configuration option for reducing the size of the kernel stack for each process to 4K.&lt;br /&gt;
By default (as of 2011), the default kernel stack size is 8K.  If you have a lot of processes, then &lt;br /&gt;
using 4K stacks can reduce the kernel stack usage.&lt;br /&gt;
&lt;br /&gt;
Some notes about this are at: [[Kernel Small Stacks]]&lt;br /&gt;
&lt;br /&gt;
=== Auto-reduction ===&lt;br /&gt;
In 2012, Tim Bird studied a few different techniques related to automatic size reduction and whole-system optimization.&lt;br /&gt;
Specifically, he studied the following items:&lt;br /&gt;
* link-time optimization of the kernel&lt;br /&gt;
* syscall elimination&lt;br /&gt;
* global constraints&lt;br /&gt;
* kernel stack reduction&lt;br /&gt;
&lt;br /&gt;
Tim also found some very interesting academic research on link-time re-writing and cold-code compression.&lt;br /&gt;
Tim's work will be presented at LinuxCon Japan in May, 2013.  He is working on his outline for the talk at:&lt;br /&gt;
[[System Size Auto-Reduction]]&lt;br /&gt;
&lt;br /&gt;
=== File system compression ===&lt;br /&gt;
For read-only data, it is useful to utilize a compressed file system.&lt;br /&gt;
The following are used heavily in embedded systems:&lt;br /&gt;
* Cramfs and SquashFS, for block storage.&lt;br /&gt;
* JFFS2 and its successor UBIFS, for flash (MTD) storage. &lt;br /&gt;
&lt;br /&gt;
Note that Cramfs and Squashfs, due to their &amp;quot;write-only-once&amp;quot; nature, can also be used on MTD storage. &lt;br /&gt;
&lt;br /&gt;
See the [[File Systems]] page for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shrinking your application ===&lt;br /&gt;
==== Compiler options for program size ====&lt;br /&gt;
You can use &amp;quot;gcc -Os&amp;quot; to optimize for size.&lt;br /&gt;
&lt;br /&gt;
==== Stripping your program ====&lt;br /&gt;
You can use the 'strip' command to eliminate unneeded symbols from your application.&lt;br /&gt;
The 'strip' command should be included with your toolchain, and may be architecture-specific.&lt;br /&gt;
(I.e. you may need to run it with a toolchain prefix, like &amp;quot;arm-linux-strip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Note that this makes debugging your application more difficult, because the debug&lt;br /&gt;
symbols are no longer available.&lt;br /&gt;
&lt;br /&gt;
By default, strip just removes debug symbols.  You can remove everything but the essential&lt;br /&gt;
symbols used for dynamic linking. To get the highest savings, use &amp;quot;strip --strip-unneeded &amp;lt;app&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This can save a lot of space, especially if debug symbols were included in the build.&lt;br /&gt;
&lt;br /&gt;
 $ gcc -g hello.c -o hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 6143 2009-02-10 09:43 hello&lt;br /&gt;
 $ strip hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:43 hello&lt;br /&gt;
 $ strip --strip-unneeded hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:43 hello&lt;br /&gt;
&lt;br /&gt;
Now, compiles without debug symbols to start with:&lt;br /&gt;
&lt;br /&gt;
 $ gcc hello.c -o hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 4903 2009-02-10 09:45 hello&lt;br /&gt;
 $ strip hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:45 hello&lt;br /&gt;
&lt;br /&gt;
You can strip both executables as well as shared libraries.&lt;br /&gt;
&lt;br /&gt;
There is a &amp;quot;super-strip&amp;quot; utility, which removes additional material from an ELF executable program (which 'strip'&lt;br /&gt;
usually misses).  It is available at: http://muppetlabs.com/~breadbox/software/elfkickers.html&lt;br /&gt;
''This program appears to be obsolete now.  I couldn't get it to compile on Fedora 8''.&lt;br /&gt;
&lt;br /&gt;
Some information about stripping individual sections by hand, using the -R command is available at: http://reverse.lostrealm.com/protect/strip.html&lt;br /&gt;
&lt;br /&gt;
==== Hand-optimizing programs, for size ====&lt;br /&gt;
If you are very intent on creating small binaries, you can use some techniques to manually&lt;br /&gt;
create the smallest Linux executables possible.&lt;br /&gt;
&lt;br /&gt;
See [http://muppetlabs.com/~breadbox/software/tiny/teensy.html A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux]&lt;br /&gt;
&lt;br /&gt;
=== Library savings ===&lt;br /&gt;
==== Use of a smaller libc ====&lt;br /&gt;
Glibc is the default C library used for Linux systems.  Glibc is about 2 meg. in size.  Other C libraries&lt;br /&gt;
are also available for Linux, and they offer varying degrees of compatibility and size savings.&lt;br /&gt;
In general, uClibc is considered a very good alternative to glibc, for systems where size is an issue.&lt;br /&gt;
&lt;br /&gt;
* [http://uclibc.org/ uClibc] - small footprint but complete C library&lt;br /&gt;
* [http://www.fefe.de/dietlibc/ dietlibc] - another library to produce very small statically compiled executables.&lt;br /&gt;
* [http://www.kernel.org/pub/linux/libs/klibc/ klibc] - very small library for use in init ram filesystems&lt;br /&gt;
* [http://www.eglibc.org/home eglibc] - a version of glibc designed for embedded systems. Reduced footprint is one of the design goals.&lt;br /&gt;
* [http://www.musl-libc.org/ musl libc] - a lightweight, fast, simple, and standards-compliant C library&lt;br /&gt;
* [http://olibc.github.com/ olibc] - another C library optimized for size and performance, derived from Android bionic libc&lt;br /&gt;
* Subset Libc Specification - CELF once considered the possibility of creating a subset libc specification.  Some companies have also examined the possibility of modularizing glibc, so that parts of it can be made configurable.  Preliminary research indicates that this could be a very difficult thing, since glibc has very messy function interdependencies.&lt;br /&gt;
&lt;br /&gt;
==== Static Linking ====&lt;br /&gt;
If your set of applications is small, sometimes it makes more sense to statically link&lt;br /&gt;
your applications than to use shared libraries.  Shared libraries by default include all&lt;br /&gt;
symbols (functions and data structures) for the features a library provides.  However, when&lt;br /&gt;
you static link a program to a library, only the symbols that are actually referenced&lt;br /&gt;
are linked in and included in the program.&lt;br /&gt;
&lt;br /&gt;
==== Library reduction ====&lt;br /&gt;
It is possible to reduce the size of shared libraries, by eliminating unused symbols.&lt;br /&gt;
&lt;br /&gt;
MontaVista released a tool for library optimization.  This tool scans the entire file system,&lt;br /&gt;
and can rebuild the shared libraries for the system, including only the symbols needed for&lt;br /&gt;
the set of applications in the indicated file system.&lt;br /&gt;
&lt;br /&gt;
Care needs to be taken with this approach, since it may make it difficult to use add-on&lt;br /&gt;
programs or or do in-field upgrades (since symbols required by the new software may not&lt;br /&gt;
be present in the optimized libraries).  But for some fixed-function devices, this can&lt;br /&gt;
reduce your library footprint dramatically.&lt;br /&gt;
&lt;br /&gt;
See http://libraryopt.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
==== Deferred Library Loading ====&lt;br /&gt;
It is possible to reduce the RAM runtime footprint for a product, by lazily loading shared&lt;br /&gt;
libraries, and by breaking up library dependencies.  Panasonic did some research into&lt;br /&gt;
a process called Deferred Library Loading, which they presented at ELC 2007.&lt;br /&gt;
&lt;br /&gt;
See the [http://tree.celinuxforum.org/CelfPubWiki/ELC2007Presentations?action=AttachFile&amp;amp;do=get&amp;amp;target=DefferdDynamicLoading_20070417.pdf Deferred Dynamic Loading] presentation.&lt;br /&gt;
&lt;br /&gt;
=== Execute-in-place ===&lt;br /&gt;
You can save RAM memory by using some text or data directly from flash.&lt;br /&gt;
&lt;br /&gt;
==== Kernel XIP ====&lt;br /&gt;
By executing the kernel in-place from flash, it is possible to save RAM space.&lt;br /&gt;
*see [[Kernel XIP]]&lt;br /&gt;
&lt;br /&gt;
==== Application XIP ====&lt;br /&gt;
By executing applications in-place from flash, it is possible to save RAM space.&lt;br /&gt;
*see [[Application XIP]]&lt;br /&gt;
&lt;br /&gt;
==== Data Read In Place (DRIP) ====&lt;br /&gt;
This is a technique for keeping data in flash, until it is written to, and then&lt;br /&gt;
making a RAM page for it.&lt;br /&gt;
*see [[Data Read In Place]]&lt;br /&gt;
&lt;br /&gt;
== Size measurement tools and techniques ==&lt;br /&gt;
=== Kernel size measurement data ===&lt;br /&gt;
* [http://www.selenic.com/bloatwatch/ Bloatwatch] - a kernel size regression analysis tool.&lt;br /&gt;
** Bloatwatch provides a great amount of detail, and the ability to compare the size of kernel versions over time.&lt;br /&gt;
&lt;br /&gt;
=== How to measure the kernel image size ===&lt;br /&gt;
*to see the size of the major kernel sections (code and data):&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;size vmlinux */built-in.o&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[tbird@crest ebony]$ size vmlinux */built-in.o&lt;br /&gt;
   text    data     bss     dec     hex filename&lt;br /&gt;
2921377  369712  132996 3424085  343f55 vmlinux&lt;br /&gt;
 764472   35692   22768  822932   c8e94 drivers/built-in.o&lt;br /&gt;
 918344   22364   36824  977532   eea7c fs/built-in.o&lt;br /&gt;
  18260    1868    1604   21732    54e4 init/built-in.o&lt;br /&gt;
  39960     864     224   41048    a058 ipc/built-in.o&lt;br /&gt;
 257292   14656   34516  306464   4ad20 kernel/built-in.o&lt;br /&gt;
  34728     156    2280   37164    912c lib/built-in.o&lt;br /&gt;
 182312    2704     736  185752   2d598 mm/built-in.o&lt;br /&gt;
 620864   20820   26676  668360   a32c8 net/built-in.o&lt;br /&gt;
   1912       0       0    1912     778 security/built-in.o&lt;br /&gt;
    133       0       0     133      85 usr/built-in.o&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
*to see the size of the largest kernel symbols:&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;nm --size -r vmlinux&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[tbird@crest ebony]$ nm --size -r vmlinux | head -10&lt;br /&gt;
00008000 b read_buffers&lt;br /&gt;
00004000 b __log_buf&lt;br /&gt;
00003100 B ide_hwifs&lt;br /&gt;
000024f8 T jffs2_garbage_collect_pass&lt;br /&gt;
00002418 T journal_commit_transaction&lt;br /&gt;
00002400 b futex_queues&lt;br /&gt;
000021a8 t jedec_probe_chip&lt;br /&gt;
00002000 b write_buf&lt;br /&gt;
00002000 D init_thread_union&lt;br /&gt;
00001e6c t tcp_ack&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How to measure the memory usage at runtime ===&lt;br /&gt;
See [[Runtime Memory Measurement]] for a description of ways to measure runtime memory usage in Linux.&lt;br /&gt;
&lt;br /&gt;
Also, see [[Accurate Memory Measurement]] for a description of techniques (and patches) which can be used to measure the runtime memory more accurately.&lt;br /&gt;
&lt;br /&gt;
=== Linux size increase from 2.4 to 2.6 ===&lt;br /&gt;
Linux increased in size by between 10% and 30% from version 2.4 to 2.6.  This incremental growth in kernel size has been a big concern by forum members.&lt;br /&gt;
&lt;br /&gt;
Please see the [[Szwg Linux 26Data]] page for supporting data.&lt;br /&gt;
&lt;br /&gt;
* [[Size Tunables]]&lt;br /&gt;
&lt;br /&gt;
=== GCC Code-Size Benchmarking ===&lt;br /&gt;
CSiBE is a code size benchmark for the GCC compiler. The primary purpose of CSiBE is to monitor the size of the code generated by GCC. In addition, compilation time and code performance measurements are also provided.&lt;br /&gt;
&lt;br /&gt;
[http://www.inf.u-szeged.hu/csibe/ CSiBE]&lt;br /&gt;
&lt;br /&gt;
== Case Studies ==&lt;br /&gt;
* Motorola reduction of system size (presumably for cell phones) using 2.4 Linux:  MotSizeReduction.ppt - this is a placeholder for this Powerpoint as it was too big to upload to the wiki.&lt;br /&gt;
&lt;br /&gt;
== Reduced-size distribution efforts ==&lt;br /&gt;
Here are some projects aimed at building small-sized systems:&lt;br /&gt;
* http://cgit.openembedded.org/meta-micro/&lt;br /&gt;
** It's maintained by Phil Blundell. It appears pretty successful in reducing size of the resulting image whilst keeping the system fairly functional. It uses uClibc&lt;br /&gt;
* There is a project called Poky-tiny, to produce an extremely stripped-down distribution of embedded Linux using the Yocto project.&lt;br /&gt;
** See https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
** Poky-tiny is an effort to build a small-footprint system using Yocto, by Darren Hart&lt;br /&gt;
 meta-tiny is my experimental layer where I'm looking at what we can&lt;br /&gt;
 build with our existing sources and infrastructure. I've found that we&lt;br /&gt;
 can cut the image size to about 10% of core-image-minimal without&lt;br /&gt;
 changes to source code, but dropping a lot of functionality. We can get&lt;br /&gt;
 to something like 20% while still maintaining ipv4 networking.&lt;br /&gt;
** [http://git.infradead.org/users/dvhart/meta-tiny.git Meta-tiny git repository]&lt;br /&gt;
&lt;br /&gt;
== Other Tidbits on System Size ==&lt;br /&gt;
=== Memory leak detection for the kernel ===&lt;br /&gt;
Catalin Marinas of ARM has been recently (as of 2.6.17?) been posting a memory leak detector for the Linux kernel.  It may get mainlined in the future.  Here's a link to the LKML discussions around it: http://lkml.org/lkml/2006/6/11/39&lt;br /&gt;
&lt;br /&gt;
=== How System Size may affect performance ===&lt;br /&gt;
It has long been theorized that reducing system size could provide a performance benefit&lt;br /&gt;
because it could reduce cache misses.  There does not appear to be hard data to support&lt;br /&gt;
this theory on Linux, but this has been discussed on the kernel mailing list.&lt;br /&gt;
&lt;br /&gt;
See [http://groups.google.com/group/linux.kernel/msg/e1f9f579a946333e?hl=en&amp;amp; this post by Linus Torvalds]&lt;br /&gt;
&lt;br /&gt;
=== Stripping down the filesystem of a desktop distribution ===&lt;br /&gt;
Here is a good document with tips on how to strip out unneeded files from a desktop distribution.&lt;br /&gt;
The example distribution used here is Linux From Scratch, but the tips should work with many&lt;br /&gt;
distributions.&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfromscratch.org/hints/downloads/files/OLD/stripped-down.txt&lt;br /&gt;
&lt;br /&gt;
=== Extremely-minimal systems ===&lt;br /&gt;
This section lists various efforts to produce the absolute smallest system possible.&lt;br /&gt;
&lt;br /&gt;
* Someone is running an old version of BSD on a small processor with only 128K (that's right 'K'!!) of RAM.&lt;br /&gt;
** http://olimex.wordpress.com/2012/04/04/unix-on-pic32-meet-retrobsd-for-duinomite/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:System Size]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size</id>
		<title>System Size</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size"/>
				<updated>2013-04-06T14:26:08Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Extremely-minimal systems */ add poky-tiny link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Here are some links to information and projects related to Linux system size.&lt;br /&gt;
&lt;br /&gt;
== Technologies for decreasing system size ==&lt;br /&gt;
=== Kernel size reduction ===&lt;br /&gt;
==== Configuration Options ====&lt;br /&gt;
* [[Kernel Size Tuning Guide]] - document about measuring kernel size and configuring the kernel for smallest size&lt;br /&gt;
&lt;br /&gt;
==== The Linux-tiny patchset ====&lt;br /&gt;
* The [[Linux Tiny]] patch set is a collection of patches which can be used to make the Linux kernel consume less space.  The long-term goal of the Linux-tiny project is to mainline these patches.  Several patches have been mainlined over the last few years, and work continues in this area.&lt;br /&gt;
&lt;br /&gt;
==== Compiler options for reducing kernel size ====&lt;br /&gt;
An LWN article talks about three gcc options to shrink the kernel.&lt;br /&gt;
&lt;br /&gt;
[http://lwn.net/Articles/67175/ Shrinking the Kernel with GCC]&lt;br /&gt;
&lt;br /&gt;
The first option is -Os which is already in the tiny kernel patch.&lt;br /&gt;
&lt;br /&gt;
Since version 3.4, gcc offered a -funit-at-a-time option.&lt;br /&gt;
This apparently made gcc do a much better job of inlining and dead code removal,&lt;br /&gt;
reducing the size of both text and data. It depended on another inlining patch.&lt;br /&gt;
According to gcc's manual, this option no longer does anything.&lt;br /&gt;
&lt;br /&gt;
The -fwhole-program --combine option set is equivalent to grouping all source files&lt;br /&gt;
and making all variables static. These options are still supported by gcc, but not longer offered in BusyBox&lt;br /&gt;
configuration options. What happened?&lt;br /&gt;
&lt;br /&gt;
Another option, -mregparm=3, seems to be x86 specific, it instructs the&lt;br /&gt;
compiler to use registers for the first three function arguments. by John Rigby&lt;br /&gt;
&lt;br /&gt;
See [http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html] for all&lt;br /&gt;
available optimization switches.&lt;br /&gt;
See [[Compiler_Optimization]] for more details on effects of optimization options.&lt;br /&gt;
&lt;br /&gt;
==== Section garbage collection patchset ====&lt;br /&gt;
These [http://busybox.net/~vda/k-sections/ patches] can shrink kernel size by ~10% by improving dead code/data elimination at link time. They are being pushed to mainline. Due to a linker [https://bugzilla.redhat.com/show_bug.cgi?id=621742 bug], their acceptance depends on a newer, fixed linker (will be in binutils-2.21). Good news are that the bug affects only certain architectures (parisc), so the patches are usable even with &amp;quot;old&amp;quot; linker.&lt;br /&gt;
&lt;br /&gt;
==== Runtime size of kernel ====&lt;br /&gt;
Often, the focus of memory size reduction for the kernel is on the size of the&lt;br /&gt;
statically compiled image for the kernel.  However, the kernel also allocates&lt;br /&gt;
memory dynamically when it runs.  On loading, the kernel creates several tables&lt;br /&gt;
for things like network and file system structures.&lt;br /&gt;
&lt;br /&gt;
Here is a table showing different kernel hash tables, and their approximate&lt;br /&gt;
size for a 2.6 kernel.  (Table taken from page 25 of&lt;br /&gt;
http://logfs.org/~joern/data_structures.pdf )&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!Hash Table         !!memory &amp;lt; 512MiB RAM !! memory &amp;gt;=512MiB RAM&lt;br /&gt;
|-&lt;br /&gt;
!                   !!32b/64b       !!32b/64b &lt;br /&gt;
|-&lt;br /&gt;
|TCP established    ||96k/192k      ||384k/768k&lt;br /&gt;
|-&lt;br /&gt;
|TCP bind           || 64k/128k     || 256k/512k&lt;br /&gt;
|-&lt;br /&gt;
|IP route cache     || 128k/256k    ||   512k/1M&lt;br /&gt;
|-&lt;br /&gt;
|Inode-cache        ||  64k/128k    ||   64k/128k&lt;br /&gt;
|-&lt;br /&gt;
|Dentry cache       ||   32k/64k    ||    32k/64k&lt;br /&gt;
|-&lt;br /&gt;
||Total             ||  384k/768k   || 1248k/2496k&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== kernel stack size =====&lt;br /&gt;
There used to be a configuration option for reducing the size of the kernel stack for each process to 4K.&lt;br /&gt;
By default (as of 2011), the default kernel stack size is 8K.  If you have a lot of processes, then &lt;br /&gt;
using 4K stacks can reduce the kernel stack usage.&lt;br /&gt;
&lt;br /&gt;
Some notes about this are at: [[Kernel Small Stacks]]&lt;br /&gt;
&lt;br /&gt;
=== Auto-reduction ===&lt;br /&gt;
In 2012, Tim Bird studied a few different techniques related to automatic size reduction and whole-system optimization.&lt;br /&gt;
Specifically, he studied the following items:&lt;br /&gt;
* link-time optimization of the kernel&lt;br /&gt;
* syscall elimination&lt;br /&gt;
* global constraints&lt;br /&gt;
* kernel stack reduction&lt;br /&gt;
&lt;br /&gt;
Tim also found some very interesting academic research on link-time re-writing and cold-code compression.&lt;br /&gt;
Tim's work will be presented at LinuxCon Japan in May, 2013.  He is working on his outline for the talk at:&lt;br /&gt;
[[System Size Auto-Reduction]]&lt;br /&gt;
&lt;br /&gt;
=== File system compression ===&lt;br /&gt;
For read-only data, it is useful to utilize a compressed file system.&lt;br /&gt;
The following are used heavily in embedded systems:&lt;br /&gt;
* Cramfs and SquashFS, for block storage.&lt;br /&gt;
* JFFS2 and its successor UBIFS, for flash (MTD) storage. &lt;br /&gt;
&lt;br /&gt;
Note that Cramfs and Squashfs, due to their &amp;quot;write-only-once&amp;quot; nature, can also be used on MTD storage. &lt;br /&gt;
&lt;br /&gt;
See the [[File Systems]] page for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shrinking your application ===&lt;br /&gt;
==== Compiler options for program size ====&lt;br /&gt;
You can use &amp;quot;gcc -Os&amp;quot; to optimize for size.&lt;br /&gt;
&lt;br /&gt;
==== Stripping your program ====&lt;br /&gt;
You can use the 'strip' command to eliminate unneeded symbols from your application.&lt;br /&gt;
The 'strip' command should be included with your toolchain, and may be architecture-specific.&lt;br /&gt;
(I.e. you may need to run it with a toolchain prefix, like &amp;quot;arm-linux-strip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Note that this makes debugging your application more difficult, because the debug&lt;br /&gt;
symbols are no longer available.&lt;br /&gt;
&lt;br /&gt;
By default, strip just removes debug symbols.  You can remove everything but the essential&lt;br /&gt;
symbols used for dynamic linking. To get the highest savings, use &amp;quot;strip --strip-unneeded &amp;lt;app&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This can save a lot of space, especially if debug symbols were included in the build.&lt;br /&gt;
&lt;br /&gt;
 $ gcc -g hello.c -o hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 6143 2009-02-10 09:43 hello&lt;br /&gt;
 $ strip hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:43 hello&lt;br /&gt;
 $ strip --strip-unneeded hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:43 hello&lt;br /&gt;
&lt;br /&gt;
Now, compiles without debug symbols to start with:&lt;br /&gt;
&lt;br /&gt;
 $ gcc hello.c -o hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 4903 2009-02-10 09:45 hello&lt;br /&gt;
 $ strip hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:45 hello&lt;br /&gt;
&lt;br /&gt;
You can strip both executables as well as shared libraries.&lt;br /&gt;
&lt;br /&gt;
There is a &amp;quot;super-strip&amp;quot; utility, which removes additional material from an ELF executable program (which 'strip'&lt;br /&gt;
usually misses).  It is available at: http://muppetlabs.com/~breadbox/software/elfkickers.html&lt;br /&gt;
''This program appears to be obsolete now.  I couldn't get it to compile on Fedora 8''.&lt;br /&gt;
&lt;br /&gt;
Some information about stripping individual sections by hand, using the -R command is available at: http://reverse.lostrealm.com/protect/strip.html&lt;br /&gt;
&lt;br /&gt;
==== Hand-optimizing programs, for size ====&lt;br /&gt;
If you are very intent on creating small binaries, you can use some techniques to manually&lt;br /&gt;
create the smallest Linux executables possible.&lt;br /&gt;
&lt;br /&gt;
See [http://muppetlabs.com/~breadbox/software/tiny/teensy.html A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux]&lt;br /&gt;
&lt;br /&gt;
=== Library savings ===&lt;br /&gt;
==== Use of a smaller libc ====&lt;br /&gt;
Glibc is the default C library used for Linux systems.  Glibc is about 2 meg. in size.  Other C libraries&lt;br /&gt;
are also available for Linux, and they offer varying degrees of compatibility and size savings.&lt;br /&gt;
In general, uClibc is considered a very good alternative to glibc, for systems where size is an issue.&lt;br /&gt;
&lt;br /&gt;
* [http://uclibc.org/ uClibc] - small footprint but complete C library&lt;br /&gt;
* [http://www.fefe.de/dietlibc/ dietlibc] - another library to produce very small statically compiled executables.&lt;br /&gt;
* [http://www.kernel.org/pub/linux/libs/klibc/ klibc] - very small library for use in init ram filesystems&lt;br /&gt;
* [http://www.eglibc.org/home eglibc] - a version of glibc designed for embedded systems. Reduced footprint is one of the design goals.&lt;br /&gt;
* [http://www.musl-libc.org/ musl libc] - a lightweight, fast, simple, and standards-compliant C library&lt;br /&gt;
* [http://olibc.github.com/ olibc] - another C library optimized for size and performance, derived from Android bionic libc&lt;br /&gt;
* Subset Libc Specification - CELF once considered the possibility of creating a subset libc specification.  Some companies have also examined the possibility of modularizing glibc, so that parts of it can be made configurable.  Preliminary research indicates that this could be a very difficult thing, since glibc has very messy function interdependencies.&lt;br /&gt;
&lt;br /&gt;
==== Static Linking ====&lt;br /&gt;
If your set of applications is small, sometimes it makes more sense to statically link&lt;br /&gt;
your applications than to use shared libraries.  Shared libraries by default include all&lt;br /&gt;
symbols (functions and data structures) for the features a library provides.  However, when&lt;br /&gt;
you static link a program to a library, only the symbols that are actually referenced&lt;br /&gt;
are linked in and included in the program.&lt;br /&gt;
&lt;br /&gt;
==== Library reduction ====&lt;br /&gt;
It is possible to reduce the size of shared libraries, by eliminating unused symbols.&lt;br /&gt;
&lt;br /&gt;
MontaVista released a tool for library optimization.  This tool scans the entire file system,&lt;br /&gt;
and can rebuild the shared libraries for the system, including only the symbols needed for&lt;br /&gt;
the set of applications in the indicated file system.&lt;br /&gt;
&lt;br /&gt;
Care needs to be taken with this approach, since it may make it difficult to use add-on&lt;br /&gt;
programs or or do in-field upgrades (since symbols required by the new software may not&lt;br /&gt;
be present in the optimized libraries).  But for some fixed-function devices, this can&lt;br /&gt;
reduce your library footprint dramatically.&lt;br /&gt;
&lt;br /&gt;
See http://libraryopt.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
==== Deferred Library Loading ====&lt;br /&gt;
It is possible to reduce the RAM runtime footprint for a product, by lazily loading shared&lt;br /&gt;
libraries, and by breaking up library dependencies.  Panasonic did some research into&lt;br /&gt;
a process called Deferred Library Loading, which they presented at ELC 2007.&lt;br /&gt;
&lt;br /&gt;
See the [http://tree.celinuxforum.org/CelfPubWiki/ELC2007Presentations?action=AttachFile&amp;amp;do=get&amp;amp;target=DefferdDynamicLoading_20070417.pdf Deferred Dynamic Loading] presentation.&lt;br /&gt;
&lt;br /&gt;
=== Execute-in-place ===&lt;br /&gt;
You can save RAM memory by using some text or data directly from flash.&lt;br /&gt;
&lt;br /&gt;
==== Kernel XIP ====&lt;br /&gt;
By executing the kernel in-place from flash, it is possible to save RAM space.&lt;br /&gt;
*see [[Kernel XIP]]&lt;br /&gt;
&lt;br /&gt;
==== Application XIP ====&lt;br /&gt;
By executing applications in-place from flash, it is possible to save RAM space.&lt;br /&gt;
*see [[Application XIP]]&lt;br /&gt;
&lt;br /&gt;
==== Data Read In Place (DRIP) ====&lt;br /&gt;
This is a technique for keeping data in flash, until it is written to, and then&lt;br /&gt;
making a RAM page for it.&lt;br /&gt;
*see [[Data Read In Place]]&lt;br /&gt;
&lt;br /&gt;
== Size measurement tools and techniques ==&lt;br /&gt;
=== Kernel size measurement data ===&lt;br /&gt;
* [http://www.selenic.com/bloatwatch/ Bloatwatch] - a kernel size regression analysis tool.&lt;br /&gt;
** Bloatwatch provides a great amount of detail, and the ability to compare the size of kernel versions over time.&lt;br /&gt;
&lt;br /&gt;
=== How to measure the kernel image size ===&lt;br /&gt;
*to see the size of the major kernel sections (code and data):&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;size vmlinux */built-in.o&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[tbird@crest ebony]$ size vmlinux */built-in.o&lt;br /&gt;
   text    data     bss     dec     hex filename&lt;br /&gt;
2921377  369712  132996 3424085  343f55 vmlinux&lt;br /&gt;
 764472   35692   22768  822932   c8e94 drivers/built-in.o&lt;br /&gt;
 918344   22364   36824  977532   eea7c fs/built-in.o&lt;br /&gt;
  18260    1868    1604   21732    54e4 init/built-in.o&lt;br /&gt;
  39960     864     224   41048    a058 ipc/built-in.o&lt;br /&gt;
 257292   14656   34516  306464   4ad20 kernel/built-in.o&lt;br /&gt;
  34728     156    2280   37164    912c lib/built-in.o&lt;br /&gt;
 182312    2704     736  185752   2d598 mm/built-in.o&lt;br /&gt;
 620864   20820   26676  668360   a32c8 net/built-in.o&lt;br /&gt;
   1912       0       0    1912     778 security/built-in.o&lt;br /&gt;
    133       0       0     133      85 usr/built-in.o&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
*to see the size of the largest kernel symbols:&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;nm --size -r vmlinux&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[tbird@crest ebony]$ nm --size -r vmlinux | head -10&lt;br /&gt;
00008000 b read_buffers&lt;br /&gt;
00004000 b __log_buf&lt;br /&gt;
00003100 B ide_hwifs&lt;br /&gt;
000024f8 T jffs2_garbage_collect_pass&lt;br /&gt;
00002418 T journal_commit_transaction&lt;br /&gt;
00002400 b futex_queues&lt;br /&gt;
000021a8 t jedec_probe_chip&lt;br /&gt;
00002000 b write_buf&lt;br /&gt;
00002000 D init_thread_union&lt;br /&gt;
00001e6c t tcp_ack&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How to measure the memory usage at runtime ===&lt;br /&gt;
See [[Runtime Memory Measurement]] for a description of ways to measure runtime memory usage in Linux.&lt;br /&gt;
&lt;br /&gt;
Also, see [[Accurate Memory Measurement]] for a description of techniques (and patches) which can be used to measure the runtime memory more accurately.&lt;br /&gt;
&lt;br /&gt;
=== Linux size increase from 2.4 to 2.6 ===&lt;br /&gt;
Linux increased in size by between 10% and 30% from version 2.4 to 2.6.  This incremental growth in kernel size has been a big concern by forum members.&lt;br /&gt;
&lt;br /&gt;
Please see the [[Szwg Linux 26Data]] page for supporting data.&lt;br /&gt;
&lt;br /&gt;
* [[Size Tunables]]&lt;br /&gt;
&lt;br /&gt;
=== GCC Code-Size Benchmarking ===&lt;br /&gt;
CSiBE is a code size benchmark for the GCC compiler. The primary purpose of CSiBE is to monitor the size of the code generated by GCC. In addition, compilation time and code performance measurements are also provided.&lt;br /&gt;
&lt;br /&gt;
[http://www.inf.u-szeged.hu/csibe/ CSiBE]&lt;br /&gt;
&lt;br /&gt;
== Case Studies ==&lt;br /&gt;
* Motorola reduction of system size (presumably for cell phones) using 2.4 Linux:  MotSizeReduction.ppt - this is a placeholder for this Powerpoint as it was too big to upload to the wiki.&lt;br /&gt;
&lt;br /&gt;
== Reduced-size distribution efforts ==&lt;br /&gt;
Here are some projects aimed at building small-sized systems:&lt;br /&gt;
* http://cgit.openembedded.org/meta-micro/&lt;br /&gt;
** It's maintained by Phil Blundell. It appears pretty successful in reducing size of the resulting image whilst keeping the system fairly functional. It uses uClibc&lt;br /&gt;
* [http://git.infradead.org/users/dvhart/meta-tiny.git Meta-tiny git repository]&lt;br /&gt;
** Meta-tiny is an effort to build a small-footprint system using Yocto, by Darren Hart&lt;br /&gt;
&lt;br /&gt;
 meta-tiny is my experimental layer where I'm looking at what we can&lt;br /&gt;
 build with our existing sources and infrastructure. I've found that we&lt;br /&gt;
 can cut the image size to about 10% of core-image-minimal without&lt;br /&gt;
 changes to source code, but dropping a lot of functionality. We can get&lt;br /&gt;
 to something like 20% while still maintaining ipv4 networking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Tidbits on System Size ==&lt;br /&gt;
=== Memory leak detection for the kernel ===&lt;br /&gt;
Catalin Marinas of ARM has been recently (as of 2.6.17?) been posting a memory leak detector for the Linux kernel.  It may get mainlined in the future.  Here's a link to the LKML discussions around it: http://lkml.org/lkml/2006/6/11/39&lt;br /&gt;
&lt;br /&gt;
=== How System Size may affect performance ===&lt;br /&gt;
It has long been theorized that reducing system size could provide a performance benefit&lt;br /&gt;
because it could reduce cache misses.  There does not appear to be hard data to support&lt;br /&gt;
this theory on Linux, but this has been discussed on the kernel mailing list.&lt;br /&gt;
&lt;br /&gt;
See [http://groups.google.com/group/linux.kernel/msg/e1f9f579a946333e?hl=en&amp;amp; this post by Linus Torvalds]&lt;br /&gt;
&lt;br /&gt;
=== Stripping down the filesystem of a desktop distribution ===&lt;br /&gt;
Here is a good document with tips on how to strip out unneeded files from a desktop distribution.&lt;br /&gt;
The example distribution used here is Linux From Scratch, but the tips should work with many&lt;br /&gt;
distributions.&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfromscratch.org/hints/downloads/files/OLD/stripped-down.txt&lt;br /&gt;
&lt;br /&gt;
=== Extremely-minimal systems ===&lt;br /&gt;
This section lists various efforts to produce the absolute smallest system possible.&lt;br /&gt;
&lt;br /&gt;
* Someone is running an old version of BSD on a small processor with only 128K (that's right 'K'!!) of RAM.&lt;br /&gt;
** http://olimex.wordpress.com/2012/04/04/unix-on-pic32-meet-retrobsd-for-duinomite/&lt;br /&gt;
* There is a project called Poky-tiny, to produce an extremely stripped-down distribution of embedded Linux using the Yocto project.&lt;br /&gt;
** See https://wiki.yoctoproject.org/wiki/Poky-Tiny&lt;br /&gt;
&lt;br /&gt;
[[Category:System Size]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/System_Size</id>
		<title>System Size</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/System_Size"/>
				<updated>2013-04-06T14:23:43Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: add information about auto-reduce&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
Here are some links to information and projects related to Linux system size.&lt;br /&gt;
&lt;br /&gt;
== Technologies for decreasing system size ==&lt;br /&gt;
=== Kernel size reduction ===&lt;br /&gt;
==== Configuration Options ====&lt;br /&gt;
* [[Kernel Size Tuning Guide]] - document about measuring kernel size and configuring the kernel for smallest size&lt;br /&gt;
&lt;br /&gt;
==== The Linux-tiny patchset ====&lt;br /&gt;
* The [[Linux Tiny]] patch set is a collection of patches which can be used to make the Linux kernel consume less space.  The long-term goal of the Linux-tiny project is to mainline these patches.  Several patches have been mainlined over the last few years, and work continues in this area.&lt;br /&gt;
&lt;br /&gt;
==== Compiler options for reducing kernel size ====&lt;br /&gt;
An LWN article talks about three gcc options to shrink the kernel.&lt;br /&gt;
&lt;br /&gt;
[http://lwn.net/Articles/67175/ Shrinking the Kernel with GCC]&lt;br /&gt;
&lt;br /&gt;
The first option is -Os which is already in the tiny kernel patch.&lt;br /&gt;
&lt;br /&gt;
Since version 3.4, gcc offered a -funit-at-a-time option.&lt;br /&gt;
This apparently made gcc do a much better job of inlining and dead code removal,&lt;br /&gt;
reducing the size of both text and data. It depended on another inlining patch.&lt;br /&gt;
According to gcc's manual, this option no longer does anything.&lt;br /&gt;
&lt;br /&gt;
The -fwhole-program --combine option set is equivalent to grouping all source files&lt;br /&gt;
and making all variables static. These options are still supported by gcc, but not longer offered in BusyBox&lt;br /&gt;
configuration options. What happened?&lt;br /&gt;
&lt;br /&gt;
Another option, -mregparm=3, seems to be x86 specific, it instructs the&lt;br /&gt;
compiler to use registers for the first three function arguments. by John Rigby&lt;br /&gt;
&lt;br /&gt;
See [http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html] for all&lt;br /&gt;
available optimization switches.&lt;br /&gt;
See [[Compiler_Optimization]] for more details on effects of optimization options.&lt;br /&gt;
&lt;br /&gt;
==== Section garbage collection patchset ====&lt;br /&gt;
These [http://busybox.net/~vda/k-sections/ patches] can shrink kernel size by ~10% by improving dead code/data elimination at link time. They are being pushed to mainline. Due to a linker [https://bugzilla.redhat.com/show_bug.cgi?id=621742 bug], their acceptance depends on a newer, fixed linker (will be in binutils-2.21). Good news are that the bug affects only certain architectures (parisc), so the patches are usable even with &amp;quot;old&amp;quot; linker.&lt;br /&gt;
&lt;br /&gt;
==== Runtime size of kernel ====&lt;br /&gt;
Often, the focus of memory size reduction for the kernel is on the size of the&lt;br /&gt;
statically compiled image for the kernel.  However, the kernel also allocates&lt;br /&gt;
memory dynamically when it runs.  On loading, the kernel creates several tables&lt;br /&gt;
for things like network and file system structures.&lt;br /&gt;
&lt;br /&gt;
Here is a table showing different kernel hash tables, and their approximate&lt;br /&gt;
size for a 2.6 kernel.  (Table taken from page 25 of&lt;br /&gt;
http://logfs.org/~joern/data_structures.pdf )&lt;br /&gt;
&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;5&amp;quot; align=&amp;quot;center&amp;quot;&lt;br /&gt;
!Hash Table         !!memory &amp;lt; 512MiB RAM !! memory &amp;gt;=512MiB RAM&lt;br /&gt;
|-&lt;br /&gt;
!                   !!32b/64b       !!32b/64b &lt;br /&gt;
|-&lt;br /&gt;
|TCP established    ||96k/192k      ||384k/768k&lt;br /&gt;
|-&lt;br /&gt;
|TCP bind           || 64k/128k     || 256k/512k&lt;br /&gt;
|-&lt;br /&gt;
|IP route cache     || 128k/256k    ||   512k/1M&lt;br /&gt;
|-&lt;br /&gt;
|Inode-cache        ||  64k/128k    ||   64k/128k&lt;br /&gt;
|-&lt;br /&gt;
|Dentry cache       ||   32k/64k    ||    32k/64k&lt;br /&gt;
|-&lt;br /&gt;
||Total             ||  384k/768k   || 1248k/2496k&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== kernel stack size =====&lt;br /&gt;
There used to be a configuration option for reducing the size of the kernel stack for each process to 4K.&lt;br /&gt;
By default (as of 2011), the default kernel stack size is 8K.  If you have a lot of processes, then &lt;br /&gt;
using 4K stacks can reduce the kernel stack usage.&lt;br /&gt;
&lt;br /&gt;
Some notes about this are at: [[Kernel Small Stacks]]&lt;br /&gt;
&lt;br /&gt;
=== Auto-reduction ===&lt;br /&gt;
In 2012, Tim Bird studied a few different techniques related to automatic size reduction and whole-system optimization.&lt;br /&gt;
Specifically, he studied the following items:&lt;br /&gt;
* link-time optimization of the kernel&lt;br /&gt;
* syscall elimination&lt;br /&gt;
* global constraints&lt;br /&gt;
* kernel stack reduction&lt;br /&gt;
&lt;br /&gt;
Tim also found some very interesting academic research on link-time re-writing and cold-code compression.&lt;br /&gt;
Tim's work will be presented at LinuxCon Japan in May, 2013.  He is working on his outline for the talk at:&lt;br /&gt;
[[System Size Auto-Reduction]]&lt;br /&gt;
&lt;br /&gt;
=== File system compression ===&lt;br /&gt;
For read-only data, it is useful to utilize a compressed file system.&lt;br /&gt;
The following are used heavily in embedded systems:&lt;br /&gt;
* Cramfs and SquashFS, for block storage.&lt;br /&gt;
* JFFS2 and its successor UBIFS, for flash (MTD) storage. &lt;br /&gt;
&lt;br /&gt;
Note that Cramfs and Squashfs, due to their &amp;quot;write-only-once&amp;quot; nature, can also be used on MTD storage. &lt;br /&gt;
&lt;br /&gt;
See the [[File Systems]] page for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Shrinking your application ===&lt;br /&gt;
==== Compiler options for program size ====&lt;br /&gt;
You can use &amp;quot;gcc -Os&amp;quot; to optimize for size.&lt;br /&gt;
&lt;br /&gt;
==== Stripping your program ====&lt;br /&gt;
You can use the 'strip' command to eliminate unneeded symbols from your application.&lt;br /&gt;
The 'strip' command should be included with your toolchain, and may be architecture-specific.&lt;br /&gt;
(I.e. you may need to run it with a toolchain prefix, like &amp;quot;arm-linux-strip&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Note that this makes debugging your application more difficult, because the debug&lt;br /&gt;
symbols are no longer available.&lt;br /&gt;
&lt;br /&gt;
By default, strip just removes debug symbols.  You can remove everything but the essential&lt;br /&gt;
symbols used for dynamic linking. To get the highest savings, use &amp;quot;strip --strip-unneeded &amp;lt;app&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
This can save a lot of space, especially if debug symbols were included in the build.&lt;br /&gt;
&lt;br /&gt;
 $ gcc -g hello.c -o hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 6143 2009-02-10 09:43 hello&lt;br /&gt;
 $ strip hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:43 hello&lt;br /&gt;
 $ strip --strip-unneeded hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:43 hello&lt;br /&gt;
&lt;br /&gt;
Now, compiles without debug symbols to start with:&lt;br /&gt;
&lt;br /&gt;
 $ gcc hello.c -o hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 4903 2009-02-10 09:45 hello&lt;br /&gt;
 $ strip hello&lt;br /&gt;
 $ ls -l hello&lt;br /&gt;
 -rwxrwxr-x 1 tbird tbird 3228 2009-02-10 09:45 hello&lt;br /&gt;
&lt;br /&gt;
You can strip both executables as well as shared libraries.&lt;br /&gt;
&lt;br /&gt;
There is a &amp;quot;super-strip&amp;quot; utility, which removes additional material from an ELF executable program (which 'strip'&lt;br /&gt;
usually misses).  It is available at: http://muppetlabs.com/~breadbox/software/elfkickers.html&lt;br /&gt;
''This program appears to be obsolete now.  I couldn't get it to compile on Fedora 8''.&lt;br /&gt;
&lt;br /&gt;
Some information about stripping individual sections by hand, using the -R command is available at: http://reverse.lostrealm.com/protect/strip.html&lt;br /&gt;
&lt;br /&gt;
==== Hand-optimizing programs, for size ====&lt;br /&gt;
If you are very intent on creating small binaries, you can use some techniques to manually&lt;br /&gt;
create the smallest Linux executables possible.&lt;br /&gt;
&lt;br /&gt;
See [http://muppetlabs.com/~breadbox/software/tiny/teensy.html A Whirlwind Tutorial on Creating Really Teensy ELF Executables for Linux]&lt;br /&gt;
&lt;br /&gt;
=== Library savings ===&lt;br /&gt;
==== Use of a smaller libc ====&lt;br /&gt;
Glibc is the default C library used for Linux systems.  Glibc is about 2 meg. in size.  Other C libraries&lt;br /&gt;
are also available for Linux, and they offer varying degrees of compatibility and size savings.&lt;br /&gt;
In general, uClibc is considered a very good alternative to glibc, for systems where size is an issue.&lt;br /&gt;
&lt;br /&gt;
* [http://uclibc.org/ uClibc] - small footprint but complete C library&lt;br /&gt;
* [http://www.fefe.de/dietlibc/ dietlibc] - another library to produce very small statically compiled executables.&lt;br /&gt;
* [http://www.kernel.org/pub/linux/libs/klibc/ klibc] - very small library for use in init ram filesystems&lt;br /&gt;
* [http://www.eglibc.org/home eglibc] - a version of glibc designed for embedded systems. Reduced footprint is one of the design goals.&lt;br /&gt;
* [http://www.musl-libc.org/ musl libc] - a lightweight, fast, simple, and standards-compliant C library&lt;br /&gt;
* [http://olibc.github.com/ olibc] - another C library optimized for size and performance, derived from Android bionic libc&lt;br /&gt;
* Subset Libc Specification - CELF once considered the possibility of creating a subset libc specification.  Some companies have also examined the possibility of modularizing glibc, so that parts of it can be made configurable.  Preliminary research indicates that this could be a very difficult thing, since glibc has very messy function interdependencies.&lt;br /&gt;
&lt;br /&gt;
==== Static Linking ====&lt;br /&gt;
If your set of applications is small, sometimes it makes more sense to statically link&lt;br /&gt;
your applications than to use shared libraries.  Shared libraries by default include all&lt;br /&gt;
symbols (functions and data structures) for the features a library provides.  However, when&lt;br /&gt;
you static link a program to a library, only the symbols that are actually referenced&lt;br /&gt;
are linked in and included in the program.&lt;br /&gt;
&lt;br /&gt;
==== Library reduction ====&lt;br /&gt;
It is possible to reduce the size of shared libraries, by eliminating unused symbols.&lt;br /&gt;
&lt;br /&gt;
MontaVista released a tool for library optimization.  This tool scans the entire file system,&lt;br /&gt;
and can rebuild the shared libraries for the system, including only the symbols needed for&lt;br /&gt;
the set of applications in the indicated file system.&lt;br /&gt;
&lt;br /&gt;
Care needs to be taken with this approach, since it may make it difficult to use add-on&lt;br /&gt;
programs or or do in-field upgrades (since symbols required by the new software may not&lt;br /&gt;
be present in the optimized libraries).  But for some fixed-function devices, this can&lt;br /&gt;
reduce your library footprint dramatically.&lt;br /&gt;
&lt;br /&gt;
See http://libraryopt.sourceforge.net/&lt;br /&gt;
&lt;br /&gt;
==== Deferred Library Loading ====&lt;br /&gt;
It is possible to reduce the RAM runtime footprint for a product, by lazily loading shared&lt;br /&gt;
libraries, and by breaking up library dependencies.  Panasonic did some research into&lt;br /&gt;
a process called Deferred Library Loading, which they presented at ELC 2007.&lt;br /&gt;
&lt;br /&gt;
See the [http://tree.celinuxforum.org/CelfPubWiki/ELC2007Presentations?action=AttachFile&amp;amp;do=get&amp;amp;target=DefferdDynamicLoading_20070417.pdf Deferred Dynamic Loading] presentation.&lt;br /&gt;
&lt;br /&gt;
=== Execute-in-place ===&lt;br /&gt;
You can save RAM memory by using some text or data directly from flash.&lt;br /&gt;
&lt;br /&gt;
==== Kernel XIP ====&lt;br /&gt;
By executing the kernel in-place from flash, it is possible to save RAM space.&lt;br /&gt;
*see [[Kernel XIP]]&lt;br /&gt;
&lt;br /&gt;
==== Application XIP ====&lt;br /&gt;
By executing applications in-place from flash, it is possible to save RAM space.&lt;br /&gt;
*see [[Application XIP]]&lt;br /&gt;
&lt;br /&gt;
==== Data Read In Place (DRIP) ====&lt;br /&gt;
This is a technique for keeping data in flash, until it is written to, and then&lt;br /&gt;
making a RAM page for it.&lt;br /&gt;
*see [[Data Read In Place]]&lt;br /&gt;
&lt;br /&gt;
== Size measurement tools and techniques ==&lt;br /&gt;
=== Kernel size measurement data ===&lt;br /&gt;
* [http://www.selenic.com/bloatwatch/ Bloatwatch] - a kernel size regression analysis tool.&lt;br /&gt;
** Bloatwatch provides a great amount of detail, and the ability to compare the size of kernel versions over time.&lt;br /&gt;
&lt;br /&gt;
=== How to measure the kernel image size ===&lt;br /&gt;
*to see the size of the major kernel sections (code and data):&lt;br /&gt;
:&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;size vmlinux */built-in.o&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[tbird@crest ebony]$ size vmlinux */built-in.o&lt;br /&gt;
   text    data     bss     dec     hex filename&lt;br /&gt;
2921377  369712  132996 3424085  343f55 vmlinux&lt;br /&gt;
 764472   35692   22768  822932   c8e94 drivers/built-in.o&lt;br /&gt;
 918344   22364   36824  977532   eea7c fs/built-in.o&lt;br /&gt;
  18260    1868    1604   21732    54e4 init/built-in.o&lt;br /&gt;
  39960     864     224   41048    a058 ipc/built-in.o&lt;br /&gt;
 257292   14656   34516  306464   4ad20 kernel/built-in.o&lt;br /&gt;
  34728     156    2280   37164    912c lib/built-in.o&lt;br /&gt;
 182312    2704     736  185752   2d598 mm/built-in.o&lt;br /&gt;
 620864   20820   26676  668360   a32c8 net/built-in.o&lt;br /&gt;
   1912       0       0    1912     778 security/built-in.o&lt;br /&gt;
    133       0       0     133      85 usr/built-in.o&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
*to see the size of the largest kernel symbols:&lt;br /&gt;
** &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;nm --size -r vmlinux&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[tbird@crest ebony]$ nm --size -r vmlinux | head -10&lt;br /&gt;
00008000 b read_buffers&lt;br /&gt;
00004000 b __log_buf&lt;br /&gt;
00003100 B ide_hwifs&lt;br /&gt;
000024f8 T jffs2_garbage_collect_pass&lt;br /&gt;
00002418 T journal_commit_transaction&lt;br /&gt;
00002400 b futex_queues&lt;br /&gt;
000021a8 t jedec_probe_chip&lt;br /&gt;
00002000 b write_buf&lt;br /&gt;
00002000 D init_thread_union&lt;br /&gt;
00001e6c t tcp_ack&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== How to measure the memory usage at runtime ===&lt;br /&gt;
See [[Runtime Memory Measurement]] for a description of ways to measure runtime memory usage in Linux.&lt;br /&gt;
&lt;br /&gt;
Also, see [[Accurate Memory Measurement]] for a description of techniques (and patches) which can be used to measure the runtime memory more accurately.&lt;br /&gt;
&lt;br /&gt;
=== Linux size increase from 2.4 to 2.6 ===&lt;br /&gt;
Linux increased in size by between 10% and 30% from version 2.4 to 2.6.  This incremental growth in kernel size has been a big concern by forum members.&lt;br /&gt;
&lt;br /&gt;
Please see the [[Szwg Linux 26Data]] page for supporting data.&lt;br /&gt;
&lt;br /&gt;
* [[Size Tunables]]&lt;br /&gt;
&lt;br /&gt;
=== GCC Code-Size Benchmarking ===&lt;br /&gt;
CSiBE is a code size benchmark for the GCC compiler. The primary purpose of CSiBE is to monitor the size of the code generated by GCC. In addition, compilation time and code performance measurements are also provided.&lt;br /&gt;
&lt;br /&gt;
[http://www.inf.u-szeged.hu/csibe/ CSiBE]&lt;br /&gt;
&lt;br /&gt;
== Case Studies ==&lt;br /&gt;
* Motorola reduction of system size (presumably for cell phones) using 2.4 Linux:  MotSizeReduction.ppt - this is a placeholder for this Powerpoint as it was too big to upload to the wiki.&lt;br /&gt;
&lt;br /&gt;
== Reduced-size distribution efforts ==&lt;br /&gt;
Here are some projects aimed at building small-sized systems:&lt;br /&gt;
* http://cgit.openembedded.org/meta-micro/&lt;br /&gt;
** It's maintained by Phil Blundell. It appears pretty successful in reducing size of the resulting image whilst keeping the system fairly functional. It uses uClibc&lt;br /&gt;
* [http://git.infradead.org/users/dvhart/meta-tiny.git Meta-tiny git repository]&lt;br /&gt;
** Meta-tiny is an effort to build a small-footprint system using Yocto, by Darren Hart&lt;br /&gt;
&lt;br /&gt;
 meta-tiny is my experimental layer where I'm looking at what we can&lt;br /&gt;
 build with our existing sources and infrastructure. I've found that we&lt;br /&gt;
 can cut the image size to about 10% of core-image-minimal without&lt;br /&gt;
 changes to source code, but dropping a lot of functionality. We can get&lt;br /&gt;
 to something like 20% while still maintaining ipv4 networking.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Other Tidbits on System Size ==&lt;br /&gt;
=== Memory leak detection for the kernel ===&lt;br /&gt;
Catalin Marinas of ARM has been recently (as of 2.6.17?) been posting a memory leak detector for the Linux kernel.  It may get mainlined in the future.  Here's a link to the LKML discussions around it: http://lkml.org/lkml/2006/6/11/39&lt;br /&gt;
&lt;br /&gt;
=== How System Size may affect performance ===&lt;br /&gt;
It has long been theorized that reducing system size could provide a performance benefit&lt;br /&gt;
because it could reduce cache misses.  There does not appear to be hard data to support&lt;br /&gt;
this theory on Linux, but this has been discussed on the kernel mailing list.&lt;br /&gt;
&lt;br /&gt;
See [http://groups.google.com/group/linux.kernel/msg/e1f9f579a946333e?hl=en&amp;amp; this post by Linus Torvalds]&lt;br /&gt;
&lt;br /&gt;
=== Stripping down the filesystem of a desktop distribution ===&lt;br /&gt;
Here is a good document with tips on how to strip out unneeded files from a desktop distribution.&lt;br /&gt;
The example distribution used here is Linux From Scratch, but the tips should work with many&lt;br /&gt;
distributions.&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfromscratch.org/hints/downloads/files/OLD/stripped-down.txt&lt;br /&gt;
&lt;br /&gt;
=== Extremely-minimal systems ===&lt;br /&gt;
This section lists various efforts to produce the absolute smallest system possible.&lt;br /&gt;
&lt;br /&gt;
* Someone is running an old version of BSD on a small processor with only 128K (that's right 'K'!!) of RAM.&lt;br /&gt;
** http://olimex.wordpress.com/2012/04/04/unix-on-pic32-meet-retrobsd-for-duinomite/&lt;br /&gt;
&lt;br /&gt;
[[Category:System Size]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Yocto_Project_Introduction</id>
		<title>Yocto Project Introduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Yocto_Project_Introduction"/>
				<updated>2013-03-28T20:49:48Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Build work areas */ improve wording&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an introduction about the Yocto Project, written from the point of view of someone&lt;br /&gt;
somewhat familiar with embedded Linux development and embedded Linux distribution maintenance.&lt;br /&gt;
In my own investigation of the Yocto Project, I found that there were a few key concepts that&lt;br /&gt;
I didn't find discussed or presented anywhere.  I'd like to fix that with this page.  The purpose&lt;br /&gt;
of this page is to give a broad overview of how the project technically works, so that the learning&lt;br /&gt;
curve for people approaching the Yocto Project for the first time is lessened.&lt;br /&gt;
&lt;br /&gt;
[''As of November 2012, this document is still under construction...'']&lt;br /&gt;
&lt;br /&gt;
== The big picture ==&lt;br /&gt;
The Yocto Project is a collection of tools and meta-data (defined in a bit) that allows a&lt;br /&gt;
developer to build their own custom distribution of Linux for their embedded platform.&lt;br /&gt;
This could be a developer at a semi-conductor company, who wishes to develop board support&lt;br /&gt;
for one of their hardware platforms, or it could be an independent developer writing a&lt;br /&gt;
complete software stack for a product they are making.  It could also be a group of engineers&lt;br /&gt;
developing a distribution for use in multiple devices or products -- such as an embedded&lt;br /&gt;
Linux distribution company, or the &amp;quot;systems&amp;quot; team at a company that produces multiple&lt;br /&gt;
embedded Linux products.&lt;br /&gt;
&lt;br /&gt;
== The main parts ==&lt;br /&gt;
The main parts of the Yocto Project are the build system, the package meta-data, and the developer tools.&lt;br /&gt;
The build system uses a tool called &amp;quot;bitbake&amp;quot; to process the meta-data&lt;br /&gt;
and produce a complete Linux distribution.  By design, the build system&lt;br /&gt;
produces not just the software that will run on the target, but also the development tools&lt;br /&gt;
used to build that software.  It basically starts completely from scratch, building all the tools&lt;br /&gt;
needed to construct the software, and then using those to build the kernel, libraries, and programs that comprise&lt;br /&gt;
a Linux distribution.  Finally, it prepares the resulting software by placing it into appropriate bundles&lt;br /&gt;
(including packages, images, or both) for deployment to the target device and in preparation for application development&lt;br /&gt;
and debugging.  The Yocto Project also includes various additional tools used to develop embedded Linux or applications&lt;br /&gt;
on top of it.  This includes things such as emulators, IDEs and host/target (cross) agents and debug tools.&lt;br /&gt;
&lt;br /&gt;
Let's start by describing some of the concepts of the build system...&lt;br /&gt;
&lt;br /&gt;
=== Build system ===&lt;br /&gt;
The primary tool used in the build system is called 'bitbake'.&lt;br /&gt;
Bitbake has a user-manual at http://docs.openembedded.org/bitbake/html/ .  (As of August, 2012, this document appears to be&lt;br /&gt;
a bit dated, and missing a few items of importance.)  Basically, bitbake can be thought of as &amp;quot;make&amp;quot; on steroids.&lt;br /&gt;
It basically performs the same type of functionality as make - which is: determining the actions to perform based on 1) what the user requests at the command line, 2) the project data and 3) the existing build state, and then performing those actions.&lt;br /&gt;
&lt;br /&gt;
Bitbake uses files with it's own new syntax for expressing:&lt;br /&gt;
* the tasks to perform&lt;br /&gt;
* the relationships (dependencies) between those tasks&lt;br /&gt;
* the variables that control how the tasks are performed&lt;br /&gt;
* the actual build instructions (e.g. compiler commands, linker commands, packaging commands, etc.)&lt;br /&gt;
&lt;br /&gt;
Bitbake differs from 'make' in several key ways.  The first is that it has a global view of the task list&lt;br /&gt;
for a distribution.  That is, it reads the entire set of files related to the distribution, and determines&lt;br /&gt;
the global task list for a particular high-level build operation.  This is considerably different from 'make', which&lt;br /&gt;
processes just a single Makefile at a time.  (Admittedly, 'make' can be made to work with extremely large projects,&lt;br /&gt;
using complex include schemes and nested invocations.  However, even these types of systems are rarely used for&lt;br /&gt;
something as complex as a complete Linux distribution build.)&lt;br /&gt;
&lt;br /&gt;
Another apparent difference is that the syntax of the files that bitbake processes allows for a very &lt;br /&gt;
high degree of flexibility in defining the tasks that should be performed and the variables that control&lt;br /&gt;
the build process and output.&lt;br /&gt;
&lt;br /&gt;
[note to consider: maybe too much flexibility?]&lt;br /&gt;
&lt;br /&gt;
A variety of mechanisms (described in the bitbake manual) are used to control what operations are performed&lt;br /&gt;
and what variables are used to control them.  bitbake supports inheritance mechanisms, to allow for a class-like&lt;br /&gt;
definition of common operations.  These common operations can be inherited and customized for specific situations.&lt;br /&gt;
Bitbake also supports conditional definition of new tasks, and has the ability to customize or eliminate (mask)&lt;br /&gt;
tasks based on variables computed during the build.&lt;br /&gt;
&lt;br /&gt;
Bitbake is written in Python, and some aspects of the build system can be written using short&lt;br /&gt;
Python snippets as well.  Many aspects of the system are written in snippets of shell code as well.&lt;br /&gt;
&lt;br /&gt;
A cheat-sheet for bitbake is at: [[Bitbake Cheat Sheet]]&lt;br /&gt;
&lt;br /&gt;
=== The meta-data ===&lt;br /&gt;
A key element of the Yocto Project is the meta-data which is used to construct a Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Meta-data refers to the build instructions themselves, as well as the data used to control what things&lt;br /&gt;
get built and to affect how they are built. The meta-data also includes commands and data used to&lt;br /&gt;
indicate what versions of software are used, and where they are obtained from.  The meta-data also consist&lt;br /&gt;
of changes or additions to the software itself (patches or auxiliary files) which are used to fix bugs or&lt;br /&gt;
customize the software for use in a particular situation.&lt;br /&gt;
&lt;br /&gt;
The build instructions consists of commands to execute the compiler, linker, archiver, packaging tools and&lt;br /&gt;
other programs.&lt;br /&gt;
&lt;br /&gt;
The Yocto Project provides the build tool (bitbake) and meta-data itself, for a few distributions.  Much &lt;br /&gt;
of this meta-data can be re-used when someone is building their own distribution.  The Yocto Project is &lt;br /&gt;
related to the OpenEmbedded project, where the bitbake tool, much of the meta-data, and many of the&lt;br /&gt;
meta-data concepts originated.&lt;br /&gt;
&lt;br /&gt;
Each software component on the system (such as an individual program) has associated with it one or more&lt;br /&gt;
files to express it's meta-data (dependencies, patches, build instructions).&lt;br /&gt;
A top-level (usually single) file that defines the 'tasks' for the software is provided in a &amp;quot;.bb&amp;quot; (bitbake) file.&lt;br /&gt;
This is referred to as that component's &amp;quot;recipe&amp;quot; file. &lt;br /&gt;
This file may be terse, as the system allows for inheritance and inclusion. &lt;br /&gt;
Class files (.bbclass) are used to express the meta-data for commonly-used&lt;br /&gt;
types of build and packaging operations.  These files are 'inherit'ed into a recipe.&lt;br /&gt;
Include files (.inc) are sometimes used to provide a common set of definitions,&lt;br /&gt;
which can be customized for a particular version of the software.  These files are included&lt;br /&gt;
into a recipe using a 'require' command.  Finally, patches and&lt;br /&gt;
auxiliary files may be associated with recipe.  These files can be referenced by the&lt;br /&gt;
build instructions (eg. applied to the software after fetching it and before compiling it in the case&lt;br /&gt;
of patches) of the recipe.&lt;br /&gt;
&lt;br /&gt;
A set of bitbake files that are related to a particular feature area can be organized into a &amp;quot;layer&amp;quot;.  This&lt;br /&gt;
represents a collection of software or build tasks that can included into an overall distribution.&lt;br /&gt;
&lt;br /&gt;
Finally, a user selects the individual bitbake files to include, or sets of files from different layers,&lt;br /&gt;
by referencing them in their local configuration (conf/bblayers.conf) and defining build control variables - also&lt;br /&gt;
in their local configuration (conf/local.conf).&lt;br /&gt;
&lt;br /&gt;
=== Build stages ===&lt;br /&gt;
The recipes for a distribution define a number of discreet tasks that are performed to accomplish the build.&lt;br /&gt;
The tasks have names such as 'fetch', 'configure', 'compile'.  Internally, these tasks are prefixed with 'do_'&lt;br /&gt;
(eg. do_configure)&lt;br /&gt;
&lt;br /&gt;
There can be a large number of tasks associated with a software component.  By default, bitbake performs all&lt;br /&gt;
tasks associated with building a software component and preparing it for deployment.  However, bitbake can&lt;br /&gt;
be used to perform just a single task relative to a component, using the '-c' command line option.&lt;br /&gt;
&lt;br /&gt;
For example, to just perform the 'configure' task for the busybox software, you can do the following:&lt;br /&gt;
 bitbake busybox -c configure&lt;br /&gt;
Note that if busybox has already been built, this command might not do anything (because bitbake avoids&lt;br /&gt;
re-running tasks that are not needed, like 'make').  To force it, you could use the '-f' option:&lt;br /&gt;
 bitbake busybox -c configure -f&lt;br /&gt;
&lt;br /&gt;
Not every software component needs every build stage, so some might not be defined for a component.&lt;br /&gt;
To see the list of tasks that a recipe defines for a component, execute the 'listtasks' task for&lt;br /&gt;
that component:&lt;br /&gt;
 bitbake busybox -c listtasks&lt;br /&gt;
&lt;br /&gt;
This is a list of the tasks associated with busybox (as of Poky version 7.0)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_fetchall&lt;br /&gt;
do_build&lt;br /&gt;
do_devshell&lt;br /&gt;
do_cleansstate&lt;br /&gt;
do_configure&lt;br /&gt;
do_cleanall&lt;br /&gt;
do_populate_lic&lt;br /&gt;
do_package_write&lt;br /&gt;
do_populate_sysroot&lt;br /&gt;
do_buildall&lt;br /&gt;
do_package_write_rpm&lt;br /&gt;
do_menuconfig&lt;br /&gt;
do_populate_lic_setscene&lt;br /&gt;
do_patch&lt;br /&gt;
do_listtasks&lt;br /&gt;
do_compile&lt;br /&gt;
do_package_setscene&lt;br /&gt;
do_fetch&lt;br /&gt;
do_checkuri&lt;br /&gt;
do_clean&lt;br /&gt;
do_package_write_rpm_setscene&lt;br /&gt;
do_package&lt;br /&gt;
do_unpack&lt;br /&gt;
do_install&lt;br /&gt;
do_populate_sysroot_setscene&lt;br /&gt;
do_checkuriall&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general, a build proceed through the stages in order: fetch, configure, compile, install, and package the&lt;br /&gt;
software.&lt;br /&gt;
&lt;br /&gt;
=== Build work areas ===&lt;br /&gt;
The area where each software component is built is dependent on the recipe name, the distro name, build tool and&lt;br /&gt;
the target architecture for the component.  During the build, some items are built for the host machine&lt;br /&gt;
and some are built for the target machine.  In non-embedded Linux, the machine you build and debug on and the machine&lt;br /&gt;
you compile for (run the software on) are very often the same.  However, in embedded Linux these are often different machines,&lt;br /&gt;
and often they even have different CPU architectures.&lt;br /&gt;
&lt;br /&gt;
The directory used for an individual component is something like:&lt;br /&gt;
  &amp;lt;build_top_dir&amp;gt;/tmp/work/&amp;lt;arch-distro-tool-dir&amp;gt;/&amp;lt;package_name_and_version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, in a build of the busybox code for the ARM qemu emulator platform with yocto version 7.0 was&lt;br /&gt;
located in: &amp;lt;build_top_dir&amp;gt;/tmp/work/armv5te-poky-linux-gnueabi/busybox-1.19.4-r2&lt;br /&gt;
&lt;br /&gt;
The build directory for the sqlite database tool, for use on my Ubuntu 12.04 (x86_64) host, was located&lt;br /&gt;
at: &amp;lt;build_top_dir&amp;gt;/tmp/work/x86_64-linux/sqlite3-native-3.7.10-r2&lt;br /&gt;
&lt;br /&gt;
The work directory for a software component contains not only the source code for the item, but additional&lt;br /&gt;
data related to building it, staging it for installation into a package or image, and a 'temp' directory&lt;br /&gt;
which has logs of the various build tasks.  It is useful to know the work directory if you want to customize&lt;br /&gt;
the software (for example if you need to make a bugfix or apply some external patch), or determine&lt;br /&gt;
why some build operation (such as fetching, compiling, packaging, etc.) is failing.&lt;br /&gt;
&lt;br /&gt;
In the 'temp' directory under the work directory are both 'run' files and log files.  The&lt;br /&gt;
'run' files are actually shell scripts or python scripts that are executed&lt;br /&gt;
during the different build stages. The log files have the output from the commands that&lt;br /&gt;
were used to build the software.&lt;br /&gt;
&lt;br /&gt;
Other directories under the work directory are used for packaging the software's output files, or&lt;br /&gt;
staging them for inclusion in a system image, or for staging other information about the package,&lt;br /&gt;
such as it's software license.&lt;br /&gt;
&lt;br /&gt;
=== Build output ===&lt;br /&gt;
The software for an embedded device can be packaged multiple different ways in preparation for deployment to the&lt;br /&gt;
actual device.  For some systems, the built software is packaged into a kernel and a filesystem image, which can then be&lt;br /&gt;
directly written to flash or storage media on the device.  For other systems, the software may be bundled as&lt;br /&gt;
packages (similar to the way desktop distributions of Linux are delivered).  These might require developer&lt;br /&gt;
or even end-user installation on the target device.  The Yocto Project build system is capable of producing&lt;br /&gt;
images and packages in several formats, that are selectable by the developer in the local configuration for the&lt;br /&gt;
distribution.  For example, three of the different package formats that can be built by yocto&lt;br /&gt;
are: debian packages (.deb), redhat package manager files (.rpm), and itsy packages (.ipk).&lt;br /&gt;
&lt;br /&gt;
The directory where the software resides after a typical build is: &amp;lt;build_top_dir&amp;gt;/tmp/deploy and &amp;lt;build_top_dir&amp;gt;/tmp/sysroots.&lt;br /&gt;
The 'sysroots' directory contains the directory structure and contents for the root filesystem for a target build.&lt;br /&gt;
(Except it seems to be missing /dev, and it doesn't have root ownership - it probably needs pseudo to see the full contents).  The 'deploy' directory has the images or packages that are ready to be installed on the device.&lt;br /&gt;
&lt;br /&gt;
=== Development tools ===&lt;br /&gt;
[''need to write about building and SDK, and the IDE here'']&lt;br /&gt;
&lt;br /&gt;
== Now for some details ==&lt;br /&gt;
[''it would be good to fill out the following sections'']&lt;br /&gt;
&lt;br /&gt;
=== How recipes and tasks are found, parsed, and processed ===&lt;br /&gt;
Bitbake reads the entire set of recipe files that are specified by&lt;br /&gt;
the local configuration, and parses them all into a global task namespace.&lt;br /&gt;
This includes all the class files and include files as well.  These&lt;br /&gt;
are specified by the BBFILES and BBLAYERS variables in the conf/bblayers.conf&lt;br /&gt;
file.  Within the layers directories, the &amp;lt;layer-dir&amp;gt;/conf/layer.conf&lt;br /&gt;
file is used to indicate the set of .bb files to parse for that layer.&lt;br /&gt;
&lt;br /&gt;
Note that this global parse of the entire set of recipe files is&lt;br /&gt;
quite different from 'make', which usually operated on a single Makefile.&lt;br /&gt;
(This is also why bitbake startup is a little slow).&lt;br /&gt;
&lt;br /&gt;
Information in the meta-data (the DEPENDS and PROVIDES lines) determine&lt;br /&gt;
package ordering.  Where packages are independent of each other, the&lt;br /&gt;
build order is dependent (I believe) on file parse order.  In this case,&lt;br /&gt;
processing is not required to be in any particular order (and, in fact,&lt;br /&gt;
can be parallelized). You can have bitbake produce the dependency graph&lt;br /&gt;
of the packages for your build by using the -g option.  This produces output in&lt;br /&gt;
'dot' syntax (suitable for processing using some graphviz visualizer).&lt;br /&gt;
&lt;br /&gt;
The list of tasks to perform within a package appears to come&lt;br /&gt;
from the common class meta-data&lt;br /&gt;
(see meta/classes/utility-tasks.bbclass, for example) and the&lt;br /&gt;
meta-data for the individual package  These are added by&lt;br /&gt;
the 'addtask' keyword.  You can see a list of tasks for an&lt;br /&gt;
individual package with: bitbake &amp;lt;pkg&amp;gt; -c listtasks&lt;br /&gt;
&lt;br /&gt;
=== fetching tips ===&lt;br /&gt;
[''info about fetch mechanisms, proxies, mirrors, etc.'']&lt;br /&gt;
&lt;br /&gt;
=== recipe features that control the build ===&lt;br /&gt;
[''document the 'important' variables that show up everywhere in the .bb files (eg PN)'']&lt;br /&gt;
[''how does append work, how does masking work, how do constraints work'']]&lt;br /&gt;
&lt;br /&gt;
=== extracting stuff ===&lt;br /&gt;
[''where to pull stuff out - maybe covered already'']&lt;br /&gt;
&lt;br /&gt;
=== changing stuff ===&lt;br /&gt;
[''how to adjust your recipe list, how to adjust the configurations of the packages, how to adjust the included files'']&lt;br /&gt;
&lt;br /&gt;
=== adding stuff ===&lt;br /&gt;
[''how to add a 'hello world' package, your own kernel, your own library'']&lt;br /&gt;
&lt;br /&gt;
== More neat stuff ==&lt;br /&gt;
[''mention HOB, the build appliance, build servers, shared state'']&lt;br /&gt;
&lt;br /&gt;
== Notes that need fleshing out... (this area a work-in-progress) ==&lt;br /&gt;
=== list recipes ===&lt;br /&gt;
How to see the recipes that are visible for a configuration:&lt;br /&gt;
* bitbake-layers show-recipes&lt;br /&gt;
&lt;br /&gt;
=== list available images ===&lt;br /&gt;
How to see the available images in the layers that are in a repository:&lt;br /&gt;
ls meta*/recipes*/images/*.bb&lt;br /&gt;
&lt;br /&gt;
Apparently, a distribution is defined with an &amp;quot;image&amp;quot; recipe.&lt;br /&gt;
&lt;br /&gt;
The image recipe includes, among other things, a definition&lt;br /&gt;
for IMAGE_FEATURES, which lists some items that will be included.&lt;br /&gt;
&lt;br /&gt;
The items listed in the IMAGE_FEATURES and IMAGE_FEATURE_EXTRAS&lt;br /&gt;
are ??? (things that are provided by other recipes??)&lt;br /&gt;
&lt;br /&gt;
=== list available distros ===&lt;br /&gt;
The main item in a distro is the definition of DISTRO_FEATURES, which specifies&lt;br /&gt;
the things to include in that distribution.  These items correspond to ???&lt;br /&gt;
(things that are provided by other recipes???)&lt;br /&gt;
&lt;br /&gt;
=== the flow of control ===&lt;br /&gt;
local.conf specifies:&lt;br /&gt;
* MACHINE - this indicates the target platform (board or emulator) for the build&lt;br /&gt;
* DISTRO - this indicates the base distribution for the build&lt;br /&gt;
* IMAGE_EXTRA_FEATURES - adds any extra items to any images that are built&lt;br /&gt;
&lt;br /&gt;
bblayers.conf specifies:&lt;br /&gt;
* BBLAYERS - the list of layer directories where classes and recipes are found&lt;br /&gt;
&lt;br /&gt;
* How to know what machines are available?&lt;br /&gt;
** 'ls meta*/conf/machine/*.conf'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta/conf/machine/qemuarm.conf&lt;br /&gt;
meta/conf/machine/qemumips.conf&lt;br /&gt;
meta/conf/machine/qemuppc.conf&lt;br /&gt;
meta/conf/machine/qemux86-64.conf&lt;br /&gt;
meta/conf/machine/qemux86.conf&lt;br /&gt;
meta-yocto/conf/machine/atom-pc.conf&lt;br /&gt;
meta-yocto/conf/machine/beagleboard.conf&lt;br /&gt;
meta-yocto/conf/machine/mpc8315e-rdb.conf&lt;br /&gt;
meta-yocto/conf/machine/routerstationpro.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The meta-ti layer adds the following machines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta-ti/conf/machine/am180x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am335x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am3517-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am37x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am387x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am389x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/beagleboard.conf&lt;br /&gt;
meta-ti/conf/machine/beaglebone.conf&lt;br /&gt;
meta-ti/conf/machine/c6a814x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/c6a816x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/dm814x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/hawkboard.conf&lt;br /&gt;
meta-ti/conf/machine/omap3evm.conf&lt;br /&gt;
meta-ti/conf/machine/omap3-touchbook.conf&lt;br /&gt;
meta-ti/conf/machine/pandaboard.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How to know what layers are available?&lt;br /&gt;
** ls -d1 meta*&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta&lt;br /&gt;
meta-demoapps&lt;br /&gt;
meta-hob&lt;br /&gt;
meta-skeleton&lt;br /&gt;
meta-ti&lt;br /&gt;
meta-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How to know what distros are available?&lt;br /&gt;
** ls meta*/conf/distro/*.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta/conf/distro/defaultsetup.conf&lt;br /&gt;
meta-yocto/conf/distro/poky-bleeding.conf&lt;br /&gt;
meta-yocto/conf/distro/poky.conf&lt;br /&gt;
meta-yocto/conf/distro/poky-lsb.conf&lt;br /&gt;
meta-yocto/conf/distro/poky-tiny.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How to know what images are available?&lt;br /&gt;
** ls meta*/recipe*/images/*.bb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta-hob/recipes-core/images/hob-image.bb&lt;br /&gt;
meta/recipes-core/images/core-image-base.bb&lt;br /&gt;
meta/recipes-core/images/core-image-core.bb&lt;br /&gt;
meta/recipes-core/images/core-image-minimal.bb&lt;br /&gt;
meta/recipes-core/images/core-image-minimal-dev.bb&lt;br /&gt;
meta/recipes-core/images/core-image-minimal-initramfs.bb&lt;br /&gt;
meta/recipes-core/images/core-image-minimal-mtdutils.bb&lt;br /&gt;
meta/recipes-core/images/self-hosted-image.bb&lt;br /&gt;
meta/recipes-extended/images/core-image-basic.bb&lt;br /&gt;
meta/recipes-extended/images/core-image-lsb.bb&lt;br /&gt;
meta/recipes-extended/images/core-image-lsb-dev.bb&lt;br /&gt;
meta/recipes-extended/images/core-image-lsb-sdk.bb&lt;br /&gt;
meta/recipes-graphics/images/core-image-clutter.bb&lt;br /&gt;
meta/recipes-graphics/images/core-image-gtk-directfb.bb&lt;br /&gt;
meta/recipes-qt/images/qt4e-demo-image.bb&lt;br /&gt;
meta/recipes-rt/images/core-image-rt.bb&lt;br /&gt;
meta/recipes-rt/images/core-image-rt-sdk.bb&lt;br /&gt;
meta/recipes-sato/images/core-image-sato.bb&lt;br /&gt;
meta/recipes-sato/images/core-image-sato-dev.bb&lt;br /&gt;
meta/recipes-sato/images/core-image-sato-sdk.bb&lt;br /&gt;
meta-ti/recipes-misc/images/cloud9-gfx-image.bb&lt;br /&gt;
meta-ti/recipes-misc/images/cloud9-gnome-image.bb&lt;br /&gt;
meta-ti/recipes-misc/images/cloud9-image.bb&lt;br /&gt;
meta-ti/recipes-misc/images/ti-hw-bringup-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How to know what recipes are available (overall)?&lt;br /&gt;
** ls meta*/recipe*/*/*.bb&lt;br /&gt;
&lt;br /&gt;
* How to know what recipes are visible to your build (based on your configuration settings)?&lt;br /&gt;
** bitbake-layers show-recipes&lt;br /&gt;
&lt;br /&gt;
* How to list the tasks are visible to your build based on your configuration settings?&lt;br /&gt;
** bitbake -c listtasks &amp;lt;image-or-recipe-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== build variables ===&lt;br /&gt;
* How can one know all the different build variables there are, and how to set them?&lt;br /&gt;
** The best place to start is by looking in the [http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#ref-variables-glos Poky Reference Manual variable glossary]&lt;br /&gt;
&lt;br /&gt;
* bitbake -e &amp;lt;recipe&amp;gt; | grep &amp;quot;^S=&amp;quot; - print the source directory for a recipe&lt;br /&gt;
&lt;br /&gt;
* bitbake -e &amp;lt;recipe&amp;gt; | grep &amp;quot;^WORKDIR=&amp;quot; - print the working directory for a recipe&lt;br /&gt;
&lt;br /&gt;
== Comparison with other systems ==&lt;br /&gt;
It would be nice to compare and contrast Yocto Project Poky with other build systems, specifically:&lt;br /&gt;
* OpenEmbedded&lt;br /&gt;
* Buildroot&lt;br /&gt;
* ptxdist&lt;br /&gt;
* Embedded Debian&lt;br /&gt;
* [[Target Wizard]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Yocto_Project_Introduction</id>
		<title>Yocto Project Introduction</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Yocto_Project_Introduction"/>
				<updated>2013-03-28T20:48:04Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Build work areas */ fix typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an introduction about the Yocto Project, written from the point of view of someone&lt;br /&gt;
somewhat familiar with embedded Linux development and embedded Linux distribution maintenance.&lt;br /&gt;
In my own investigation of the Yocto Project, I found that there were a few key concepts that&lt;br /&gt;
I didn't find discussed or presented anywhere.  I'd like to fix that with this page.  The purpose&lt;br /&gt;
of this page is to give a broad overview of how the project technically works, so that the learning&lt;br /&gt;
curve for people approaching the Yocto Project for the first time is lessened.&lt;br /&gt;
&lt;br /&gt;
[''As of November 2012, this document is still under construction...'']&lt;br /&gt;
&lt;br /&gt;
== The big picture ==&lt;br /&gt;
The Yocto Project is a collection of tools and meta-data (defined in a bit) that allows a&lt;br /&gt;
developer to build their own custom distribution of Linux for their embedded platform.&lt;br /&gt;
This could be a developer at a semi-conductor company, who wishes to develop board support&lt;br /&gt;
for one of their hardware platforms, or it could be an independent developer writing a&lt;br /&gt;
complete software stack for a product they are making.  It could also be a group of engineers&lt;br /&gt;
developing a distribution for use in multiple devices or products -- such as an embedded&lt;br /&gt;
Linux distribution company, or the &amp;quot;systems&amp;quot; team at a company that produces multiple&lt;br /&gt;
embedded Linux products.&lt;br /&gt;
&lt;br /&gt;
== The main parts ==&lt;br /&gt;
The main parts of the Yocto Project are the build system, the package meta-data, and the developer tools.&lt;br /&gt;
The build system uses a tool called &amp;quot;bitbake&amp;quot; to process the meta-data&lt;br /&gt;
and produce a complete Linux distribution.  By design, the build system&lt;br /&gt;
produces not just the software that will run on the target, but also the development tools&lt;br /&gt;
used to build that software.  It basically starts completely from scratch, building all the tools&lt;br /&gt;
needed to construct the software, and then using those to build the kernel, libraries, and programs that comprise&lt;br /&gt;
a Linux distribution.  Finally, it prepares the resulting software by placing it into appropriate bundles&lt;br /&gt;
(including packages, images, or both) for deployment to the target device and in preparation for application development&lt;br /&gt;
and debugging.  The Yocto Project also includes various additional tools used to develop embedded Linux or applications&lt;br /&gt;
on top of it.  This includes things such as emulators, IDEs and host/target (cross) agents and debug tools.&lt;br /&gt;
&lt;br /&gt;
Let's start by describing some of the concepts of the build system...&lt;br /&gt;
&lt;br /&gt;
=== Build system ===&lt;br /&gt;
The primary tool used in the build system is called 'bitbake'.&lt;br /&gt;
Bitbake has a user-manual at http://docs.openembedded.org/bitbake/html/ .  (As of August, 2012, this document appears to be&lt;br /&gt;
a bit dated, and missing a few items of importance.)  Basically, bitbake can be thought of as &amp;quot;make&amp;quot; on steroids.&lt;br /&gt;
It basically performs the same type of functionality as make - which is: determining the actions to perform based on 1) what the user requests at the command line, 2) the project data and 3) the existing build state, and then performing those actions.&lt;br /&gt;
&lt;br /&gt;
Bitbake uses files with it's own new syntax for expressing:&lt;br /&gt;
* the tasks to perform&lt;br /&gt;
* the relationships (dependencies) between those tasks&lt;br /&gt;
* the variables that control how the tasks are performed&lt;br /&gt;
* the actual build instructions (e.g. compiler commands, linker commands, packaging commands, etc.)&lt;br /&gt;
&lt;br /&gt;
Bitbake differs from 'make' in several key ways.  The first is that it has a global view of the task list&lt;br /&gt;
for a distribution.  That is, it reads the entire set of files related to the distribution, and determines&lt;br /&gt;
the global task list for a particular high-level build operation.  This is considerably different from 'make', which&lt;br /&gt;
processes just a single Makefile at a time.  (Admittedly, 'make' can be made to work with extremely large projects,&lt;br /&gt;
using complex include schemes and nested invocations.  However, even these types of systems are rarely used for&lt;br /&gt;
something as complex as a complete Linux distribution build.)&lt;br /&gt;
&lt;br /&gt;
Another apparent difference is that the syntax of the files that bitbake processes allows for a very &lt;br /&gt;
high degree of flexibility in defining the tasks that should be performed and the variables that control&lt;br /&gt;
the build process and output.&lt;br /&gt;
&lt;br /&gt;
[note to consider: maybe too much flexibility?]&lt;br /&gt;
&lt;br /&gt;
A variety of mechanisms (described in the bitbake manual) are used to control what operations are performed&lt;br /&gt;
and what variables are used to control them.  bitbake supports inheritance mechanisms, to allow for a class-like&lt;br /&gt;
definition of common operations.  These common operations can be inherited and customized for specific situations.&lt;br /&gt;
Bitbake also supports conditional definition of new tasks, and has the ability to customize or eliminate (mask)&lt;br /&gt;
tasks based on variables computed during the build.&lt;br /&gt;
&lt;br /&gt;
Bitbake is written in Python, and some aspects of the build system can be written using short&lt;br /&gt;
Python snippets as well.  Many aspects of the system are written in snippets of shell code as well.&lt;br /&gt;
&lt;br /&gt;
A cheat-sheet for bitbake is at: [[Bitbake Cheat Sheet]]&lt;br /&gt;
&lt;br /&gt;
=== The meta-data ===&lt;br /&gt;
A key element of the Yocto Project is the meta-data which is used to construct a Linux distribution.&lt;br /&gt;
&lt;br /&gt;
Meta-data refers to the build instructions themselves, as well as the data used to control what things&lt;br /&gt;
get built and to affect how they are built. The meta-data also includes commands and data used to&lt;br /&gt;
indicate what versions of software are used, and where they are obtained from.  The meta-data also consist&lt;br /&gt;
of changes or additions to the software itself (patches or auxiliary files) which are used to fix bugs or&lt;br /&gt;
customize the software for use in a particular situation.&lt;br /&gt;
&lt;br /&gt;
The build instructions consists of commands to execute the compiler, linker, archiver, packaging tools and&lt;br /&gt;
other programs.&lt;br /&gt;
&lt;br /&gt;
The Yocto Project provides the build tool (bitbake) and meta-data itself, for a few distributions.  Much &lt;br /&gt;
of this meta-data can be re-used when someone is building their own distribution.  The Yocto Project is &lt;br /&gt;
related to the OpenEmbedded project, where the bitbake tool, much of the meta-data, and many of the&lt;br /&gt;
meta-data concepts originated.&lt;br /&gt;
&lt;br /&gt;
Each software component on the system (such as an individual program) has associated with it one or more&lt;br /&gt;
files to express it's meta-data (dependencies, patches, build instructions).&lt;br /&gt;
A top-level (usually single) file that defines the 'tasks' for the software is provided in a &amp;quot;.bb&amp;quot; (bitbake) file.&lt;br /&gt;
This is referred to as that component's &amp;quot;recipe&amp;quot; file. &lt;br /&gt;
This file may be terse, as the system allows for inheritance and inclusion. &lt;br /&gt;
Class files (.bbclass) are used to express the meta-data for commonly-used&lt;br /&gt;
types of build and packaging operations.  These files are 'inherit'ed into a recipe.&lt;br /&gt;
Include files (.inc) are sometimes used to provide a common set of definitions,&lt;br /&gt;
which can be customized for a particular version of the software.  These files are included&lt;br /&gt;
into a recipe using a 'require' command.  Finally, patches and&lt;br /&gt;
auxiliary files may be associated with recipe.  These files can be referenced by the&lt;br /&gt;
build instructions (eg. applied to the software after fetching it and before compiling it in the case&lt;br /&gt;
of patches) of the recipe.&lt;br /&gt;
&lt;br /&gt;
A set of bitbake files that are related to a particular feature area can be organized into a &amp;quot;layer&amp;quot;.  This&lt;br /&gt;
represents a collection of software or build tasks that can included into an overall distribution.&lt;br /&gt;
&lt;br /&gt;
Finally, a user selects the individual bitbake files to include, or sets of files from different layers,&lt;br /&gt;
by referencing them in their local configuration (conf/bblayers.conf) and defining build control variables - also&lt;br /&gt;
in their local configuration (conf/local.conf).&lt;br /&gt;
&lt;br /&gt;
=== Build stages ===&lt;br /&gt;
The recipes for a distribution define a number of discreet tasks that are performed to accomplish the build.&lt;br /&gt;
The tasks have names such as 'fetch', 'configure', 'compile'.  Internally, these tasks are prefixed with 'do_'&lt;br /&gt;
(eg. do_configure)&lt;br /&gt;
&lt;br /&gt;
There can be a large number of tasks associated with a software component.  By default, bitbake performs all&lt;br /&gt;
tasks associated with building a software component and preparing it for deployment.  However, bitbake can&lt;br /&gt;
be used to perform just a single task relative to a component, using the '-c' command line option.&lt;br /&gt;
&lt;br /&gt;
For example, to just perform the 'configure' task for the busybox software, you can do the following:&lt;br /&gt;
 bitbake busybox -c configure&lt;br /&gt;
Note that if busybox has already been built, this command might not do anything (because bitbake avoids&lt;br /&gt;
re-running tasks that are not needed, like 'make').  To force it, you could use the '-f' option:&lt;br /&gt;
 bitbake busybox -c configure -f&lt;br /&gt;
&lt;br /&gt;
Not every software component needs every build stage, so some might not be defined for a component.&lt;br /&gt;
To see the list of tasks that a recipe defines for a component, execute the 'listtasks' task for&lt;br /&gt;
that component:&lt;br /&gt;
 bitbake busybox -c listtasks&lt;br /&gt;
&lt;br /&gt;
This is a list of the tasks associated with busybox (as of Poky version 7.0)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
do_fetchall&lt;br /&gt;
do_build&lt;br /&gt;
do_devshell&lt;br /&gt;
do_cleansstate&lt;br /&gt;
do_configure&lt;br /&gt;
do_cleanall&lt;br /&gt;
do_populate_lic&lt;br /&gt;
do_package_write&lt;br /&gt;
do_populate_sysroot&lt;br /&gt;
do_buildall&lt;br /&gt;
do_package_write_rpm&lt;br /&gt;
do_menuconfig&lt;br /&gt;
do_populate_lic_setscene&lt;br /&gt;
do_patch&lt;br /&gt;
do_listtasks&lt;br /&gt;
do_compile&lt;br /&gt;
do_package_setscene&lt;br /&gt;
do_fetch&lt;br /&gt;
do_checkuri&lt;br /&gt;
do_clean&lt;br /&gt;
do_package_write_rpm_setscene&lt;br /&gt;
do_package&lt;br /&gt;
do_unpack&lt;br /&gt;
do_install&lt;br /&gt;
do_populate_sysroot_setscene&lt;br /&gt;
do_checkuriall&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In general, a build proceed through the stages in order: fetch, configure, compile, install, and package the&lt;br /&gt;
software.&lt;br /&gt;
&lt;br /&gt;
=== Build work areas ===&lt;br /&gt;
The area where each software component is built is dependent on the recipe name, the distro name, build tool and&lt;br /&gt;
the target architecture for the component.  During the build, some items are built for the host machine&lt;br /&gt;
and some are built for the target machine.  In non-embedded Linux, the machine you build and debug on and the machine&lt;br /&gt;
you compile for (run the software on) are very often the same.  However, in embedded Linux these are often different machines,&lt;br /&gt;
and often they even have different CPU architectures.&lt;br /&gt;
&lt;br /&gt;
The directory used for an individual component is something like:&lt;br /&gt;
  &amp;lt;build_top_dir&amp;gt;/tmp/work/&amp;lt;arch-distro-tool-dir&amp;gt;/&amp;lt;package_name_and_version&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example, in a build of the busybox code for the ARM qemu emulator platform with yocto version 7.0 was&lt;br /&gt;
located in: &amp;lt;build_top_dir&amp;gt;/tmp/work/armv5te-poky-linux-gnueabi/busybox-1.19.4-r2&lt;br /&gt;
&lt;br /&gt;
The build directory for the sqlite database tool, for use on my Ubuntu 12.04 (x86_64) host, was located&lt;br /&gt;
at: &amp;lt;build_top_dir&amp;gt;/tmp/work/x86_64-linux/sqlite3-native-3.7.10-r2&lt;br /&gt;
&lt;br /&gt;
The work directory for a software component contains not only the source code for the item, but additional&lt;br /&gt;
data related to building it, staging it for installation into a package or image, and a 'temp' directory&lt;br /&gt;
which has logs of the various build tasks.  The work directory is useful to know if you want to customize&lt;br /&gt;
the software (for example if you need to make a bugfix or apply some external patch), or determine&lt;br /&gt;
why some build operation (such as fetching, compiling, packaging, etc.) is failing.&lt;br /&gt;
&lt;br /&gt;
In the 'temp' directory under the work directory are both 'run' files and log files.  The&lt;br /&gt;
'run' files are actually shell scripts or python scripts that are executed&lt;br /&gt;
during the different build stages. The log files have the output from the commands that&lt;br /&gt;
were used to build the software.&lt;br /&gt;
&lt;br /&gt;
Other directories under the work directory are used for packaging the software's output files, or&lt;br /&gt;
staging them for inclusion in a system image, or for staging other information about the package,&lt;br /&gt;
such as it's software license.&lt;br /&gt;
&lt;br /&gt;
=== Build output ===&lt;br /&gt;
The software for an embedded device can be packaged multiple different ways in preparation for deployment to the&lt;br /&gt;
actual device.  For some systems, the built software is packaged into a kernel and a filesystem image, which can then be&lt;br /&gt;
directly written to flash or storage media on the device.  For other systems, the software may be bundled as&lt;br /&gt;
packages (similar to the way desktop distributions of Linux are delivered).  These might require developer&lt;br /&gt;
or even end-user installation on the target device.  The Yocto Project build system is capable of producing&lt;br /&gt;
images and packages in several formats, that are selectable by the developer in the local configuration for the&lt;br /&gt;
distribution.  For example, three of the different package formats that can be built by yocto&lt;br /&gt;
are: debian packages (.deb), redhat package manager files (.rpm), and itsy packages (.ipk).&lt;br /&gt;
&lt;br /&gt;
The directory where the software resides after a typical build is: &amp;lt;build_top_dir&amp;gt;/tmp/deploy and &amp;lt;build_top_dir&amp;gt;/tmp/sysroots.&lt;br /&gt;
The 'sysroots' directory contains the directory structure and contents for the root filesystem for a target build.&lt;br /&gt;
(Except it seems to be missing /dev, and it doesn't have root ownership - it probably needs pseudo to see the full contents).  The 'deploy' directory has the images or packages that are ready to be installed on the device.&lt;br /&gt;
&lt;br /&gt;
=== Development tools ===&lt;br /&gt;
[''need to write about building and SDK, and the IDE here'']&lt;br /&gt;
&lt;br /&gt;
== Now for some details ==&lt;br /&gt;
[''it would be good to fill out the following sections'']&lt;br /&gt;
&lt;br /&gt;
=== How recipes and tasks are found, parsed, and processed ===&lt;br /&gt;
Bitbake reads the entire set of recipe files that are specified by&lt;br /&gt;
the local configuration, and parses them all into a global task namespace.&lt;br /&gt;
This includes all the class files and include files as well.  These&lt;br /&gt;
are specified by the BBFILES and BBLAYERS variables in the conf/bblayers.conf&lt;br /&gt;
file.  Within the layers directories, the &amp;lt;layer-dir&amp;gt;/conf/layer.conf&lt;br /&gt;
file is used to indicate the set of .bb files to parse for that layer.&lt;br /&gt;
&lt;br /&gt;
Note that this global parse of the entire set of recipe files is&lt;br /&gt;
quite different from 'make', which usually operated on a single Makefile.&lt;br /&gt;
(This is also why bitbake startup is a little slow).&lt;br /&gt;
&lt;br /&gt;
Information in the meta-data (the DEPENDS and PROVIDES lines) determine&lt;br /&gt;
package ordering.  Where packages are independent of each other, the&lt;br /&gt;
build order is dependent (I believe) on file parse order.  In this case,&lt;br /&gt;
processing is not required to be in any particular order (and, in fact,&lt;br /&gt;
can be parallelized). You can have bitbake produce the dependency graph&lt;br /&gt;
of the packages for your build by using the -g option.  This produces output in&lt;br /&gt;
'dot' syntax (suitable for processing using some graphviz visualizer).&lt;br /&gt;
&lt;br /&gt;
The list of tasks to perform within a package appears to come&lt;br /&gt;
from the common class meta-data&lt;br /&gt;
(see meta/classes/utility-tasks.bbclass, for example) and the&lt;br /&gt;
meta-data for the individual package  These are added by&lt;br /&gt;
the 'addtask' keyword.  You can see a list of tasks for an&lt;br /&gt;
individual package with: bitbake &amp;lt;pkg&amp;gt; -c listtasks&lt;br /&gt;
&lt;br /&gt;
=== fetching tips ===&lt;br /&gt;
[''info about fetch mechanisms, proxies, mirrors, etc.'']&lt;br /&gt;
&lt;br /&gt;
=== recipe features that control the build ===&lt;br /&gt;
[''document the 'important' variables that show up everywhere in the .bb files (eg PN)'']&lt;br /&gt;
[''how does append work, how does masking work, how do constraints work'']]&lt;br /&gt;
&lt;br /&gt;
=== extracting stuff ===&lt;br /&gt;
[''where to pull stuff out - maybe covered already'']&lt;br /&gt;
&lt;br /&gt;
=== changing stuff ===&lt;br /&gt;
[''how to adjust your recipe list, how to adjust the configurations of the packages, how to adjust the included files'']&lt;br /&gt;
&lt;br /&gt;
=== adding stuff ===&lt;br /&gt;
[''how to add a 'hello world' package, your own kernel, your own library'']&lt;br /&gt;
&lt;br /&gt;
== More neat stuff ==&lt;br /&gt;
[''mention HOB, the build appliance, build servers, shared state'']&lt;br /&gt;
&lt;br /&gt;
== Notes that need fleshing out... (this area a work-in-progress) ==&lt;br /&gt;
=== list recipes ===&lt;br /&gt;
How to see the recipes that are visible for a configuration:&lt;br /&gt;
* bitbake-layers show-recipes&lt;br /&gt;
&lt;br /&gt;
=== list available images ===&lt;br /&gt;
How to see the available images in the layers that are in a repository:&lt;br /&gt;
ls meta*/recipes*/images/*.bb&lt;br /&gt;
&lt;br /&gt;
Apparently, a distribution is defined with an &amp;quot;image&amp;quot; recipe.&lt;br /&gt;
&lt;br /&gt;
The image recipe includes, among other things, a definition&lt;br /&gt;
for IMAGE_FEATURES, which lists some items that will be included.&lt;br /&gt;
&lt;br /&gt;
The items listed in the IMAGE_FEATURES and IMAGE_FEATURE_EXTRAS&lt;br /&gt;
are ??? (things that are provided by other recipes??)&lt;br /&gt;
&lt;br /&gt;
=== list available distros ===&lt;br /&gt;
The main item in a distro is the definition of DISTRO_FEATURES, which specifies&lt;br /&gt;
the things to include in that distribution.  These items correspond to ???&lt;br /&gt;
(things that are provided by other recipes???)&lt;br /&gt;
&lt;br /&gt;
=== the flow of control ===&lt;br /&gt;
local.conf specifies:&lt;br /&gt;
* MACHINE - this indicates the target platform (board or emulator) for the build&lt;br /&gt;
* DISTRO - this indicates the base distribution for the build&lt;br /&gt;
* IMAGE_EXTRA_FEATURES - adds any extra items to any images that are built&lt;br /&gt;
&lt;br /&gt;
bblayers.conf specifies:&lt;br /&gt;
* BBLAYERS - the list of layer directories where classes and recipes are found&lt;br /&gt;
&lt;br /&gt;
* How to know what machines are available?&lt;br /&gt;
** 'ls meta*/conf/machine/*.conf'&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta/conf/machine/qemuarm.conf&lt;br /&gt;
meta/conf/machine/qemumips.conf&lt;br /&gt;
meta/conf/machine/qemuppc.conf&lt;br /&gt;
meta/conf/machine/qemux86-64.conf&lt;br /&gt;
meta/conf/machine/qemux86.conf&lt;br /&gt;
meta-yocto/conf/machine/atom-pc.conf&lt;br /&gt;
meta-yocto/conf/machine/beagleboard.conf&lt;br /&gt;
meta-yocto/conf/machine/mpc8315e-rdb.conf&lt;br /&gt;
meta-yocto/conf/machine/routerstationpro.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The meta-ti layer adds the following machines:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta-ti/conf/machine/am180x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am335x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am3517-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am37x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am387x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/am389x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/beagleboard.conf&lt;br /&gt;
meta-ti/conf/machine/beaglebone.conf&lt;br /&gt;
meta-ti/conf/machine/c6a814x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/c6a816x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/dm814x-evm.conf&lt;br /&gt;
meta-ti/conf/machine/hawkboard.conf&lt;br /&gt;
meta-ti/conf/machine/omap3evm.conf&lt;br /&gt;
meta-ti/conf/machine/omap3-touchbook.conf&lt;br /&gt;
meta-ti/conf/machine/pandaboard.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How to know what layers are available?&lt;br /&gt;
** ls -d1 meta*&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta&lt;br /&gt;
meta-demoapps&lt;br /&gt;
meta-hob&lt;br /&gt;
meta-skeleton&lt;br /&gt;
meta-ti&lt;br /&gt;
meta-yocto&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How to know what distros are available?&lt;br /&gt;
** ls meta*/conf/distro/*.conf&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta/conf/distro/defaultsetup.conf&lt;br /&gt;
meta-yocto/conf/distro/poky-bleeding.conf&lt;br /&gt;
meta-yocto/conf/distro/poky.conf&lt;br /&gt;
meta-yocto/conf/distro/poky-lsb.conf&lt;br /&gt;
meta-yocto/conf/distro/poky-tiny.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How to know what images are available?&lt;br /&gt;
** ls meta*/recipe*/images/*.bb&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
meta-hob/recipes-core/images/hob-image.bb&lt;br /&gt;
meta/recipes-core/images/core-image-base.bb&lt;br /&gt;
meta/recipes-core/images/core-image-core.bb&lt;br /&gt;
meta/recipes-core/images/core-image-minimal.bb&lt;br /&gt;
meta/recipes-core/images/core-image-minimal-dev.bb&lt;br /&gt;
meta/recipes-core/images/core-image-minimal-initramfs.bb&lt;br /&gt;
meta/recipes-core/images/core-image-minimal-mtdutils.bb&lt;br /&gt;
meta/recipes-core/images/self-hosted-image.bb&lt;br /&gt;
meta/recipes-extended/images/core-image-basic.bb&lt;br /&gt;
meta/recipes-extended/images/core-image-lsb.bb&lt;br /&gt;
meta/recipes-extended/images/core-image-lsb-dev.bb&lt;br /&gt;
meta/recipes-extended/images/core-image-lsb-sdk.bb&lt;br /&gt;
meta/recipes-graphics/images/core-image-clutter.bb&lt;br /&gt;
meta/recipes-graphics/images/core-image-gtk-directfb.bb&lt;br /&gt;
meta/recipes-qt/images/qt4e-demo-image.bb&lt;br /&gt;
meta/recipes-rt/images/core-image-rt.bb&lt;br /&gt;
meta/recipes-rt/images/core-image-rt-sdk.bb&lt;br /&gt;
meta/recipes-sato/images/core-image-sato.bb&lt;br /&gt;
meta/recipes-sato/images/core-image-sato-dev.bb&lt;br /&gt;
meta/recipes-sato/images/core-image-sato-sdk.bb&lt;br /&gt;
meta-ti/recipes-misc/images/cloud9-gfx-image.bb&lt;br /&gt;
meta-ti/recipes-misc/images/cloud9-gnome-image.bb&lt;br /&gt;
meta-ti/recipes-misc/images/cloud9-image.bb&lt;br /&gt;
meta-ti/recipes-misc/images/ti-hw-bringup-image.bb&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* How to know what recipes are available (overall)?&lt;br /&gt;
** ls meta*/recipe*/*/*.bb&lt;br /&gt;
&lt;br /&gt;
* How to know what recipes are visible to your build (based on your configuration settings)?&lt;br /&gt;
** bitbake-layers show-recipes&lt;br /&gt;
&lt;br /&gt;
* How to list the tasks are visible to your build based on your configuration settings?&lt;br /&gt;
** bitbake -c listtasks &amp;lt;image-or-recipe-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== build variables ===&lt;br /&gt;
* How can one know all the different build variables there are, and how to set them?&lt;br /&gt;
** The best place to start is by looking in the [http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html#ref-variables-glos Poky Reference Manual variable glossary]&lt;br /&gt;
&lt;br /&gt;
* bitbake -e &amp;lt;recipe&amp;gt; | grep &amp;quot;^S=&amp;quot; - print the source directory for a recipe&lt;br /&gt;
&lt;br /&gt;
* bitbake -e &amp;lt;recipe&amp;gt; | grep &amp;quot;^WORKDIR=&amp;quot; - print the working directory for a recipe&lt;br /&gt;
&lt;br /&gt;
== Comparison with other systems ==&lt;br /&gt;
It would be nice to compare and contrast Yocto Project Poky with other build systems, specifically:&lt;br /&gt;
* OpenEmbedded&lt;br /&gt;
* Buildroot&lt;br /&gt;
* ptxdist&lt;br /&gt;
* Embedded Debian&lt;br /&gt;
* [[Target Wizard]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/User:Tim_Bird</id>
		<title>User:Tim Bird</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/User:Tim_Bird"/>
				<updated>2013-03-27T20:37:21Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird is a Linux developer working for Sony Network Entertainment - a subsidiary of Sony Corporation.&lt;br /&gt;
&lt;br /&gt;
Tim is Chair of the Architecture Group of the [http://www.linuxfoundation.org/collaborate/workgroups/celf CE Workgroup of the Linux Foundation] (formerly the [[CE Linux Forum]]).  In the past, Tim worked at Lineo, Caldera, and Novell.&lt;br /&gt;
&lt;br /&gt;
== Current contact information ==&lt;br /&gt;
You can contact Tim at the following address, which has been made spam-resistant:&lt;br /&gt;
&lt;br /&gt;
* e-mail: tim (dot) bird (at) am (dot) sony (dot) com.&lt;br /&gt;
&lt;br /&gt;
== Bookmarks for things I'm working on in this wiki ==&lt;br /&gt;
* [[Tim's Tips and Tricks]] - Miscelaneous development tips gleaned over the years&lt;br /&gt;
* [[Ftrace]] - with my knowledge of ftrace, this page really needs a fixup&lt;br /&gt;
* [[Embedded linux status]] - list of things for embedded linux status reports (which I do frequently)&lt;br /&gt;
* [[elinux issues]] - list of things that need fixing&lt;br /&gt;
* [[Embedded Wiki wanted features]]&lt;br /&gt;
* [[Kernel Timer Systems]] - needs a major overhaul to bring it up to date&lt;br /&gt;
&lt;br /&gt;
* [[Android Boot-time Readahead]]&lt;br /&gt;
* [[Beginning Programming]]&lt;br /&gt;
&lt;br /&gt;
=== Pages needing LOTS of HELP!! ===&lt;br /&gt;
Here are some high priority candidates for work...&lt;br /&gt;
* [[Android Kernel Build]]&lt;br /&gt;
&lt;br /&gt;
=== Samples and help ===&lt;br /&gt;
* See [[Table Examples]]&lt;br /&gt;
&lt;br /&gt;
== Areas of interest ==&lt;br /&gt;
Here are some things Tim is interested in on this site:&lt;br /&gt;
* [[Other wikis]] - a list of other wikis to examine the design of&lt;br /&gt;
* [http://www.linuxworld.com/news/2006/120606-closed-modules1.html?page=1 Good article on US case law related to closed-source kernel modules]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikibooks.org/wiki/MediaWiki_Administrator's_Handbook MediaWiki Administrator's Handbook]&lt;br /&gt;
&lt;br /&gt;
== Things I want to add to the wiki ==&lt;br /&gt;
* diffinfo, qdiff, reisolate - see [[Diff And Patch Tricks]], [[Source Management Tools]], and&lt;br /&gt;
[[Tim's patch management tools]]&lt;br /&gt;
* review each portal page and try to hook up material I know is orphaned&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
[http://www.edn.com/article/CA6582852.html Free software encircles embedded design] Warren Web, EDN 8/7/2008&lt;br /&gt;
&lt;br /&gt;
=== Videos, Articles, Presentations of, by or about me ===&lt;br /&gt;
* http://video.linuxfoundation.org/video/1654 - JLS 2009 - Status of Embedded Linux presentation&lt;br /&gt;
* http://www.vimeo.com/8042326 - Measuring Function Duration with Ftrace&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/User:Tim_Bird</id>
		<title>User:Tim Bird</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/User:Tim_Bird"/>
				<updated>2013-03-27T20:34:56Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* temporary list of files I've uploaded to the wiki in the last year */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird is a Linux developer working for Sony Network Entertainment - a subsidiary of Sony Corporation.&lt;br /&gt;
&lt;br /&gt;
Tim is Chair of the Architecture Group of the [http://www.linuxfoundation.org/collaborate/workgroups/celf CE Workgroup of the Linux Foundation] (formerly the [[CE Linux Forum]]).  In the past, Tim worked at Lineo, Caldera, and Novell.&lt;br /&gt;
&lt;br /&gt;
== Current contact information ==&lt;br /&gt;
You can contact Tim at the following address, which has been made spam-resistant:&lt;br /&gt;
&lt;br /&gt;
* e-mail: tim (dot) bird (at) am (dot) sony (dot) com.&lt;br /&gt;
&lt;br /&gt;
== Bookmarks for things I'm working on in this wiki ==&lt;br /&gt;
* [[Tim's Tips and Tricks]] - Miscelaneous development tips gleaned over the years&lt;br /&gt;
* [[Ftrace]] - with my knowledge of ftrace, this page really needs a fixup&lt;br /&gt;
* [[Embedded linux status]] - list of things for embedded linux status reports (which I do frequently)&lt;br /&gt;
* [[elinux issues]] - list of things that need fixing&lt;br /&gt;
* [[Embedded Wiki wanted features]]&lt;br /&gt;
* [[Kernel Timer Systems]] - needs a major overhaul to bring it up to date&lt;br /&gt;
&lt;br /&gt;
* [[Android Boot-time Readahead]]&lt;br /&gt;
* [[Beginning Programming]]&lt;br /&gt;
&lt;br /&gt;
=== Pages needing LOTS of HELP!! ===&lt;br /&gt;
Here are some high priority candidates for work...&lt;br /&gt;
* [[Android Kernel Build]]&lt;br /&gt;
&lt;br /&gt;
=== Samples and help ===&lt;br /&gt;
* See [[Table Examples]]&lt;br /&gt;
&lt;br /&gt;
== Areas of interest ==&lt;br /&gt;
Here are some things Tim is interested in on this site:&lt;br /&gt;
* [[Other wikis]] - a list of other wikis to examine the design of&lt;br /&gt;
* [http://www.linuxworld.com/news/2006/120606-closed-modules1.html?page=1 Good article on US case law related to closed-source kernel modules]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikibooks.org/wiki/MediaWiki_Administrator's_Handbook MediaWiki Administrator's Handbook]&lt;br /&gt;
&lt;br /&gt;
== Things I want to add to the wiki ==&lt;br /&gt;
* diffinfo, qdiff, reisolate - see [[Diff And Patch Tricks]], [[Source Management Tools]], and&lt;br /&gt;
[[Tim's patch management tools]]&lt;br /&gt;
* review each portal page and try to hook up material I know is orphaned&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
[http://www.edn.com/article/CA6582852.html Free software encircles embedded design] Warren Web, EDN 8/7/2008&lt;br /&gt;
&lt;br /&gt;
=== Videos, Articles, Presentations of, by or about me ===&lt;br /&gt;
* http://video.linuxfoundation.org/video/1654 - JLS 2009 - Status of Embedded Linux presentation&lt;br /&gt;
* http://www.vimeo.com/8042326 - Measuring Function Duration with Ftrace&lt;br /&gt;
&lt;br /&gt;
== temporary list of files I've uploaded to the wiki in the last year ==&lt;br /&gt;
* [[Media:0001-mm-sl-aou-b-Add-slab-accounting-debugging-feature-v3.6.patch]]&lt;br /&gt;
* [[Media:Beagle_square.png]]&lt;br /&gt;
* [[Media:Crash_handler-0.6.tgz]]&lt;br /&gt;
* [[Media:ELC-2012-Tips-and-Tricks-BOF.pdf]]&lt;br /&gt;
* [[Media:ELC-2013_PosterForm.odp]]&lt;br /&gt;
* [[Media:Glossary-icon.gif]]&lt;br /&gt;
* [[Media:Glossary-icon.jpg]]&lt;br /&gt;
* [[Media:Linux-2012-10-05.png]]&lt;br /&gt;
* [[Media:Ttc-1.2.3.tgz]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/User:Tim_Bird</id>
		<title>User:Tim Bird</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/User:Tim_Bird"/>
				<updated>2013-03-27T20:34:27Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* temporary list of files I've uploaded to the wiki in the last year */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird is a Linux developer working for Sony Network Entertainment - a subsidiary of Sony Corporation.&lt;br /&gt;
&lt;br /&gt;
Tim is Chair of the Architecture Group of the [http://www.linuxfoundation.org/collaborate/workgroups/celf CE Workgroup of the Linux Foundation] (formerly the [[CE Linux Forum]]).  In the past, Tim worked at Lineo, Caldera, and Novell.&lt;br /&gt;
&lt;br /&gt;
== Current contact information ==&lt;br /&gt;
You can contact Tim at the following address, which has been made spam-resistant:&lt;br /&gt;
&lt;br /&gt;
* e-mail: tim (dot) bird (at) am (dot) sony (dot) com.&lt;br /&gt;
&lt;br /&gt;
== Bookmarks for things I'm working on in this wiki ==&lt;br /&gt;
* [[Tim's Tips and Tricks]] - Miscelaneous development tips gleaned over the years&lt;br /&gt;
* [[Ftrace]] - with my knowledge of ftrace, this page really needs a fixup&lt;br /&gt;
* [[Embedded linux status]] - list of things for embedded linux status reports (which I do frequently)&lt;br /&gt;
* [[elinux issues]] - list of things that need fixing&lt;br /&gt;
* [[Embedded Wiki wanted features]]&lt;br /&gt;
* [[Kernel Timer Systems]] - needs a major overhaul to bring it up to date&lt;br /&gt;
&lt;br /&gt;
* [[Android Boot-time Readahead]]&lt;br /&gt;
* [[Beginning Programming]]&lt;br /&gt;
&lt;br /&gt;
=== Pages needing LOTS of HELP!! ===&lt;br /&gt;
Here are some high priority candidates for work...&lt;br /&gt;
* [[Android Kernel Build]]&lt;br /&gt;
&lt;br /&gt;
=== Samples and help ===&lt;br /&gt;
* See [[Table Examples]]&lt;br /&gt;
&lt;br /&gt;
== Areas of interest ==&lt;br /&gt;
Here are some things Tim is interested in on this site:&lt;br /&gt;
* [[Other wikis]] - a list of other wikis to examine the design of&lt;br /&gt;
* [http://www.linuxworld.com/news/2006/120606-closed-modules1.html?page=1 Good article on US case law related to closed-source kernel modules]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikibooks.org/wiki/MediaWiki_Administrator's_Handbook MediaWiki Administrator's Handbook]&lt;br /&gt;
&lt;br /&gt;
== Things I want to add to the wiki ==&lt;br /&gt;
* diffinfo, qdiff, reisolate - see [[Diff And Patch Tricks]], [[Source Management Tools]], and&lt;br /&gt;
[[Tim's patch management tools]]&lt;br /&gt;
* review each portal page and try to hook up material I know is orphaned&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
[http://www.edn.com/article/CA6582852.html Free software encircles embedded design] Warren Web, EDN 8/7/2008&lt;br /&gt;
&lt;br /&gt;
=== Videos, Articles, Presentations of, by or about me ===&lt;br /&gt;
* http://video.linuxfoundation.org/video/1654 - JLS 2009 - Status of Embedded Linux presentation&lt;br /&gt;
* http://www.vimeo.com/8042326 - Measuring Function Duration with Ftrace&lt;br /&gt;
&lt;br /&gt;
== temporary list of files I've uploaded to the wiki in the last year ==&lt;br /&gt;
[[Media:0001-mm-sl-aou-b-Add-slab-accounting-debugging-feature-v3.6.patch]]&lt;br /&gt;
[[Media:Beagle_square.png]]&lt;br /&gt;
[[Media:Crash_handler-0.6.tgz]]&lt;br /&gt;
[[Media:ELC-2012-Tips-and-Tricks-BOF.pdf]]&lt;br /&gt;
[[Media:ELC-2013_PosterForm.odp]]&lt;br /&gt;
[[Media:Glossary-icon.gif]]&lt;br /&gt;
[[Media:Glossary-icon.jpg]]&lt;br /&gt;
[[Media:Linux-2012-10-05.png]]&lt;br /&gt;
[[Media:Ttc-1.2.3.tgz]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/User:Tim_Bird</id>
		<title>User:Tim Bird</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/User:Tim_Bird"/>
				<updated>2013-03-27T20:33:52Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Tim Bird is a Linux developer working for Sony Network Entertainment - a subsidiary of Sony Corporation.&lt;br /&gt;
&lt;br /&gt;
Tim is Chair of the Architecture Group of the [http://www.linuxfoundation.org/collaborate/workgroups/celf CE Workgroup of the Linux Foundation] (formerly the [[CE Linux Forum]]).  In the past, Tim worked at Lineo, Caldera, and Novell.&lt;br /&gt;
&lt;br /&gt;
== Current contact information ==&lt;br /&gt;
You can contact Tim at the following address, which has been made spam-resistant:&lt;br /&gt;
&lt;br /&gt;
* e-mail: tim (dot) bird (at) am (dot) sony (dot) com.&lt;br /&gt;
&lt;br /&gt;
== Bookmarks for things I'm working on in this wiki ==&lt;br /&gt;
* [[Tim's Tips and Tricks]] - Miscelaneous development tips gleaned over the years&lt;br /&gt;
* [[Ftrace]] - with my knowledge of ftrace, this page really needs a fixup&lt;br /&gt;
* [[Embedded linux status]] - list of things for embedded linux status reports (which I do frequently)&lt;br /&gt;
* [[elinux issues]] - list of things that need fixing&lt;br /&gt;
* [[Embedded Wiki wanted features]]&lt;br /&gt;
* [[Kernel Timer Systems]] - needs a major overhaul to bring it up to date&lt;br /&gt;
&lt;br /&gt;
* [[Android Boot-time Readahead]]&lt;br /&gt;
* [[Beginning Programming]]&lt;br /&gt;
&lt;br /&gt;
=== Pages needing LOTS of HELP!! ===&lt;br /&gt;
Here are some high priority candidates for work...&lt;br /&gt;
* [[Android Kernel Build]]&lt;br /&gt;
&lt;br /&gt;
=== Samples and help ===&lt;br /&gt;
* See [[Table Examples]]&lt;br /&gt;
&lt;br /&gt;
== Areas of interest ==&lt;br /&gt;
Here are some things Tim is interested in on this site:&lt;br /&gt;
* [[Other wikis]] - a list of other wikis to examine the design of&lt;br /&gt;
* [http://www.linuxworld.com/news/2006/120606-closed-modules1.html?page=1 Good article on US case law related to closed-source kernel modules]&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikibooks.org/wiki/MediaWiki_Administrator's_Handbook MediaWiki Administrator's Handbook]&lt;br /&gt;
&lt;br /&gt;
== Things I want to add to the wiki ==&lt;br /&gt;
* diffinfo, qdiff, reisolate - see [[Diff And Patch Tricks]], [[Source Management Tools]], and&lt;br /&gt;
[[Tim's patch management tools]]&lt;br /&gt;
* review each portal page and try to hook up material I know is orphaned&lt;br /&gt;
&lt;br /&gt;
== News ==&lt;br /&gt;
[http://www.edn.com/article/CA6582852.html Free software encircles embedded design] Warren Web, EDN 8/7/2008&lt;br /&gt;
&lt;br /&gt;
=== Videos, Articles, Presentations of, by or about me ===&lt;br /&gt;
* http://video.linuxfoundation.org/video/1654 - JLS 2009 - Status of Embedded Linux presentation&lt;br /&gt;
* http://www.vimeo.com/8042326 - Measuring Function Duration with Ftrace&lt;br /&gt;
&lt;br /&gt;
== temporary list of files I've uploaded to the wiki in the last year ==&lt;br /&gt;
[Media:0001-mm-sl-aou-b-Add-slab-accounting-debugging-feature-v3.6.patch]&lt;br /&gt;
[Media:Beagle_square.png]&lt;br /&gt;
[Media:Crash_handler-0.6.tgz]&lt;br /&gt;
[Media:ELC-2012-Tips-and-Tricks-BOF.pdf]&lt;br /&gt;
[Media:ELC-2013_PosterForm.odp]&lt;br /&gt;
[Media:Glossary-icon.gif]&lt;br /&gt;
[Media:Glossary-icon.jpg]&lt;br /&gt;
[Media:Linux-2012-10-05.png]&lt;br /&gt;
[Media:Ttc-1.2.3.tgz]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/File:Elc2013_Wold.pdf</id>
		<title>File:Elc2013 Wold.pdf</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/File:Elc2013_Wold.pdf"/>
				<updated>2013-03-25T17:18:54Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Embedded_linux_status</id>
		<title>Embedded linux status</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Embedded_linux_status"/>
				<updated>2013-03-22T23:09:24Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Presentation History */ change file: links to media:&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is an outline for a presentation on the status of embedded Linux:&lt;br /&gt;
&lt;br /&gt;
This is essentially [[User:Tim Bird|Tim Bird]]'s private collection of interesting notes about the status of embedded Linux.&lt;br /&gt;
It tends to get updated right before a Linux conference.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#ffffcc; align:right; &amp;quot;&amp;gt;&lt;br /&gt;
'''NEWS:''' Tim Bird's [[Media:Status-of-embedded-Linux-2012-02-ELC-v2.pdf|Status of Embedded Linux (PDF)]] (February 2012) presentation from ELC 2012 is now available.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Process for adding information ==&lt;br /&gt;
Anyone can add information to this page.  I used to maintain the information at&lt;br /&gt;
the [[Technology Watch List]], but the table format there is a bit constrictive.&lt;br /&gt;
(It would be nice if MediaWiki had a table editor!!)&lt;br /&gt;
&lt;br /&gt;
Since I have to form this stuff into a &amp;quot;State of Embedded Linux&amp;quot; presentation&lt;br /&gt;
several times a year, keeping the information in wiki outline format is convenient&lt;br /&gt;
for me.  It's easier to put directly into a presentation.&lt;br /&gt;
&lt;br /&gt;
Please place information in bullet form, with a link to a supporting article,&lt;br /&gt;
in the appropriate sub-section below.&lt;br /&gt;
&lt;br /&gt;
=== Page History ===&lt;br /&gt;
I'll let MediaWiki store historical versions of this page.  If you want to see&lt;br /&gt;
what the hot issues were from a last year or a few years ago, please see look&lt;br /&gt;
at the page history.  (Although, updates of this page have historically been&lt;br /&gt;
a bit spotty).&lt;br /&gt;
&lt;br /&gt;
=== Presentation History ===&lt;br /&gt;
Here's my presentation history:&lt;br /&gt;
* [[Media:Status-of-Embedded-Linux-2013-03-JJ44.pdf|Jamboree 44 Status of Embedded Linux (PDF)]] (March 2013)&lt;br /&gt;
* [[Media:Status-of-Embedded-Linux-2012-09-JJ42.pdf|Jamboree 42 Status of Embedded Linux (PDF)]] (September 2012)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2012-06-JJ41.pdf|Jamboree 41 Status of Embedded Linux (PDF)]] (June 2012)&lt;br /&gt;
* [[Media:Status-update-2012-03-Jamboree40.pdf|Jamboree 40 Status update (PDF)]] (March 2012)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2012-02-ELC-v2.pdf|ELC 2012 Status of Embedded Linux (PDF)]] (February 2012)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-11-LCB.pdf‎|LinuxCon Brazil Status of Embedded Linux talk (PDF)]] (November 2011)&lt;br /&gt;
* [[Media:Status-of-Embedded-Linux-2011-10-ELCE.pdf|ELC Europe 2011 Status of Embedded Linux talk (PDF)]] (October 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-09-Jamboree38.ppt|Jamboree 38 Status of Embedded Linux talk (PPT)]] (September 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-06-LCJ.pdf|LinuxCon Japan 2011 Status of Embedded Linux talk (PDF)]] (June 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Lnux-2011-05-J37.ppt|Jamboree 37 Status of Embedded Linux talk (PPT)]] (May 2011)&lt;br /&gt;
* [[Media:Status2-of-embedded-Linux-2010-12-Jamboree35.ppt|Jamboree 35 Status of Embedded Linux talk (PPT)]] (December 2010)&lt;br /&gt;
* [http://events.linuxfoundation.org/slides/2010/linuxcon_japan/linuxcon_jp2010_bird.pdf LinuxCon Japan 2010 Status of Embedded Linux BOF (PDF)] (September 2010)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2010-04-ELC.pdf|ELC 2010 Status of Embedded Linux talk (PDF)]] (April 2010)&lt;br /&gt;
* [[Media:State-of-embedded-linux-oct-2009.pdf|Japan Linux Symposium 2009 Status of Embedded Linux talk (PDF)]] (October 2009)&lt;br /&gt;
* [[Media:Embedded-Linux-Status-OLS2009.pdf|OLS 2009 Embedded Linux Status talk (PDF)]] (July 2009)&lt;br /&gt;
* [[Media:Embedded-Linux-BOF-OLS2008.ppt|OLS 2008 Embedded Linux BOF slides (PPT)]] (July 2008)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-ELC2008.ppt|ELC 2008 Status of Embedded Linux talk (PPT)]] (April 2008)&lt;br /&gt;
* [[Media:ELCE-BOF_State_of_Embedded_linux.pdf|ELC Europe 2007 - Status of Embedded Linux BOF slides (PDF)]] (October 2007)&lt;br /&gt;
* [[Media:Embedded_Linux_BOF_OLS_2007.pdf|OLS 2007 Embedded Linux BOF slides (PDF)]] (July 2007)&lt;br /&gt;
* [[Media:OLS2006-Embedded-BOF-2.ppt|OLS 2006 Embedded Linux BOF slides (PPT)]] (July 2005)&lt;br /&gt;
* OLS 2005 Status of Embedded Linux BOF [need presentation]&lt;br /&gt;
&lt;br /&gt;
== Uncategorized info ==&lt;br /&gt;
This is where I put stuff I haven't had time to analyze or sort into&lt;br /&gt;
the appropriate category:&lt;br /&gt;
&lt;br /&gt;
=== February 2012 ===&lt;br /&gt;
* lttng 2.0 was in mainline for about 2 weeks&lt;br /&gt;
** CTF exists, as well as babeltrace&lt;br /&gt;
** babeltrace (library for trace conversion) exists, but has no serious converters yet&lt;br /&gt;
** TMF (eclipse viewer) support for CTF coming real soon (if not already) (was predicted to be January 2012)&lt;br /&gt;
** TMF support for LTTng 2.0 planned for q2 2012&lt;br /&gt;
&lt;br /&gt;
== May 2011 ==&lt;br /&gt;
* good interview with Linus on 20th anniversary&lt;br /&gt;
** http://linuxfr.org/nodes/85904/comments/1230981&lt;br /&gt;
Quote:&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : What is your opinion about Android ? Are you mostly happy they made cellphones very usable or sad because it's really a kernel fork ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : I think forks are good things, they don't make me sad. A lot of Linux development has come out of forks, and it's the only way to keep developers honest - the threat that somebody else can do a better job and satisfy the market better by being different. The whole point of open source to me is really the very real ability to fork (but also the ability for all sides to then merge the forked content back, if it turns out that the fork was doing the right things!)&lt;br /&gt;
&lt;br /&gt;
So I think the android fork forced the mainline developers to seriously look at some of the issues that android had. I think we've solved them in mainline, and I hope (and do think) that android will eventually end up merging to mainline. But it will probably take time and further effort.&lt;br /&gt;
&lt;br /&gt;
I think the more serious long-term issue we have in the kernel is the wild and crazy embedded platform code (and mostly ARM - not because ARM is in any way fundamentally crazier, but because ARM is clearly the most successful embedded platform by far). The embedded world has always tended to eschew standardized platforms: they've been resource constrained etc, so they've done very tailored chip and board solutions, and felt that they couldn't afford a lot of platform abstraction.&lt;br /&gt;
&lt;br /&gt;
That causes a big maintenance headache, because then all those crazy platforms look slightly different to the kernel, and we have all that silly code just to support all those variations of what is really just the same thing deep down, just differently hooked up and with often arbitrary small differences.&lt;br /&gt;
&lt;br /&gt;
But that's something that happens both within and outside of Android, it's in no way android-specific.&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : What about the technical differences between Android and mainline ? Do you think the &amp;quot;wakelock&amp;quot; controversy is solvable ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : I think it is technically largely solved (ie &amp;quot;details to be fixed, but nothing fundamentally scary&amp;quot;), but practically once you have an interface and existing code, it just is a fair amount of work to change. And there perhaps isn't quite enough motivation to make those changes very quickly. So it will take time, and probably several releases (both mainline and adroid) to actually happen.&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : Can you explain why you're not happy with the ARM patches sent to you during merge windows ? Is there an obvious solution for this fragmentation problem ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : Obvious solution? No. The problem is the wild variety of hardware, and then in many cases the Linux ARM platform code (not the ARM CPU support, but the support for certain chips with all the glue issues around the CPU core) has been mostly ugly &amp;quot;copy-and-paste&amp;quot; from some previous ARM platform support file, with some minimal editing to make it match the new one.&lt;br /&gt;
&lt;br /&gt;
And it just results in this unmaintainable mess. It becomes painful when somebody then fixes some core infrastructure, and you end up with a hundred different ARM files all using that infrastructure. That happened with the IRQ chip driver cleanups Thomas did recently (well, has been doing over along time, the recent part is really just the final removal of some nasty old interfaces).&lt;br /&gt;
&lt;br /&gt;
It results in other maintainability issues too - patches being big just means that people won't look at them as carefully etc etc. So it's just a bad situation. Many of the cases should be solvable by having better generic solutions and then plugging in just some per-platform numbers for those solutions.&lt;br /&gt;
&lt;br /&gt;
== April 2011 ==&lt;br /&gt;
* http://www.linuxfordevices.com/c/a/News/OIN-announces-new-members/?kc=LNXDEVNL042011 - OIN grows 28%&lt;br /&gt;
* Intel working on supporting Android 3.0, according to Paul Ottellini&lt;br /&gt;
** Android in focus at Intel - http://news.cnet.com/8301-13924_3-20055868-64.html&lt;br /&gt;
* Mobile patent lawsuit cheatsheet - http://technologizer.com/2011/04/19/mobile-lawsuits/&lt;br /&gt;
* Linus fed up with ARM sub-architecture chaos&lt;br /&gt;
** Linaro organizing group to help resolve issues (possibly hire sub-arch coordinator)&lt;br /&gt;
* information about the longterm release (2.6.35)&lt;br /&gt;
** how are we deciding the next one&lt;br /&gt;
** information about CELF LTS kernel??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* CONFIG_PM being eliminated - improved PM configuration&lt;br /&gt;
* ftrace using -mfentry (feb 9, 2011 lkml, steven rostedt)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== April 2010 ===&lt;br /&gt;
* HP buys Palm - now owns Webos&lt;br /&gt;
* Japanese companies (with LIMO) announce new mobile stack - http://www.linuxfordevices.com/c/a/News/Consortium-from-NTT-DoCoMo-Renesas-Fujitsu-NEC-Panasonic-and-Sharp/?kc=LNXDEVNL042810&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Previous to April 2010 ===&lt;br /&gt;
* SystemTap 1.0 now includes support for cross-compilation.&lt;br /&gt;
* Patches for dynamic printks&lt;br /&gt;
* writing to /dev/kmsg to generate a printk (not new, but I just discovered it)&lt;br /&gt;
* LZO kernel compression is in 2.6.33&lt;br /&gt;
* Arjan van de Ven's timer-slack code - http://lwn.net/Articles/369361/&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
=== Kernel Versions ===&lt;br /&gt;
&lt;br /&gt;
== Bootup Time ==&lt;br /&gt;
* U-boot bootgraph.pl support (see e-mail from Andrew Murray)&lt;br /&gt;
* Android has problems&lt;br /&gt;
** many people are addressing it with Snapshot boot&lt;br /&gt;
* readahead is getting lots of attention&lt;br /&gt;
** See Tim's presentation on Android boot time with readahead&lt;br /&gt;
* snapshot boot (see above)&lt;br /&gt;
** See ELC 2010? and ABS 2011 presentation on snapshot booting&lt;br /&gt;
* embedded bootchart&lt;br /&gt;
** busybox bootchart&lt;br /&gt;
** bootchart in Android init&lt;br /&gt;
** bootchart2 project&lt;br /&gt;
*** C collector, python visualizer&lt;br /&gt;
&lt;br /&gt;
* filesystem speedups&lt;br /&gt;
** CELF funding UBI logging&lt;br /&gt;
** CELF funding read-only block filesystems on flash (MTD)&lt;br /&gt;
&lt;br /&gt;
* XIP&lt;br /&gt;
** Almost removed from kernel&lt;br /&gt;
*** versions in kernel were broken, use of XIP on out-of-tree platforms doesn't help keep XIP in the tree&lt;br /&gt;
&lt;br /&gt;
* Bootloader improvements&lt;br /&gt;
** [[Coreboot]] on x86&lt;br /&gt;
*** See [http://free-electrons.com/pub/video/2011/fosdem/fosdem2011-marek-fast-x86-boot.webm Really Fast x86 boot talk (video)] from Rudolf Marek at [http://archive.fosdem.org/2011/schedule/event/fast_x86_boot Fosdem 2011]&lt;br /&gt;
** U-Boot ARM caching enhancements&lt;br /&gt;
&lt;br /&gt;
== Bootloader ==&lt;br /&gt;
* fastboot support in U-Boot&lt;br /&gt;
** supposedly TI did this?&lt;br /&gt;
** See remark by John Rigby about possible Linaro project for this (on U-Boot list):http://mailrepository.com/u-boot.lists.denx.de/msg/3672644/&lt;br /&gt;
* DFU support in U-Boot&lt;br /&gt;
** [todo: get status update on this]&lt;br /&gt;
&lt;br /&gt;
== Memory Management ==&lt;br /&gt;
* anything new happening?&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
* suspend blockers? (aka wakelocks)&lt;br /&gt;
* device PM&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted:&lt;br /&gt;
* operating points&lt;br /&gt;
* frequency scaling&lt;br /&gt;
* tickless idle&lt;br /&gt;
* device pm&lt;br /&gt;
&lt;br /&gt;
2011 - have:&lt;br /&gt;
* tickless idle&lt;br /&gt;
* device pm&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
== System Size ==&lt;br /&gt;
* CELF reviving Linux-tiny project&lt;br /&gt;
* bloatwatch is still running, but who looks at it?&lt;br /&gt;
** http://www.selenic.com/bloatwatch/&lt;br /&gt;
** big increase (500K) from 2.6.37-rc6 to 2.6.37-rc7&lt;br /&gt;
* Xi Wang's talk at ELC about optimizing memory usage throughout system (kernel, libs, application)&lt;br /&gt;
&lt;br /&gt;
* OOM killer - dealing with memory pressure:&lt;br /&gt;
** [RESEARCH: OOM killer news]&lt;br /&gt;
** Android has its own thing&lt;br /&gt;
** cgroup memory notifications&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted (shrink kernel to ???k)&lt;br /&gt;
2011 - current size = ?&lt;br /&gt;
* see bloatwatch&lt;br /&gt;
* growth is in user space&lt;br /&gt;
* compare with platform size growth over same period&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
* virtualization for Android&lt;br /&gt;
** Samsung using vmware for Android (to separate personal and business use of phone)&lt;br /&gt;
* Android and attacks&lt;br /&gt;
** Android has different security&lt;br /&gt;
** has there been a root exploit from a java app?&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted trusted root ([[TPM]]), guard against exploits&lt;br /&gt;
2011 - have??&lt;br /&gt;
&lt;br /&gt;
== File Systems ==&lt;br /&gt;
* YAFFS2&lt;br /&gt;
** Mainline effort by Charles Manning&lt;br /&gt;
* LogFS&lt;br /&gt;
** Joern disappeared again&lt;br /&gt;
* Squashfs&lt;br /&gt;
** Now supports LZMA2 in mainline&lt;br /&gt;
** CELF funding SquashFS on MTD work&lt;br /&gt;
* Arnd Bergmann's work on optimizing Linux FS for cheap flash media&lt;br /&gt;
** See ELC presentation and Linaro page&lt;br /&gt;
* Tim Bird's treadahead work&lt;br /&gt;
** See ABS presentation&lt;br /&gt;
&lt;br /&gt;
== Legal Issues (licensing and patents) ==&lt;br /&gt;
* mobile patent wars&lt;br /&gt;
** Google buys Motorola for patent portfolio&lt;br /&gt;
** Apple blocks Samsung tablet introduction in Europe&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* OpenGL ES&lt;br /&gt;
* whither fbdev?&lt;br /&gt;
* 2D - Android doesn't have a native 2D API (or it's changing?)&lt;br /&gt;
** [RESEARCH - did Android drop it's native 2D API? (skia?)]&lt;br /&gt;
&lt;br /&gt;
* Latest intel Atom (cedarview) to have PowerVR graphics core&lt;br /&gt;
** Core is PowerVR SGX545-based&lt;br /&gt;
** Source: http://news.softpedia.com/news/Next-Intel-Atom-Has-Stronger-PowerVR-Graphics-199342.shtml&lt;br /&gt;
** patch submission to staging: http://thread.gmane.org/gmane.linux.kernel/1103793&lt;br /&gt;
&lt;br /&gt;
* GoogleTV 1.0 (logitech and Sony) use Sodaville, which is an Atom with a SGX535 core&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alan Cox submitted GMA500 kernel driver to kernel mailing list&lt;br /&gt;
** Source: http://www.h-online.com/open/news/item/Rudimentary-open-source-driver-for-Intel-s-GMA500-Poulsbo-1195125.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Intel work on graphics in kernel:&lt;br /&gt;
** See Kieth Packard's video from September 2010: [Meego Graphics under the hood: http://www.youtube.com/watch?v=YRYTCQqrFcA] OSCON 2010&lt;br /&gt;
** Working on grphics KMS and DRI in the kernel&lt;br /&gt;
*** good for faster booting&lt;br /&gt;
*** good for less flicker on transitions&lt;br /&gt;
*** higher performance 3d graphics&lt;br /&gt;
*** better memory management&lt;br /&gt;
**** kernel can pull memory back from graphics processor on low-memory conditions&lt;br /&gt;
***** [RESEARCH - status of memory allocation discussions at ELC?]&lt;br /&gt;
*** per CRTC pixmaps&lt;br /&gt;
**** allows for zero-copy rotations&lt;br /&gt;
**** support for larger screens&lt;br /&gt;
*** support for multiple screens&lt;br /&gt;
*** wayland (non-X-windows)&lt;br /&gt;
**** moving away from X on Meego&lt;br /&gt;
**** support for multiple APIs&lt;br /&gt;
*** EGL&lt;br /&gt;
*** OpenGL 2.1 supported now, OpenGL 3.0 support coming soon&lt;br /&gt;
**** geometry shaders, tesselation&lt;br /&gt;
*** architecture:&lt;br /&gt;
&lt;br /&gt;
 user space: Open GL   (compiler for shaders)&lt;br /&gt;
              mesa&lt;br /&gt;
              i915 driver&lt;br /&gt;
 -------------------------------&lt;br /&gt;
 graphics interface (is not opengl, but a device-specific abstraction)&lt;br /&gt;
 -------------------------------&lt;br /&gt;
 kernel space: DRI&lt;br /&gt;
               i915 driver&lt;br /&gt;
&lt;br /&gt;
kernel space driver is a small driver&lt;br /&gt;
Combination of DRI and GPU-specific driver is called the Graphics Execution Manager (GEM)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
** Android is using LLVM for compiler shaders&lt;br /&gt;
*** Android renderscript&lt;br /&gt;
*** http://android-developers.blogspot.com/2011/02/introducing-renderscript.html&lt;br /&gt;
*** [Google IO 2011 talk: Accelerated Android Rendering http://www.youtube.com/watch?v=v9S5EO7CLjo&amp;amp;NR=1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
** ABS Khronos standards talk? (no slides available)&lt;br /&gt;
&lt;br /&gt;
== Audio ==&lt;br /&gt;
&lt;br /&gt;
== Multimedia ==&lt;br /&gt;
* GStreamer - held first ever GStreamer conference in October (co-located with ELC Europe)&lt;br /&gt;
* Khronos is working on their stuff&lt;br /&gt;
&lt;br /&gt;
== Embedded-specific features ==&lt;br /&gt;
=== infrared remote control support ===&lt;br /&gt;
* LIRC kernel drivers were mainlined as of 2.6.26&lt;br /&gt;
** IR: add lirc support to ir-core [http://lwn.net/Articles/390423/ LWN.net LKML reference]&lt;br /&gt;
** LIRC web site: http://www.lirc.org/&lt;br /&gt;
*** LIRC FAQ: http://www.lirc.org/faq.html&lt;br /&gt;
&lt;br /&gt;
== Middleware ==&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
=== Debuggers ===&lt;br /&gt;
* 2012-11 - ARM FIQ work (activate KDB with ARM FIQ), by Anton Vorontsov&lt;br /&gt;
** See http://sourceforge.net/mailarchive/message.php?msg_id=30134183&lt;br /&gt;
&lt;br /&gt;
=== build systems ===&lt;br /&gt;
* OpenEmbedded/Poky (Yocto is umbrella project)&lt;br /&gt;
** Appears to be gaining momentum - lots of companies (including Sony) using it now&lt;br /&gt;
** lots of new interesting features: graphical tool, can build an image for self-hosting a build, new compatibility badging program for meta-data&lt;br /&gt;
** Will provide LTSI kernels as part of offering&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tracing ===&lt;br /&gt;
* 2010 - Perf vs. ftrace (LKML flamewar)&lt;br /&gt;
** 2011- big issue is whether tracepoints create a stable ABI&lt;br /&gt;
** [http://lwn.net/Articles/442113/ Ftrace, perf, and the tracing ABI] LWN.net article&lt;br /&gt;
&lt;br /&gt;
* Common Trace format&lt;br /&gt;
** 2011 - lttng is shipped by most major distros (including yocto)&lt;br /&gt;
** 2011 - would be nice to get in Android?&lt;br /&gt;
&lt;br /&gt;
=== Toolchains ===&lt;br /&gt;
* Linaro publishing toolchains - one directly for Android use&lt;br /&gt;
** see https://wiki.linaro.org/WorkingGroups/ToolChain, and&lt;br /&gt;
** https://launchpad.net/gcc-linaro&lt;br /&gt;
&lt;br /&gt;
=== eclipse stuff ===&lt;br /&gt;
* Yocto uses CDT remote launch, org.eclipse.cdt.launch.remote and [[TCF]] file/shells to transfer binaries and launch applications&lt;br /&gt;
** CDT = (C Development Toolkit)&lt;br /&gt;
** See: http://www.yoctoproject.org/projects/eclipse-ide-plug&lt;br /&gt;
** support communication with emulator or real device, via Yocto Eclipse TCF&lt;br /&gt;
** emulated devices use NFS rootfs so host and target access same filesystem&lt;br /&gt;
** debugging is via cross-gdb (gdbserver and gdb client on host)&lt;br /&gt;
&lt;br /&gt;
*** required plugins: (see http://www.yoctoproject.org/docs/adt-manual/adt-manual.html section 4.1.2)&lt;br /&gt;
**** CDT 7.0&lt;br /&gt;
**** RSE 3.2 (Remote System Explorer)&lt;br /&gt;
**** Autotools&lt;br /&gt;
**** Yocto Plug-in&lt;br /&gt;
&lt;br /&gt;
* Android uses Android Development Tools plugin for eclipse&lt;br /&gt;
** http://developer.android.com/sdk/eclipse-adt.html&lt;br /&gt;
** Supports communication with emulator or real device&lt;br /&gt;
** has DDMS and traceview, as well as debugging via jdwp&lt;br /&gt;
&lt;br /&gt;
=== emulators ===&lt;br /&gt;
&lt;br /&gt;
== Contract Work ==&lt;br /&gt;
* eMMC tuning guide - should be published in January&lt;br /&gt;
** Is coming along nicely&lt;br /&gt;
** has explanations about benchmarking, analysis of different tunable items in the filesystem stack&lt;br /&gt;
** has lots of results testing the following filesystems: ext3/4, BTRFS, F2FS, with different I/O schedulers (including the new ROW I/O Scheduler)&lt;br /&gt;
** has specific suggestions for what options are most effective to tune your filesystem, based on the characteristics of your flash device&lt;br /&gt;
&lt;br /&gt;
* Kernel dynamic memory analysis&lt;br /&gt;
** Project is complete&lt;br /&gt;
** see http://elinux.org/Kernel_dynamic_memory_analysis&lt;br /&gt;
** Will be reported on at ELC 2013&lt;br /&gt;
&lt;br /&gt;
== Distributions ==&lt;br /&gt;
* Poky or Angstrom (OpenEmbedded/Yocto Project)&lt;br /&gt;
&lt;br /&gt;
=== Distribution tools ===&lt;br /&gt;
* [[Yocto Project]]&lt;br /&gt;
&lt;br /&gt;
=== Mobile Phone distros ===&lt;br /&gt;
* Tizen - what's up now that Nokia bailed?&lt;br /&gt;
** http://www.rethink-wireless.com/2013/01/03/mobile-linux-oss-2013.htm&lt;br /&gt;
* Ubuntu mobile&lt;br /&gt;
** see above link again (says native apps are a boon for speed)&lt;br /&gt;
* Mozilla Firefox mobile??&lt;br /&gt;
&lt;br /&gt;
=== Android ===&lt;br /&gt;
* Versions news&lt;br /&gt;
* (2012-06) Android 4.1 (Jelly Bean) announced in June, shipped in July&lt;br /&gt;
* (2012-11) Android 4.2 (Jelly Bean update?) announced and shipped&lt;br /&gt;
** See http://en.wikipedia.org/wiki/Android_version_history&lt;br /&gt;
&lt;br /&gt;
* (2012-12) Market share:&lt;br /&gt;
** prediction from August that in 2014, installed base of Android will exceed that of all windows platforms (phone, PC and tablet) counted together. (wow!)&lt;br /&gt;
*** see http://communities-dominate.blogs.com/brands/2012/08/smartphone-market-shares-q2-full-numbers-samsung-and-android-solidifying-their-leads.html&lt;br /&gt;
&lt;br /&gt;
* Tablets&lt;br /&gt;
** Some nice tablets based on 3.0 are coming out (will move to Android 3.1 over summer)&lt;br /&gt;
* phone activations? (350,000 per day, as of April 8, 2011)&lt;br /&gt;
* GoogleTV&lt;br /&gt;
** Every device will have 3.1 and adb, which means every device can be used for development&lt;br /&gt;
** will have market&lt;br /&gt;
** good talks at Google I/O about app and web development for TVs&lt;br /&gt;
&lt;br /&gt;
* non-Android support for Android apps:&lt;br /&gt;
** Dalvik ported to Meego - myriad Group AG announced Myriad Alien Dalvik, for running Android apps on other Linux platforms&lt;br /&gt;
*** See http://www.linuxfordevices.com/c/a/News/Myriad-Group-Myriad-Alien-Dalvik/?kc=LNXDEVNL020911&lt;br /&gt;
** IcedRobot implementation of Android (using OpenJDK)&lt;br /&gt;
** BlueStack to run Android apps on Windows&lt;br /&gt;
*** see http://www.linuxfordevices.com/c/a/News/BlueStacks/?kc=LNXDEVNL052611&lt;br /&gt;
&lt;br /&gt;
=== Unbuntu TV ===&lt;br /&gt;
* see http://www.ubuntu.com/tv&lt;br /&gt;
* announced at CES 2012 - http://blog.canonical.com/2012/01/09/canonical-to-showcase-ubuntu-tv-at-ces/&lt;br /&gt;
&lt;br /&gt;
== CPU support ==&lt;br /&gt;
* ARM architecture issues over past year&lt;br /&gt;
** First, there was the&lt;br /&gt;
** [http://lwn.net/Articles/437162/ ARM Wrestling] LWN.net article on ARM issues&lt;br /&gt;
** Linaro working on methods to upstream code from vendors&lt;br /&gt;
** device tree for ARM status:&lt;br /&gt;
*** Grant's tree is included in linux-next&lt;br /&gt;
*** See http://groups.google.com/group/linux.kernel/browse_thread/thread/d084d006ad2212c6/06ebf8c4ad4a7b27?lnk=raot&lt;br /&gt;
*** ATAG deprecation - it can now be configured off, see http://lists.infradead.org/pipermail/linux-arm-kernel/2012-August/116699.html&lt;br /&gt;
&lt;br /&gt;
=== Chip vendor news ===&lt;br /&gt;
* Texas Instruments leaves mobile and tablet market&lt;br /&gt;
** November 2012, announces layoffs of 1700, drops future OMAP lines&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* unlockable bootloaders&lt;br /&gt;
** Announced by Motorola and Sony/Ericsson&lt;br /&gt;
** can unlock bootloader to install custom firmward&lt;br /&gt;
** wipes the phone to remove DRM-protected content&lt;br /&gt;
** Motorola says you can re-lock by going back to a vendor-supplied image&lt;br /&gt;
* version update support&lt;br /&gt;
** Announced at Google I/O&lt;br /&gt;
** multiple partners agree to provide version updates at regular intervals&lt;br /&gt;
&lt;br /&gt;
== Industry organizations or projects ==&lt;br /&gt;
* [[LiMo]] - anything happening?&lt;br /&gt;
* CELF =&amp;gt; CEWG under Linux Foundation&lt;br /&gt;
** CELF projects&lt;br /&gt;
* Linux Foundation&lt;br /&gt;
** Lots of stuff going on in embedded:&lt;br /&gt;
*** Yocto&lt;br /&gt;
*** Meego&lt;br /&gt;
*** CE Working Group&lt;br /&gt;
* Linaro - 1 year in&lt;br /&gt;
** see David Rusling's presentation from ELC&lt;br /&gt;
&lt;br /&gt;
== Trends ==&lt;br /&gt;
* movement to eclipse (both Yocto and Android support eclipse plugins for tools)&lt;br /&gt;
* movement to emulators&lt;br /&gt;
* application portability&lt;br /&gt;
** Android apps will be able to run just about anywhere&lt;br /&gt;
** Will an IOS emulator appear, or will apple strangle any attempts&lt;br /&gt;
* application stores&lt;br /&gt;
** multiple app stores will create competition (good)&lt;br /&gt;
* more open platforms&lt;br /&gt;
** Google TV&lt;br /&gt;
* lots of stuff that no one expects will appear&lt;br /&gt;
&lt;br /&gt;
* development trends:&lt;br /&gt;
** new tools??&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* lwn.net&lt;br /&gt;
* elinux.org&lt;br /&gt;
* stackoverflow.com&lt;br /&gt;
* kernelnewbies&lt;br /&gt;
* linuxfordevices.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/File:Status-of-embedded-Linux-2012-06-JJ41.pdf</id>
		<title>File:Status-of-embedded-Linux-2012-06-JJ41.pdf</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/File:Status-of-embedded-Linux-2012-06-JJ41.pdf"/>
				<updated>2013-03-22T23:08:20Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Embedded_linux_status</id>
		<title>Embedded linux status</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Embedded_linux_status"/>
				<updated>2013-03-22T23:07:52Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Presentation History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is an outline for a presentation on the status of embedded Linux:&lt;br /&gt;
&lt;br /&gt;
This is essentially [[User:Tim Bird|Tim Bird]]'s private collection of interesting notes about the status of embedded Linux.&lt;br /&gt;
It tends to get updated right before a Linux conference.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#ffffcc; align:right; &amp;quot;&amp;gt;&lt;br /&gt;
'''NEWS:''' Tim Bird's [[Media:Status-of-embedded-Linux-2012-02-ELC-v2.pdf|Status of Embedded Linux (PDF)]] (February 2012) presentation from ELC 2012 is now available.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Process for adding information ==&lt;br /&gt;
Anyone can add information to this page.  I used to maintain the information at&lt;br /&gt;
the [[Technology Watch List]], but the table format there is a bit constrictive.&lt;br /&gt;
(It would be nice if MediaWiki had a table editor!!)&lt;br /&gt;
&lt;br /&gt;
Since I have to form this stuff into a &amp;quot;State of Embedded Linux&amp;quot; presentation&lt;br /&gt;
several times a year, keeping the information in wiki outline format is convenient&lt;br /&gt;
for me.  It's easier to put directly into a presentation.&lt;br /&gt;
&lt;br /&gt;
Please place information in bullet form, with a link to a supporting article,&lt;br /&gt;
in the appropriate sub-section below.&lt;br /&gt;
&lt;br /&gt;
=== Page History ===&lt;br /&gt;
I'll let MediaWiki store historical versions of this page.  If you want to see&lt;br /&gt;
what the hot issues were from a last year or a few years ago, please see look&lt;br /&gt;
at the page history.  (Although, updates of this page have historically been&lt;br /&gt;
a bit spotty).&lt;br /&gt;
&lt;br /&gt;
=== Presentation History ===&lt;br /&gt;
Here's my presentation history:&lt;br /&gt;
* [[File:Status-of-Embedded-Linux-2013-03-JJ44.pdf|Jamboree 44 Status of Embedded Linux (PDF)]] (March 2013)&lt;br /&gt;
* [[File:Status-of-Embedded-Linux-2012-09-JJ42.pdf|Jamboree 42 Status of Embedded Linux (PDF)]] (September 2012)&lt;br /&gt;
* [[File:Status-of-embedded-Linux-2012-06-JJ41.pdf|Jamboree 41 Status of Embedded Linux (PDF)]] (June 2012)&lt;br /&gt;
* [[Media:Status-update-2012-03-Jamboree40.pdf|Jamboree 40 Status update (PDF)]] (March 2012)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2012-02-ELC-v2.pdf|ELC 2012 Status of Embedded Linux (PDF)]] (February 2012)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-11-LCB.pdf‎|LinuxCon Brazil Status of Embedded Linux talk (PDF)]] (November 2011)&lt;br /&gt;
* [[Media:Status-of-Embedded-Linux-2011-10-ELCE.pdf|ELC Europe 2011 Status of Embedded Linux talk (PDF)]] (October 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-09-Jamboree38.ppt|Jamboree 38 Status of Embedded Linux talk (PPT)]] (September 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-06-LCJ.pdf|LinuxCon Japan 2011 Status of Embedded Linux talk (PDF)]] (June 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Lnux-2011-05-J37.ppt|Jamboree 37 Status of Embedded Linux talk (PPT)]] (May 2011)&lt;br /&gt;
* [[Media:Status2-of-embedded-Linux-2010-12-Jamboree35.ppt|Jamboree 35 Status of Embedded Linux talk (PPT)]] (December 2010)&lt;br /&gt;
* [http://events.linuxfoundation.org/slides/2010/linuxcon_japan/linuxcon_jp2010_bird.pdf LinuxCon Japan 2010 Status of Embedded Linux BOF (PDF)] (September 2010)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2010-04-ELC.pdf|ELC 2010 Status of Embedded Linux talk (PDF)]] (April 2010)&lt;br /&gt;
* [[Media:State-of-embedded-linux-oct-2009.pdf|Japan Linux Symposium 2009 Status of Embedded Linux talk (PDF)]] (October 2009)&lt;br /&gt;
* [[Media:Embedded-Linux-Status-OLS2009.pdf|OLS 2009 Embedded Linux Status talk (PDF)]] (July 2009)&lt;br /&gt;
* [[Media:Embedded-Linux-BOF-OLS2008.ppt|OLS 2008 Embedded Linux BOF slides (PPT)]] (July 2008)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-ELC2008.ppt|ELC 2008 Status of Embedded Linux talk (PPT)]] (April 2008)&lt;br /&gt;
* [[Media:ELCE-BOF_State_of_Embedded_linux.pdf|ELC Europe 2007 - Status of Embedded Linux BOF slides (PDF)]] (October 2007)&lt;br /&gt;
* [[Media:Embedded_Linux_BOF_OLS_2007.pdf|OLS 2007 Embedded Linux BOF slides (PDF)]] (July 2007)&lt;br /&gt;
* [[Media:OLS2006-Embedded-BOF-2.ppt|OLS 2006 Embedded Linux BOF slides (PPT)]] (July 2005)&lt;br /&gt;
* OLS 2005 Status of Embedded Linux BOF [need presentation]&lt;br /&gt;
&lt;br /&gt;
== Uncategorized info ==&lt;br /&gt;
This is where I put stuff I haven't had time to analyze or sort into&lt;br /&gt;
the appropriate category:&lt;br /&gt;
&lt;br /&gt;
=== February 2012 ===&lt;br /&gt;
* lttng 2.0 was in mainline for about 2 weeks&lt;br /&gt;
** CTF exists, as well as babeltrace&lt;br /&gt;
** babeltrace (library for trace conversion) exists, but has no serious converters yet&lt;br /&gt;
** TMF (eclipse viewer) support for CTF coming real soon (if not already) (was predicted to be January 2012)&lt;br /&gt;
** TMF support for LTTng 2.0 planned for q2 2012&lt;br /&gt;
&lt;br /&gt;
== May 2011 ==&lt;br /&gt;
* good interview with Linus on 20th anniversary&lt;br /&gt;
** http://linuxfr.org/nodes/85904/comments/1230981&lt;br /&gt;
Quote:&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : What is your opinion about Android ? Are you mostly happy they made cellphones very usable or sad because it's really a kernel fork ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : I think forks are good things, they don't make me sad. A lot of Linux development has come out of forks, and it's the only way to keep developers honest - the threat that somebody else can do a better job and satisfy the market better by being different. The whole point of open source to me is really the very real ability to fork (but also the ability for all sides to then merge the forked content back, if it turns out that the fork was doing the right things!)&lt;br /&gt;
&lt;br /&gt;
So I think the android fork forced the mainline developers to seriously look at some of the issues that android had. I think we've solved them in mainline, and I hope (and do think) that android will eventually end up merging to mainline. But it will probably take time and further effort.&lt;br /&gt;
&lt;br /&gt;
I think the more serious long-term issue we have in the kernel is the wild and crazy embedded platform code (and mostly ARM - not because ARM is in any way fundamentally crazier, but because ARM is clearly the most successful embedded platform by far). The embedded world has always tended to eschew standardized platforms: they've been resource constrained etc, so they've done very tailored chip and board solutions, and felt that they couldn't afford a lot of platform abstraction.&lt;br /&gt;
&lt;br /&gt;
That causes a big maintenance headache, because then all those crazy platforms look slightly different to the kernel, and we have all that silly code just to support all those variations of what is really just the same thing deep down, just differently hooked up and with often arbitrary small differences.&lt;br /&gt;
&lt;br /&gt;
But that's something that happens both within and outside of Android, it's in no way android-specific.&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : What about the technical differences between Android and mainline ? Do you think the &amp;quot;wakelock&amp;quot; controversy is solvable ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : I think it is technically largely solved (ie &amp;quot;details to be fixed, but nothing fundamentally scary&amp;quot;), but practically once you have an interface and existing code, it just is a fair amount of work to change. And there perhaps isn't quite enough motivation to make those changes very quickly. So it will take time, and probably several releases (both mainline and adroid) to actually happen.&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : Can you explain why you're not happy with the ARM patches sent to you during merge windows ? Is there an obvious solution for this fragmentation problem ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : Obvious solution? No. The problem is the wild variety of hardware, and then in many cases the Linux ARM platform code (not the ARM CPU support, but the support for certain chips with all the glue issues around the CPU core) has been mostly ugly &amp;quot;copy-and-paste&amp;quot; from some previous ARM platform support file, with some minimal editing to make it match the new one.&lt;br /&gt;
&lt;br /&gt;
And it just results in this unmaintainable mess. It becomes painful when somebody then fixes some core infrastructure, and you end up with a hundred different ARM files all using that infrastructure. That happened with the IRQ chip driver cleanups Thomas did recently (well, has been doing over along time, the recent part is really just the final removal of some nasty old interfaces).&lt;br /&gt;
&lt;br /&gt;
It results in other maintainability issues too - patches being big just means that people won't look at them as carefully etc etc. So it's just a bad situation. Many of the cases should be solvable by having better generic solutions and then plugging in just some per-platform numbers for those solutions.&lt;br /&gt;
&lt;br /&gt;
== April 2011 ==&lt;br /&gt;
* http://www.linuxfordevices.com/c/a/News/OIN-announces-new-members/?kc=LNXDEVNL042011 - OIN grows 28%&lt;br /&gt;
* Intel working on supporting Android 3.0, according to Paul Ottellini&lt;br /&gt;
** Android in focus at Intel - http://news.cnet.com/8301-13924_3-20055868-64.html&lt;br /&gt;
* Mobile patent lawsuit cheatsheet - http://technologizer.com/2011/04/19/mobile-lawsuits/&lt;br /&gt;
* Linus fed up with ARM sub-architecture chaos&lt;br /&gt;
** Linaro organizing group to help resolve issues (possibly hire sub-arch coordinator)&lt;br /&gt;
* information about the longterm release (2.6.35)&lt;br /&gt;
** how are we deciding the next one&lt;br /&gt;
** information about CELF LTS kernel??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* CONFIG_PM being eliminated - improved PM configuration&lt;br /&gt;
* ftrace using -mfentry (feb 9, 2011 lkml, steven rostedt)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== April 2010 ===&lt;br /&gt;
* HP buys Palm - now owns Webos&lt;br /&gt;
* Japanese companies (with LIMO) announce new mobile stack - http://www.linuxfordevices.com/c/a/News/Consortium-from-NTT-DoCoMo-Renesas-Fujitsu-NEC-Panasonic-and-Sharp/?kc=LNXDEVNL042810&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Previous to April 2010 ===&lt;br /&gt;
* SystemTap 1.0 now includes support for cross-compilation.&lt;br /&gt;
* Patches for dynamic printks&lt;br /&gt;
* writing to /dev/kmsg to generate a printk (not new, but I just discovered it)&lt;br /&gt;
* LZO kernel compression is in 2.6.33&lt;br /&gt;
* Arjan van de Ven's timer-slack code - http://lwn.net/Articles/369361/&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
=== Kernel Versions ===&lt;br /&gt;
&lt;br /&gt;
== Bootup Time ==&lt;br /&gt;
* U-boot bootgraph.pl support (see e-mail from Andrew Murray)&lt;br /&gt;
* Android has problems&lt;br /&gt;
** many people are addressing it with Snapshot boot&lt;br /&gt;
* readahead is getting lots of attention&lt;br /&gt;
** See Tim's presentation on Android boot time with readahead&lt;br /&gt;
* snapshot boot (see above)&lt;br /&gt;
** See ELC 2010? and ABS 2011 presentation on snapshot booting&lt;br /&gt;
* embedded bootchart&lt;br /&gt;
** busybox bootchart&lt;br /&gt;
** bootchart in Android init&lt;br /&gt;
** bootchart2 project&lt;br /&gt;
*** C collector, python visualizer&lt;br /&gt;
&lt;br /&gt;
* filesystem speedups&lt;br /&gt;
** CELF funding UBI logging&lt;br /&gt;
** CELF funding read-only block filesystems on flash (MTD)&lt;br /&gt;
&lt;br /&gt;
* XIP&lt;br /&gt;
** Almost removed from kernel&lt;br /&gt;
*** versions in kernel were broken, use of XIP on out-of-tree platforms doesn't help keep XIP in the tree&lt;br /&gt;
&lt;br /&gt;
* Bootloader improvements&lt;br /&gt;
** [[Coreboot]] on x86&lt;br /&gt;
*** See [http://free-electrons.com/pub/video/2011/fosdem/fosdem2011-marek-fast-x86-boot.webm Really Fast x86 boot talk (video)] from Rudolf Marek at [http://archive.fosdem.org/2011/schedule/event/fast_x86_boot Fosdem 2011]&lt;br /&gt;
** U-Boot ARM caching enhancements&lt;br /&gt;
&lt;br /&gt;
== Bootloader ==&lt;br /&gt;
* fastboot support in U-Boot&lt;br /&gt;
** supposedly TI did this?&lt;br /&gt;
** See remark by John Rigby about possible Linaro project for this (on U-Boot list):http://mailrepository.com/u-boot.lists.denx.de/msg/3672644/&lt;br /&gt;
* DFU support in U-Boot&lt;br /&gt;
** [todo: get status update on this]&lt;br /&gt;
&lt;br /&gt;
== Memory Management ==&lt;br /&gt;
* anything new happening?&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
* suspend blockers? (aka wakelocks)&lt;br /&gt;
* device PM&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted:&lt;br /&gt;
* operating points&lt;br /&gt;
* frequency scaling&lt;br /&gt;
* tickless idle&lt;br /&gt;
* device pm&lt;br /&gt;
&lt;br /&gt;
2011 - have:&lt;br /&gt;
* tickless idle&lt;br /&gt;
* device pm&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
== System Size ==&lt;br /&gt;
* CELF reviving Linux-tiny project&lt;br /&gt;
* bloatwatch is still running, but who looks at it?&lt;br /&gt;
** http://www.selenic.com/bloatwatch/&lt;br /&gt;
** big increase (500K) from 2.6.37-rc6 to 2.6.37-rc7&lt;br /&gt;
* Xi Wang's talk at ELC about optimizing memory usage throughout system (kernel, libs, application)&lt;br /&gt;
&lt;br /&gt;
* OOM killer - dealing with memory pressure:&lt;br /&gt;
** [RESEARCH: OOM killer news]&lt;br /&gt;
** Android has its own thing&lt;br /&gt;
** cgroup memory notifications&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted (shrink kernel to ???k)&lt;br /&gt;
2011 - current size = ?&lt;br /&gt;
* see bloatwatch&lt;br /&gt;
* growth is in user space&lt;br /&gt;
* compare with platform size growth over same period&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
* virtualization for Android&lt;br /&gt;
** Samsung using vmware for Android (to separate personal and business use of phone)&lt;br /&gt;
* Android and attacks&lt;br /&gt;
** Android has different security&lt;br /&gt;
** has there been a root exploit from a java app?&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted trusted root ([[TPM]]), guard against exploits&lt;br /&gt;
2011 - have??&lt;br /&gt;
&lt;br /&gt;
== File Systems ==&lt;br /&gt;
* YAFFS2&lt;br /&gt;
** Mainline effort by Charles Manning&lt;br /&gt;
* LogFS&lt;br /&gt;
** Joern disappeared again&lt;br /&gt;
* Squashfs&lt;br /&gt;
** Now supports LZMA2 in mainline&lt;br /&gt;
** CELF funding SquashFS on MTD work&lt;br /&gt;
* Arnd Bergmann's work on optimizing Linux FS for cheap flash media&lt;br /&gt;
** See ELC presentation and Linaro page&lt;br /&gt;
* Tim Bird's treadahead work&lt;br /&gt;
** See ABS presentation&lt;br /&gt;
&lt;br /&gt;
== Legal Issues (licensing and patents) ==&lt;br /&gt;
* mobile patent wars&lt;br /&gt;
** Google buys Motorola for patent portfolio&lt;br /&gt;
** Apple blocks Samsung tablet introduction in Europe&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* OpenGL ES&lt;br /&gt;
* whither fbdev?&lt;br /&gt;
* 2D - Android doesn't have a native 2D API (or it's changing?)&lt;br /&gt;
** [RESEARCH - did Android drop it's native 2D API? (skia?)]&lt;br /&gt;
&lt;br /&gt;
* Latest intel Atom (cedarview) to have PowerVR graphics core&lt;br /&gt;
** Core is PowerVR SGX545-based&lt;br /&gt;
** Source: http://news.softpedia.com/news/Next-Intel-Atom-Has-Stronger-PowerVR-Graphics-199342.shtml&lt;br /&gt;
** patch submission to staging: http://thread.gmane.org/gmane.linux.kernel/1103793&lt;br /&gt;
&lt;br /&gt;
* GoogleTV 1.0 (logitech and Sony) use Sodaville, which is an Atom with a SGX535 core&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alan Cox submitted GMA500 kernel driver to kernel mailing list&lt;br /&gt;
** Source: http://www.h-online.com/open/news/item/Rudimentary-open-source-driver-for-Intel-s-GMA500-Poulsbo-1195125.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Intel work on graphics in kernel:&lt;br /&gt;
** See Kieth Packard's video from September 2010: [Meego Graphics under the hood: http://www.youtube.com/watch?v=YRYTCQqrFcA] OSCON 2010&lt;br /&gt;
** Working on grphics KMS and DRI in the kernel&lt;br /&gt;
*** good for faster booting&lt;br /&gt;
*** good for less flicker on transitions&lt;br /&gt;
*** higher performance 3d graphics&lt;br /&gt;
*** better memory management&lt;br /&gt;
**** kernel can pull memory back from graphics processor on low-memory conditions&lt;br /&gt;
***** [RESEARCH - status of memory allocation discussions at ELC?]&lt;br /&gt;
*** per CRTC pixmaps&lt;br /&gt;
**** allows for zero-copy rotations&lt;br /&gt;
**** support for larger screens&lt;br /&gt;
*** support for multiple screens&lt;br /&gt;
*** wayland (non-X-windows)&lt;br /&gt;
**** moving away from X on Meego&lt;br /&gt;
**** support for multiple APIs&lt;br /&gt;
*** EGL&lt;br /&gt;
*** OpenGL 2.1 supported now, OpenGL 3.0 support coming soon&lt;br /&gt;
**** geometry shaders, tesselation&lt;br /&gt;
*** architecture:&lt;br /&gt;
&lt;br /&gt;
 user space: Open GL   (compiler for shaders)&lt;br /&gt;
              mesa&lt;br /&gt;
              i915 driver&lt;br /&gt;
 -------------------------------&lt;br /&gt;
 graphics interface (is not opengl, but a device-specific abstraction)&lt;br /&gt;
 -------------------------------&lt;br /&gt;
 kernel space: DRI&lt;br /&gt;
               i915 driver&lt;br /&gt;
&lt;br /&gt;
kernel space driver is a small driver&lt;br /&gt;
Combination of DRI and GPU-specific driver is called the Graphics Execution Manager (GEM)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
** Android is using LLVM for compiler shaders&lt;br /&gt;
*** Android renderscript&lt;br /&gt;
*** http://android-developers.blogspot.com/2011/02/introducing-renderscript.html&lt;br /&gt;
*** [Google IO 2011 talk: Accelerated Android Rendering http://www.youtube.com/watch?v=v9S5EO7CLjo&amp;amp;NR=1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
** ABS Khronos standards talk? (no slides available)&lt;br /&gt;
&lt;br /&gt;
== Audio ==&lt;br /&gt;
&lt;br /&gt;
== Multimedia ==&lt;br /&gt;
* GStreamer - held first ever GStreamer conference in October (co-located with ELC Europe)&lt;br /&gt;
* Khronos is working on their stuff&lt;br /&gt;
&lt;br /&gt;
== Embedded-specific features ==&lt;br /&gt;
=== infrared remote control support ===&lt;br /&gt;
* LIRC kernel drivers were mainlined as of 2.6.26&lt;br /&gt;
** IR: add lirc support to ir-core [http://lwn.net/Articles/390423/ LWN.net LKML reference]&lt;br /&gt;
** LIRC web site: http://www.lirc.org/&lt;br /&gt;
*** LIRC FAQ: http://www.lirc.org/faq.html&lt;br /&gt;
&lt;br /&gt;
== Middleware ==&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
=== Debuggers ===&lt;br /&gt;
* 2012-11 - ARM FIQ work (activate KDB with ARM FIQ), by Anton Vorontsov&lt;br /&gt;
** See http://sourceforge.net/mailarchive/message.php?msg_id=30134183&lt;br /&gt;
&lt;br /&gt;
=== build systems ===&lt;br /&gt;
* OpenEmbedded/Poky (Yocto is umbrella project)&lt;br /&gt;
** Appears to be gaining momentum - lots of companies (including Sony) using it now&lt;br /&gt;
** lots of new interesting features: graphical tool, can build an image for self-hosting a build, new compatibility badging program for meta-data&lt;br /&gt;
** Will provide LTSI kernels as part of offering&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tracing ===&lt;br /&gt;
* 2010 - Perf vs. ftrace (LKML flamewar)&lt;br /&gt;
** 2011- big issue is whether tracepoints create a stable ABI&lt;br /&gt;
** [http://lwn.net/Articles/442113/ Ftrace, perf, and the tracing ABI] LWN.net article&lt;br /&gt;
&lt;br /&gt;
* Common Trace format&lt;br /&gt;
** 2011 - lttng is shipped by most major distros (including yocto)&lt;br /&gt;
** 2011 - would be nice to get in Android?&lt;br /&gt;
&lt;br /&gt;
=== Toolchains ===&lt;br /&gt;
* Linaro publishing toolchains - one directly for Android use&lt;br /&gt;
** see https://wiki.linaro.org/WorkingGroups/ToolChain, and&lt;br /&gt;
** https://launchpad.net/gcc-linaro&lt;br /&gt;
&lt;br /&gt;
=== eclipse stuff ===&lt;br /&gt;
* Yocto uses CDT remote launch, org.eclipse.cdt.launch.remote and [[TCF]] file/shells to transfer binaries and launch applications&lt;br /&gt;
** CDT = (C Development Toolkit)&lt;br /&gt;
** See: http://www.yoctoproject.org/projects/eclipse-ide-plug&lt;br /&gt;
** support communication with emulator or real device, via Yocto Eclipse TCF&lt;br /&gt;
** emulated devices use NFS rootfs so host and target access same filesystem&lt;br /&gt;
** debugging is via cross-gdb (gdbserver and gdb client on host)&lt;br /&gt;
&lt;br /&gt;
*** required plugins: (see http://www.yoctoproject.org/docs/adt-manual/adt-manual.html section 4.1.2)&lt;br /&gt;
**** CDT 7.0&lt;br /&gt;
**** RSE 3.2 (Remote System Explorer)&lt;br /&gt;
**** Autotools&lt;br /&gt;
**** Yocto Plug-in&lt;br /&gt;
&lt;br /&gt;
* Android uses Android Development Tools plugin for eclipse&lt;br /&gt;
** http://developer.android.com/sdk/eclipse-adt.html&lt;br /&gt;
** Supports communication with emulator or real device&lt;br /&gt;
** has DDMS and traceview, as well as debugging via jdwp&lt;br /&gt;
&lt;br /&gt;
=== emulators ===&lt;br /&gt;
&lt;br /&gt;
== Contract Work ==&lt;br /&gt;
* eMMC tuning guide - should be published in January&lt;br /&gt;
** Is coming along nicely&lt;br /&gt;
** has explanations about benchmarking, analysis of different tunable items in the filesystem stack&lt;br /&gt;
** has lots of results testing the following filesystems: ext3/4, BTRFS, F2FS, with different I/O schedulers (including the new ROW I/O Scheduler)&lt;br /&gt;
** has specific suggestions for what options are most effective to tune your filesystem, based on the characteristics of your flash device&lt;br /&gt;
&lt;br /&gt;
* Kernel dynamic memory analysis&lt;br /&gt;
** Project is complete&lt;br /&gt;
** see http://elinux.org/Kernel_dynamic_memory_analysis&lt;br /&gt;
** Will be reported on at ELC 2013&lt;br /&gt;
&lt;br /&gt;
== Distributions ==&lt;br /&gt;
* Poky or Angstrom (OpenEmbedded/Yocto Project)&lt;br /&gt;
&lt;br /&gt;
=== Distribution tools ===&lt;br /&gt;
* [[Yocto Project]]&lt;br /&gt;
&lt;br /&gt;
=== Mobile Phone distros ===&lt;br /&gt;
* Tizen - what's up now that Nokia bailed?&lt;br /&gt;
** http://www.rethink-wireless.com/2013/01/03/mobile-linux-oss-2013.htm&lt;br /&gt;
* Ubuntu mobile&lt;br /&gt;
** see above link again (says native apps are a boon for speed)&lt;br /&gt;
* Mozilla Firefox mobile??&lt;br /&gt;
&lt;br /&gt;
=== Android ===&lt;br /&gt;
* Versions news&lt;br /&gt;
* (2012-06) Android 4.1 (Jelly Bean) announced in June, shipped in July&lt;br /&gt;
* (2012-11) Android 4.2 (Jelly Bean update?) announced and shipped&lt;br /&gt;
** See http://en.wikipedia.org/wiki/Android_version_history&lt;br /&gt;
&lt;br /&gt;
* (2012-12) Market share:&lt;br /&gt;
** prediction from August that in 2014, installed base of Android will exceed that of all windows platforms (phone, PC and tablet) counted together. (wow!)&lt;br /&gt;
*** see http://communities-dominate.blogs.com/brands/2012/08/smartphone-market-shares-q2-full-numbers-samsung-and-android-solidifying-their-leads.html&lt;br /&gt;
&lt;br /&gt;
* Tablets&lt;br /&gt;
** Some nice tablets based on 3.0 are coming out (will move to Android 3.1 over summer)&lt;br /&gt;
* phone activations? (350,000 per day, as of April 8, 2011)&lt;br /&gt;
* GoogleTV&lt;br /&gt;
** Every device will have 3.1 and adb, which means every device can be used for development&lt;br /&gt;
** will have market&lt;br /&gt;
** good talks at Google I/O about app and web development for TVs&lt;br /&gt;
&lt;br /&gt;
* non-Android support for Android apps:&lt;br /&gt;
** Dalvik ported to Meego - myriad Group AG announced Myriad Alien Dalvik, for running Android apps on other Linux platforms&lt;br /&gt;
*** See http://www.linuxfordevices.com/c/a/News/Myriad-Group-Myriad-Alien-Dalvik/?kc=LNXDEVNL020911&lt;br /&gt;
** IcedRobot implementation of Android (using OpenJDK)&lt;br /&gt;
** BlueStack to run Android apps on Windows&lt;br /&gt;
*** see http://www.linuxfordevices.com/c/a/News/BlueStacks/?kc=LNXDEVNL052611&lt;br /&gt;
&lt;br /&gt;
=== Unbuntu TV ===&lt;br /&gt;
* see http://www.ubuntu.com/tv&lt;br /&gt;
* announced at CES 2012 - http://blog.canonical.com/2012/01/09/canonical-to-showcase-ubuntu-tv-at-ces/&lt;br /&gt;
&lt;br /&gt;
== CPU support ==&lt;br /&gt;
* ARM architecture issues over past year&lt;br /&gt;
** First, there was the&lt;br /&gt;
** [http://lwn.net/Articles/437162/ ARM Wrestling] LWN.net article on ARM issues&lt;br /&gt;
** Linaro working on methods to upstream code from vendors&lt;br /&gt;
** device tree for ARM status:&lt;br /&gt;
*** Grant's tree is included in linux-next&lt;br /&gt;
*** See http://groups.google.com/group/linux.kernel/browse_thread/thread/d084d006ad2212c6/06ebf8c4ad4a7b27?lnk=raot&lt;br /&gt;
*** ATAG deprecation - it can now be configured off, see http://lists.infradead.org/pipermail/linux-arm-kernel/2012-August/116699.html&lt;br /&gt;
&lt;br /&gt;
=== Chip vendor news ===&lt;br /&gt;
* Texas Instruments leaves mobile and tablet market&lt;br /&gt;
** November 2012, announces layoffs of 1700, drops future OMAP lines&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* unlockable bootloaders&lt;br /&gt;
** Announced by Motorola and Sony/Ericsson&lt;br /&gt;
** can unlock bootloader to install custom firmward&lt;br /&gt;
** wipes the phone to remove DRM-protected content&lt;br /&gt;
** Motorola says you can re-lock by going back to a vendor-supplied image&lt;br /&gt;
* version update support&lt;br /&gt;
** Announced at Google I/O&lt;br /&gt;
** multiple partners agree to provide version updates at regular intervals&lt;br /&gt;
&lt;br /&gt;
== Industry organizations or projects ==&lt;br /&gt;
* [[LiMo]] - anything happening?&lt;br /&gt;
* CELF =&amp;gt; CEWG under Linux Foundation&lt;br /&gt;
** CELF projects&lt;br /&gt;
* Linux Foundation&lt;br /&gt;
** Lots of stuff going on in embedded:&lt;br /&gt;
*** Yocto&lt;br /&gt;
*** Meego&lt;br /&gt;
*** CE Working Group&lt;br /&gt;
* Linaro - 1 year in&lt;br /&gt;
** see David Rusling's presentation from ELC&lt;br /&gt;
&lt;br /&gt;
== Trends ==&lt;br /&gt;
* movement to eclipse (both Yocto and Android support eclipse plugins for tools)&lt;br /&gt;
* movement to emulators&lt;br /&gt;
* application portability&lt;br /&gt;
** Android apps will be able to run just about anywhere&lt;br /&gt;
** Will an IOS emulator appear, or will apple strangle any attempts&lt;br /&gt;
* application stores&lt;br /&gt;
** multiple app stores will create competition (good)&lt;br /&gt;
* more open platforms&lt;br /&gt;
** Google TV&lt;br /&gt;
* lots of stuff that no one expects will appear&lt;br /&gt;
&lt;br /&gt;
* development trends:&lt;br /&gt;
** new tools??&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* lwn.net&lt;br /&gt;
* elinux.org&lt;br /&gt;
* stackoverflow.com&lt;br /&gt;
* kernelnewbies&lt;br /&gt;
* linuxfordevices.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/File:Status-of-Embedded-Linux-2012-09-JJ42.pdf</id>
		<title>File:Status-of-Embedded-Linux-2012-09-JJ42.pdf</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/File:Status-of-Embedded-Linux-2012-09-JJ42.pdf"/>
				<updated>2013-03-22T23:07:15Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Embedded_linux_status</id>
		<title>Embedded linux status</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Embedded_linux_status"/>
				<updated>2013-03-22T23:06:13Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Presentation History */ add 2012 and 2013 presentations&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is an outline for a presentation on the status of embedded Linux:&lt;br /&gt;
&lt;br /&gt;
This is essentially [[User:Tim Bird|Tim Bird]]'s private collection of interesting notes about the status of embedded Linux.&lt;br /&gt;
It tends to get updated right before a Linux conference.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div style=&amp;quot;margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1em; background-color:#ffffcc; align:right; &amp;quot;&amp;gt;&lt;br /&gt;
'''NEWS:''' Tim Bird's [[Media:Status-of-embedded-Linux-2012-02-ELC-v2.pdf|Status of Embedded Linux (PDF)]] (February 2012) presentation from ELC 2012 is now available.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Process for adding information ==&lt;br /&gt;
Anyone can add information to this page.  I used to maintain the information at&lt;br /&gt;
the [[Technology Watch List]], but the table format there is a bit constrictive.&lt;br /&gt;
(It would be nice if MediaWiki had a table editor!!)&lt;br /&gt;
&lt;br /&gt;
Since I have to form this stuff into a &amp;quot;State of Embedded Linux&amp;quot; presentation&lt;br /&gt;
several times a year, keeping the information in wiki outline format is convenient&lt;br /&gt;
for me.  It's easier to put directly into a presentation.&lt;br /&gt;
&lt;br /&gt;
Please place information in bullet form, with a link to a supporting article,&lt;br /&gt;
in the appropriate sub-section below.&lt;br /&gt;
&lt;br /&gt;
=== Page History ===&lt;br /&gt;
I'll let MediaWiki store historical versions of this page.  If you want to see&lt;br /&gt;
what the hot issues were from a last year or a few years ago, please see look&lt;br /&gt;
at the page history.  (Although, updates of this page have historically been&lt;br /&gt;
a bit spotty).&lt;br /&gt;
&lt;br /&gt;
=== Presentation History ===&lt;br /&gt;
Here's my presentation history:&lt;br /&gt;
* [[File:Status-of-Embedded-Linux-2013-03-JJ44.pdf|Jamboree 44 Status of Embedded Linux (PDF)]] (March 2013)&lt;br /&gt;
* [[File:Status-of-embedded-Linux-2012-09-JJ42.pdf|Jamboree 42 Status of Embedded Linux (PDF)]] (September 2012)&lt;br /&gt;
* [[File:Status-of-embedded-Linux-2012-06-JJ41.pdf|Jamboree 41 Status of Embedded Linux (PDF)]] (June 2012)&lt;br /&gt;
* [[Media:Status-update-2012-03-Jamboree40.pdf|Jamboree 40 Status update (PDF)]] (March 2012)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2012-02-ELC-v2.pdf|ELC 2012 Status of Embedded Linux (PDF)]] (February 2012)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-11-LCB.pdf‎|LinuxCon Brazil Status of Embedded Linux talk (PDF)]] (November 2011)&lt;br /&gt;
* [[Media:Status-of-Embedded-Linux-2011-10-ELCE.pdf|ELC Europe 2011 Status of Embedded Linux talk (PDF)]] (October 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-09-Jamboree38.ppt|Jamboree 38 Status of Embedded Linux talk (PPT)]] (September 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2011-06-LCJ.pdf|LinuxCon Japan 2011 Status of Embedded Linux talk (PDF)]] (June 2011)&lt;br /&gt;
* [[Media:Status-of-embedded-Lnux-2011-05-J37.ppt|Jamboree 37 Status of Embedded Linux talk (PPT)]] (May 2011)&lt;br /&gt;
* [[Media:Status2-of-embedded-Linux-2010-12-Jamboree35.ppt|Jamboree 35 Status of Embedded Linux talk (PPT)]] (December 2010)&lt;br /&gt;
* [http://events.linuxfoundation.org/slides/2010/linuxcon_japan/linuxcon_jp2010_bird.pdf LinuxCon Japan 2010 Status of Embedded Linux BOF (PDF)] (September 2010)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-2010-04-ELC.pdf|ELC 2010 Status of Embedded Linux talk (PDF)]] (April 2010)&lt;br /&gt;
* [[Media:State-of-embedded-linux-oct-2009.pdf|Japan Linux Symposium 2009 Status of Embedded Linux talk (PDF)]] (October 2009)&lt;br /&gt;
* [[Media:Embedded-Linux-Status-OLS2009.pdf|OLS 2009 Embedded Linux Status talk (PDF)]] (July 2009)&lt;br /&gt;
* [[Media:Embedded-Linux-BOF-OLS2008.ppt|OLS 2008 Embedded Linux BOF slides (PPT)]] (July 2008)&lt;br /&gt;
* [[Media:Status-of-embedded-Linux-ELC2008.ppt|ELC 2008 Status of Embedded Linux talk (PPT)]] (April 2008)&lt;br /&gt;
* [[Media:ELCE-BOF_State_of_Embedded_linux.pdf|ELC Europe 2007 - Status of Embedded Linux BOF slides (PDF)]] (October 2007)&lt;br /&gt;
* [[Media:Embedded_Linux_BOF_OLS_2007.pdf|OLS 2007 Embedded Linux BOF slides (PDF)]] (July 2007)&lt;br /&gt;
* [[Media:OLS2006-Embedded-BOF-2.ppt|OLS 2006 Embedded Linux BOF slides (PPT)]] (July 2005)&lt;br /&gt;
* OLS 2005 Status of Embedded Linux BOF [need presentation]&lt;br /&gt;
&lt;br /&gt;
== Uncategorized info ==&lt;br /&gt;
This is where I put stuff I haven't had time to analyze or sort into&lt;br /&gt;
the appropriate category:&lt;br /&gt;
&lt;br /&gt;
=== February 2012 ===&lt;br /&gt;
* lttng 2.0 was in mainline for about 2 weeks&lt;br /&gt;
** CTF exists, as well as babeltrace&lt;br /&gt;
** babeltrace (library for trace conversion) exists, but has no serious converters yet&lt;br /&gt;
** TMF (eclipse viewer) support for CTF coming real soon (if not already) (was predicted to be January 2012)&lt;br /&gt;
** TMF support for LTTng 2.0 planned for q2 2012&lt;br /&gt;
&lt;br /&gt;
== May 2011 ==&lt;br /&gt;
* good interview with Linus on 20th anniversary&lt;br /&gt;
** http://linuxfr.org/nodes/85904/comments/1230981&lt;br /&gt;
Quote:&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : What is your opinion about Android ? Are you mostly happy they made cellphones very usable or sad because it's really a kernel fork ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : I think forks are good things, they don't make me sad. A lot of Linux development has come out of forks, and it's the only way to keep developers honest - the threat that somebody else can do a better job and satisfy the market better by being different. The whole point of open source to me is really the very real ability to fork (but also the ability for all sides to then merge the forked content back, if it turns out that the fork was doing the right things!)&lt;br /&gt;
&lt;br /&gt;
So I think the android fork forced the mainline developers to seriously look at some of the issues that android had. I think we've solved them in mainline, and I hope (and do think) that android will eventually end up merging to mainline. But it will probably take time and further effort.&lt;br /&gt;
&lt;br /&gt;
I think the more serious long-term issue we have in the kernel is the wild and crazy embedded platform code (and mostly ARM - not because ARM is in any way fundamentally crazier, but because ARM is clearly the most successful embedded platform by far). The embedded world has always tended to eschew standardized platforms: they've been resource constrained etc, so they've done very tailored chip and board solutions, and felt that they couldn't afford a lot of platform abstraction.&lt;br /&gt;
&lt;br /&gt;
That causes a big maintenance headache, because then all those crazy platforms look slightly different to the kernel, and we have all that silly code just to support all those variations of what is really just the same thing deep down, just differently hooked up and with often arbitrary small differences.&lt;br /&gt;
&lt;br /&gt;
But that's something that happens both within and outside of Android, it's in no way android-specific.&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : What about the technical differences between Android and mainline ? Do you think the &amp;quot;wakelock&amp;quot; controversy is solvable ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : I think it is technically largely solved (ie &amp;quot;details to be fixed, but nothing fundamentally scary&amp;quot;), but practically once you have an interface and existing code, it just is a fair amount of work to change. And there perhaps isn't quite enough motivation to make those changes very quickly. So it will take time, and probably several releases (both mainline and adroid) to actually happen.&lt;br /&gt;
&lt;br /&gt;
'''LinuxFR''' : Can you explain why you're not happy with the ARM patches sent to you during merge windows ? Is there an obvious solution for this fragmentation problem ?&lt;br /&gt;
&lt;br /&gt;
'''Linus Torvalds''' : Obvious solution? No. The problem is the wild variety of hardware, and then in many cases the Linux ARM platform code (not the ARM CPU support, but the support for certain chips with all the glue issues around the CPU core) has been mostly ugly &amp;quot;copy-and-paste&amp;quot; from some previous ARM platform support file, with some minimal editing to make it match the new one.&lt;br /&gt;
&lt;br /&gt;
And it just results in this unmaintainable mess. It becomes painful when somebody then fixes some core infrastructure, and you end up with a hundred different ARM files all using that infrastructure. That happened with the IRQ chip driver cleanups Thomas did recently (well, has been doing over along time, the recent part is really just the final removal of some nasty old interfaces).&lt;br /&gt;
&lt;br /&gt;
It results in other maintainability issues too - patches being big just means that people won't look at them as carefully etc etc. So it's just a bad situation. Many of the cases should be solvable by having better generic solutions and then plugging in just some per-platform numbers for those solutions.&lt;br /&gt;
&lt;br /&gt;
== April 2011 ==&lt;br /&gt;
* http://www.linuxfordevices.com/c/a/News/OIN-announces-new-members/?kc=LNXDEVNL042011 - OIN grows 28%&lt;br /&gt;
* Intel working on supporting Android 3.0, according to Paul Ottellini&lt;br /&gt;
** Android in focus at Intel - http://news.cnet.com/8301-13924_3-20055868-64.html&lt;br /&gt;
* Mobile patent lawsuit cheatsheet - http://technologizer.com/2011/04/19/mobile-lawsuits/&lt;br /&gt;
* Linus fed up with ARM sub-architecture chaos&lt;br /&gt;
** Linaro organizing group to help resolve issues (possibly hire sub-arch coordinator)&lt;br /&gt;
* information about the longterm release (2.6.35)&lt;br /&gt;
** how are we deciding the next one&lt;br /&gt;
** information about CELF LTS kernel??&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Other ===&lt;br /&gt;
* CONFIG_PM being eliminated - improved PM configuration&lt;br /&gt;
* ftrace using -mfentry (feb 9, 2011 lkml, steven rostedt)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== April 2010 ===&lt;br /&gt;
* HP buys Palm - now owns Webos&lt;br /&gt;
* Japanese companies (with LIMO) announce new mobile stack - http://www.linuxfordevices.com/c/a/News/Consortium-from-NTT-DoCoMo-Renesas-Fujitsu-NEC-Panasonic-and-Sharp/?kc=LNXDEVNL042810&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Previous to April 2010 ===&lt;br /&gt;
* SystemTap 1.0 now includes support for cross-compilation.&lt;br /&gt;
* Patches for dynamic printks&lt;br /&gt;
* writing to /dev/kmsg to generate a printk (not new, but I just discovered it)&lt;br /&gt;
* LZO kernel compression is in 2.6.33&lt;br /&gt;
* Arjan van de Ven's timer-slack code - http://lwn.net/Articles/369361/&lt;br /&gt;
&lt;br /&gt;
== Kernel ==&lt;br /&gt;
=== Kernel Versions ===&lt;br /&gt;
&lt;br /&gt;
== Bootup Time ==&lt;br /&gt;
* U-boot bootgraph.pl support (see e-mail from Andrew Murray)&lt;br /&gt;
* Android has problems&lt;br /&gt;
** many people are addressing it with Snapshot boot&lt;br /&gt;
* readahead is getting lots of attention&lt;br /&gt;
** See Tim's presentation on Android boot time with readahead&lt;br /&gt;
* snapshot boot (see above)&lt;br /&gt;
** See ELC 2010? and ABS 2011 presentation on snapshot booting&lt;br /&gt;
* embedded bootchart&lt;br /&gt;
** busybox bootchart&lt;br /&gt;
** bootchart in Android init&lt;br /&gt;
** bootchart2 project&lt;br /&gt;
*** C collector, python visualizer&lt;br /&gt;
&lt;br /&gt;
* filesystem speedups&lt;br /&gt;
** CELF funding UBI logging&lt;br /&gt;
** CELF funding read-only block filesystems on flash (MTD)&lt;br /&gt;
&lt;br /&gt;
* XIP&lt;br /&gt;
** Almost removed from kernel&lt;br /&gt;
*** versions in kernel were broken, use of XIP on out-of-tree platforms doesn't help keep XIP in the tree&lt;br /&gt;
&lt;br /&gt;
* Bootloader improvements&lt;br /&gt;
** [[Coreboot]] on x86&lt;br /&gt;
*** See [http://free-electrons.com/pub/video/2011/fosdem/fosdem2011-marek-fast-x86-boot.webm Really Fast x86 boot talk (video)] from Rudolf Marek at [http://archive.fosdem.org/2011/schedule/event/fast_x86_boot Fosdem 2011]&lt;br /&gt;
** U-Boot ARM caching enhancements&lt;br /&gt;
&lt;br /&gt;
== Bootloader ==&lt;br /&gt;
* fastboot support in U-Boot&lt;br /&gt;
** supposedly TI did this?&lt;br /&gt;
** See remark by John Rigby about possible Linaro project for this (on U-Boot list):http://mailrepository.com/u-boot.lists.denx.de/msg/3672644/&lt;br /&gt;
* DFU support in U-Boot&lt;br /&gt;
** [todo: get status update on this]&lt;br /&gt;
&lt;br /&gt;
== Memory Management ==&lt;br /&gt;
* anything new happening?&lt;br /&gt;
&lt;br /&gt;
== Power Management ==&lt;br /&gt;
* suspend blockers? (aka wakelocks)&lt;br /&gt;
* device PM&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted:&lt;br /&gt;
* operating points&lt;br /&gt;
* frequency scaling&lt;br /&gt;
* tickless idle&lt;br /&gt;
* device pm&lt;br /&gt;
&lt;br /&gt;
2011 - have:&lt;br /&gt;
* tickless idle&lt;br /&gt;
* device pm&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
== System Size ==&lt;br /&gt;
* CELF reviving Linux-tiny project&lt;br /&gt;
* bloatwatch is still running, but who looks at it?&lt;br /&gt;
** http://www.selenic.com/bloatwatch/&lt;br /&gt;
** big increase (500K) from 2.6.37-rc6 to 2.6.37-rc7&lt;br /&gt;
* Xi Wang's talk at ELC about optimizing memory usage throughout system (kernel, libs, application)&lt;br /&gt;
&lt;br /&gt;
* OOM killer - dealing with memory pressure:&lt;br /&gt;
** [RESEARCH: OOM killer news]&lt;br /&gt;
** Android has its own thing&lt;br /&gt;
** cgroup memory notifications&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted (shrink kernel to ???k)&lt;br /&gt;
2011 - current size = ?&lt;br /&gt;
* see bloatwatch&lt;br /&gt;
* growth is in user space&lt;br /&gt;
* compare with platform size growth over same period&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
* virtualization for Android&lt;br /&gt;
** Samsung using vmware for Android (to separate personal and business use of phone)&lt;br /&gt;
* Android and attacks&lt;br /&gt;
** Android has different security&lt;br /&gt;
** has there been a root exploit from a java app?&lt;br /&gt;
&lt;br /&gt;
=== then and now ===&lt;br /&gt;
2003 - wanted trusted root ([[TPM]]), guard against exploits&lt;br /&gt;
2011 - have??&lt;br /&gt;
&lt;br /&gt;
== File Systems ==&lt;br /&gt;
* YAFFS2&lt;br /&gt;
** Mainline effort by Charles Manning&lt;br /&gt;
* LogFS&lt;br /&gt;
** Joern disappeared again&lt;br /&gt;
* Squashfs&lt;br /&gt;
** Now supports LZMA2 in mainline&lt;br /&gt;
** CELF funding SquashFS on MTD work&lt;br /&gt;
* Arnd Bergmann's work on optimizing Linux FS for cheap flash media&lt;br /&gt;
** See ELC presentation and Linaro page&lt;br /&gt;
* Tim Bird's treadahead work&lt;br /&gt;
** See ABS presentation&lt;br /&gt;
&lt;br /&gt;
== Legal Issues (licensing and patents) ==&lt;br /&gt;
* mobile patent wars&lt;br /&gt;
** Google buys Motorola for patent portfolio&lt;br /&gt;
** Apple blocks Samsung tablet introduction in Europe&lt;br /&gt;
&lt;br /&gt;
== Graphics ==&lt;br /&gt;
* OpenGL ES&lt;br /&gt;
* whither fbdev?&lt;br /&gt;
* 2D - Android doesn't have a native 2D API (or it's changing?)&lt;br /&gt;
** [RESEARCH - did Android drop it's native 2D API? (skia?)]&lt;br /&gt;
&lt;br /&gt;
* Latest intel Atom (cedarview) to have PowerVR graphics core&lt;br /&gt;
** Core is PowerVR SGX545-based&lt;br /&gt;
** Source: http://news.softpedia.com/news/Next-Intel-Atom-Has-Stronger-PowerVR-Graphics-199342.shtml&lt;br /&gt;
** patch submission to staging: http://thread.gmane.org/gmane.linux.kernel/1103793&lt;br /&gt;
&lt;br /&gt;
* GoogleTV 1.0 (logitech and Sony) use Sodaville, which is an Atom with a SGX535 core&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Alan Cox submitted GMA500 kernel driver to kernel mailing list&lt;br /&gt;
** Source: http://www.h-online.com/open/news/item/Rudimentary-open-source-driver-for-Intel-s-GMA500-Poulsbo-1195125.html&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Intel work on graphics in kernel:&lt;br /&gt;
** See Kieth Packard's video from September 2010: [Meego Graphics under the hood: http://www.youtube.com/watch?v=YRYTCQqrFcA] OSCON 2010&lt;br /&gt;
** Working on grphics KMS and DRI in the kernel&lt;br /&gt;
*** good for faster booting&lt;br /&gt;
*** good for less flicker on transitions&lt;br /&gt;
*** higher performance 3d graphics&lt;br /&gt;
*** better memory management&lt;br /&gt;
**** kernel can pull memory back from graphics processor on low-memory conditions&lt;br /&gt;
***** [RESEARCH - status of memory allocation discussions at ELC?]&lt;br /&gt;
*** per CRTC pixmaps&lt;br /&gt;
**** allows for zero-copy rotations&lt;br /&gt;
**** support for larger screens&lt;br /&gt;
*** support for multiple screens&lt;br /&gt;
*** wayland (non-X-windows)&lt;br /&gt;
**** moving away from X on Meego&lt;br /&gt;
**** support for multiple APIs&lt;br /&gt;
*** EGL&lt;br /&gt;
*** OpenGL 2.1 supported now, OpenGL 3.0 support coming soon&lt;br /&gt;
**** geometry shaders, tesselation&lt;br /&gt;
*** architecture:&lt;br /&gt;
&lt;br /&gt;
 user space: Open GL   (compiler for shaders)&lt;br /&gt;
              mesa&lt;br /&gt;
              i915 driver&lt;br /&gt;
 -------------------------------&lt;br /&gt;
 graphics interface (is not opengl, but a device-specific abstraction)&lt;br /&gt;
 -------------------------------&lt;br /&gt;
 kernel space: DRI&lt;br /&gt;
               i915 driver&lt;br /&gt;
&lt;br /&gt;
kernel space driver is a small driver&lt;br /&gt;
Combination of DRI and GPU-specific driver is called the Graphics Execution Manager (GEM)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
** Android is using LLVM for compiler shaders&lt;br /&gt;
*** Android renderscript&lt;br /&gt;
*** http://android-developers.blogspot.com/2011/02/introducing-renderscript.html&lt;br /&gt;
*** [Google IO 2011 talk: Accelerated Android Rendering http://www.youtube.com/watch?v=v9S5EO7CLjo&amp;amp;NR=1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
** ABS Khronos standards talk? (no slides available)&lt;br /&gt;
&lt;br /&gt;
== Audio ==&lt;br /&gt;
&lt;br /&gt;
== Multimedia ==&lt;br /&gt;
* GStreamer - held first ever GStreamer conference in October (co-located with ELC Europe)&lt;br /&gt;
* Khronos is working on their stuff&lt;br /&gt;
&lt;br /&gt;
== Embedded-specific features ==&lt;br /&gt;
=== infrared remote control support ===&lt;br /&gt;
* LIRC kernel drivers were mainlined as of 2.6.26&lt;br /&gt;
** IR: add lirc support to ir-core [http://lwn.net/Articles/390423/ LWN.net LKML reference]&lt;br /&gt;
** LIRC web site: http://www.lirc.org/&lt;br /&gt;
*** LIRC FAQ: http://www.lirc.org/faq.html&lt;br /&gt;
&lt;br /&gt;
== Middleware ==&lt;br /&gt;
* ???&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
=== Debuggers ===&lt;br /&gt;
* 2012-11 - ARM FIQ work (activate KDB with ARM FIQ), by Anton Vorontsov&lt;br /&gt;
** See http://sourceforge.net/mailarchive/message.php?msg_id=30134183&lt;br /&gt;
&lt;br /&gt;
=== build systems ===&lt;br /&gt;
* OpenEmbedded/Poky (Yocto is umbrella project)&lt;br /&gt;
** Appears to be gaining momentum - lots of companies (including Sony) using it now&lt;br /&gt;
** lots of new interesting features: graphical tool, can build an image for self-hosting a build, new compatibility badging program for meta-data&lt;br /&gt;
** Will provide LTSI kernels as part of offering&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tracing ===&lt;br /&gt;
* 2010 - Perf vs. ftrace (LKML flamewar)&lt;br /&gt;
** 2011- big issue is whether tracepoints create a stable ABI&lt;br /&gt;
** [http://lwn.net/Articles/442113/ Ftrace, perf, and the tracing ABI] LWN.net article&lt;br /&gt;
&lt;br /&gt;
* Common Trace format&lt;br /&gt;
** 2011 - lttng is shipped by most major distros (including yocto)&lt;br /&gt;
** 2011 - would be nice to get in Android?&lt;br /&gt;
&lt;br /&gt;
=== Toolchains ===&lt;br /&gt;
* Linaro publishing toolchains - one directly for Android use&lt;br /&gt;
** see https://wiki.linaro.org/WorkingGroups/ToolChain, and&lt;br /&gt;
** https://launchpad.net/gcc-linaro&lt;br /&gt;
&lt;br /&gt;
=== eclipse stuff ===&lt;br /&gt;
* Yocto uses CDT remote launch, org.eclipse.cdt.launch.remote and [[TCF]] file/shells to transfer binaries and launch applications&lt;br /&gt;
** CDT = (C Development Toolkit)&lt;br /&gt;
** See: http://www.yoctoproject.org/projects/eclipse-ide-plug&lt;br /&gt;
** support communication with emulator or real device, via Yocto Eclipse TCF&lt;br /&gt;
** emulated devices use NFS rootfs so host and target access same filesystem&lt;br /&gt;
** debugging is via cross-gdb (gdbserver and gdb client on host)&lt;br /&gt;
&lt;br /&gt;
*** required plugins: (see http://www.yoctoproject.org/docs/adt-manual/adt-manual.html section 4.1.2)&lt;br /&gt;
**** CDT 7.0&lt;br /&gt;
**** RSE 3.2 (Remote System Explorer)&lt;br /&gt;
**** Autotools&lt;br /&gt;
**** Yocto Plug-in&lt;br /&gt;
&lt;br /&gt;
* Android uses Android Development Tools plugin for eclipse&lt;br /&gt;
** http://developer.android.com/sdk/eclipse-adt.html&lt;br /&gt;
** Supports communication with emulator or real device&lt;br /&gt;
** has DDMS and traceview, as well as debugging via jdwp&lt;br /&gt;
&lt;br /&gt;
=== emulators ===&lt;br /&gt;
&lt;br /&gt;
== Contract Work ==&lt;br /&gt;
* eMMC tuning guide - should be published in January&lt;br /&gt;
** Is coming along nicely&lt;br /&gt;
** has explanations about benchmarking, analysis of different tunable items in the filesystem stack&lt;br /&gt;
** has lots of results testing the following filesystems: ext3/4, BTRFS, F2FS, with different I/O schedulers (including the new ROW I/O Scheduler)&lt;br /&gt;
** has specific suggestions for what options are most effective to tune your filesystem, based on the characteristics of your flash device&lt;br /&gt;
&lt;br /&gt;
* Kernel dynamic memory analysis&lt;br /&gt;
** Project is complete&lt;br /&gt;
** see http://elinux.org/Kernel_dynamic_memory_analysis&lt;br /&gt;
** Will be reported on at ELC 2013&lt;br /&gt;
&lt;br /&gt;
== Distributions ==&lt;br /&gt;
* Poky or Angstrom (OpenEmbedded/Yocto Project)&lt;br /&gt;
&lt;br /&gt;
=== Distribution tools ===&lt;br /&gt;
* [[Yocto Project]]&lt;br /&gt;
&lt;br /&gt;
=== Mobile Phone distros ===&lt;br /&gt;
* Tizen - what's up now that Nokia bailed?&lt;br /&gt;
** http://www.rethink-wireless.com/2013/01/03/mobile-linux-oss-2013.htm&lt;br /&gt;
* Ubuntu mobile&lt;br /&gt;
** see above link again (says native apps are a boon for speed)&lt;br /&gt;
* Mozilla Firefox mobile??&lt;br /&gt;
&lt;br /&gt;
=== Android ===&lt;br /&gt;
* Versions news&lt;br /&gt;
* (2012-06) Android 4.1 (Jelly Bean) announced in June, shipped in July&lt;br /&gt;
* (2012-11) Android 4.2 (Jelly Bean update?) announced and shipped&lt;br /&gt;
** See http://en.wikipedia.org/wiki/Android_version_history&lt;br /&gt;
&lt;br /&gt;
* (2012-12) Market share:&lt;br /&gt;
** prediction from August that in 2014, installed base of Android will exceed that of all windows platforms (phone, PC and tablet) counted together. (wow!)&lt;br /&gt;
*** see http://communities-dominate.blogs.com/brands/2012/08/smartphone-market-shares-q2-full-numbers-samsung-and-android-solidifying-their-leads.html&lt;br /&gt;
&lt;br /&gt;
* Tablets&lt;br /&gt;
** Some nice tablets based on 3.0 are coming out (will move to Android 3.1 over summer)&lt;br /&gt;
* phone activations? (350,000 per day, as of April 8, 2011)&lt;br /&gt;
* GoogleTV&lt;br /&gt;
** Every device will have 3.1 and adb, which means every device can be used for development&lt;br /&gt;
** will have market&lt;br /&gt;
** good talks at Google I/O about app and web development for TVs&lt;br /&gt;
&lt;br /&gt;
* non-Android support for Android apps:&lt;br /&gt;
** Dalvik ported to Meego - myriad Group AG announced Myriad Alien Dalvik, for running Android apps on other Linux platforms&lt;br /&gt;
*** See http://www.linuxfordevices.com/c/a/News/Myriad-Group-Myriad-Alien-Dalvik/?kc=LNXDEVNL020911&lt;br /&gt;
** IcedRobot implementation of Android (using OpenJDK)&lt;br /&gt;
** BlueStack to run Android apps on Windows&lt;br /&gt;
*** see http://www.linuxfordevices.com/c/a/News/BlueStacks/?kc=LNXDEVNL052611&lt;br /&gt;
&lt;br /&gt;
=== Unbuntu TV ===&lt;br /&gt;
* see http://www.ubuntu.com/tv&lt;br /&gt;
* announced at CES 2012 - http://blog.canonical.com/2012/01/09/canonical-to-showcase-ubuntu-tv-at-ces/&lt;br /&gt;
&lt;br /&gt;
== CPU support ==&lt;br /&gt;
* ARM architecture issues over past year&lt;br /&gt;
** First, there was the&lt;br /&gt;
** [http://lwn.net/Articles/437162/ ARM Wrestling] LWN.net article on ARM issues&lt;br /&gt;
** Linaro working on methods to upstream code from vendors&lt;br /&gt;
** device tree for ARM status:&lt;br /&gt;
*** Grant's tree is included in linux-next&lt;br /&gt;
*** See http://groups.google.com/group/linux.kernel/browse_thread/thread/d084d006ad2212c6/06ebf8c4ad4a7b27?lnk=raot&lt;br /&gt;
*** ATAG deprecation - it can now be configured off, see http://lists.infradead.org/pipermail/linux-arm-kernel/2012-August/116699.html&lt;br /&gt;
&lt;br /&gt;
=== Chip vendor news ===&lt;br /&gt;
* Texas Instruments leaves mobile and tablet market&lt;br /&gt;
** November 2012, announces layoffs of 1700, drops future OMAP lines&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
* unlockable bootloaders&lt;br /&gt;
** Announced by Motorola and Sony/Ericsson&lt;br /&gt;
** can unlock bootloader to install custom firmward&lt;br /&gt;
** wipes the phone to remove DRM-protected content&lt;br /&gt;
** Motorola says you can re-lock by going back to a vendor-supplied image&lt;br /&gt;
* version update support&lt;br /&gt;
** Announced at Google I/O&lt;br /&gt;
** multiple partners agree to provide version updates at regular intervals&lt;br /&gt;
&lt;br /&gt;
== Industry organizations or projects ==&lt;br /&gt;
* [[LiMo]] - anything happening?&lt;br /&gt;
* CELF =&amp;gt; CEWG under Linux Foundation&lt;br /&gt;
** CELF projects&lt;br /&gt;
* Linux Foundation&lt;br /&gt;
** Lots of stuff going on in embedded:&lt;br /&gt;
*** Yocto&lt;br /&gt;
*** Meego&lt;br /&gt;
*** CE Working Group&lt;br /&gt;
* Linaro - 1 year in&lt;br /&gt;
** see David Rusling's presentation from ELC&lt;br /&gt;
&lt;br /&gt;
== Trends ==&lt;br /&gt;
* movement to eclipse (both Yocto and Android support eclipse plugins for tools)&lt;br /&gt;
* movement to emulators&lt;br /&gt;
* application portability&lt;br /&gt;
** Android apps will be able to run just about anywhere&lt;br /&gt;
** Will an IOS emulator appear, or will apple strangle any attempts&lt;br /&gt;
* application stores&lt;br /&gt;
** multiple app stores will create competition (good)&lt;br /&gt;
* more open platforms&lt;br /&gt;
** Google TV&lt;br /&gt;
* lots of stuff that no one expects will appear&lt;br /&gt;
&lt;br /&gt;
* development trends:&lt;br /&gt;
** new tools??&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* lwn.net&lt;br /&gt;
* elinux.org&lt;br /&gt;
* stackoverflow.com&lt;br /&gt;
* kernelnewbies&lt;br /&gt;
* linuxfordevices.com&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Debugging_by_printing</id>
		<title>Debugging by printing</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Debugging_by_printing"/>
				<updated>2013-03-21T21:39:39Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Printk from userspace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Probably the simplest way to get some debug information from your kernel code is by printing out various information with the kernel's equivalent of printf - the printk function and its derivatives.&lt;br /&gt;
The k in printk is used to specifically remind kernel developers that the environment is different. &lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
printk works more or less the same way as printf in userspace, so if you ever debugged your userspace program using printf, you are ready to do the same with your kernel code, e.g. by adding:&lt;br /&gt;
 printk(&amp;quot;My Debugger is Printk\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This wasn't that difficult, was it?&lt;br /&gt;
&lt;br /&gt;
Usually you would print out some more interesting information like&lt;br /&gt;
 printk(&amp;quot;Var1 %d var2 %d\n&amp;quot;, var1, var2);&lt;br /&gt;
just like in userspace.&lt;br /&gt;
&lt;br /&gt;
In order to see the kernel messages, just use the&lt;br /&gt;
 $ dmesg&lt;br /&gt;
command in one of your shells - this one will print out the whole kernel log&lt;br /&gt;
buffer to you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most of the conversion specifiers supported by the user-space library routine printf() are also available in the kernel; there are some notable additions, including &amp;quot;%pf&amp;quot;, which will print the symbol name in place of the numeric pointer value, if available.&lt;br /&gt;
&lt;br /&gt;
The supported format strings are quite extensively documented in&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/printk-formats.txt;hb=HEAD Documentation/printk-formats.txt]&lt;br /&gt;
&lt;br /&gt;
However please '''note''': always use ''%zu'', ''%zd'' or ''%zx'' for printing&lt;br /&gt;
''size_t'' and ''ssize_t'' values. ssize_t and size_t are quite common values in the kernel, so&lt;br /&gt;
please use the ''%z'' to avoid annoying compile warnings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Author's practical advice:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to debug an oops (e.g caused by releasing a resource twice) in your driver and you don't have a clue where the oops happens, simply add this line&lt;br /&gt;
 printk(KERN_ALERT &amp;quot;DEBUG: Passed %s %d \n&amp;quot;,__FUNCTION__,__LINE__);&lt;br /&gt;
after each possibly offending statement.&lt;br /&gt;
Recompile and (re-)load the module and trigger the error condition - your log now shows you the last line that was successfully executed before the oops happened.&lt;br /&gt;
&lt;br /&gt;
Of course you should '''remove''' these 'rude' statements before shipping your module ;)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Log Levels ==&lt;br /&gt;
If you look into real kernel code you will always see something like:&lt;br /&gt;
 printk(KERN_ERR &amp;quot;something went wrong, return code: %d\n&amp;quot;,ret);&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;''KERN_ERR''&amp;quot; is one of the eight different log levels defined in&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/linux/printk.h;hb=HEAD include/linux/printk.h] and specifes the severity of the error message.&lt;br /&gt;
&lt;br /&gt;
Note that there is '''NO''' comma between the ''KERN_ERR'' and the format string (as the preprocessor concatenates both strings)&lt;br /&gt;
&lt;br /&gt;
The log levels are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Name&lt;br /&gt;
!String&lt;br /&gt;
!Meaning&lt;br /&gt;
!alias function&lt;br /&gt;
|-&lt;br /&gt;
|KERN_EMERG&lt;br /&gt;
|&amp;quot;&amp;lt;0&amp;gt;&amp;quot;&lt;br /&gt;
|Emergency messages, system is about to crash or is unstable&lt;br /&gt;
|pr_emerg&lt;br /&gt;
|-&lt;br /&gt;
|KERN_ALERT&lt;br /&gt;
|&amp;quot;&amp;lt;1&amp;gt;&amp;quot;&lt;br /&gt;
|Something bad happened and action must be taken immediately&lt;br /&gt;
|pr_alert&lt;br /&gt;
|-&lt;br /&gt;
|KERN_CRIT&lt;br /&gt;
|&amp;quot;&amp;lt;2&amp;gt;&amp;quot;&lt;br /&gt;
|A critical condition occurred like a serious hardware/software failure&lt;br /&gt;
|pr_crit&lt;br /&gt;
|-&lt;br /&gt;
|KERN_ERR&lt;br /&gt;
| &amp;quot;&amp;lt;3&amp;gt;&amp;quot;&lt;br /&gt;
|An error condition, often used by drivers to indicate difficulties with the hardware&lt;br /&gt;
|pr_err&lt;br /&gt;
|-&lt;br /&gt;
|KERN_WARNING&lt;br /&gt;
|&amp;quot;&amp;lt;4&amp;gt;&amp;quot;&lt;br /&gt;
|A warning, meaning nothing serious by itself but might indicate problems&lt;br /&gt;
|pr_warning&lt;br /&gt;
|-&lt;br /&gt;
|KERN_NOTICE&lt;br /&gt;
|&amp;quot;&amp;lt;5&amp;gt;&amp;quot;&lt;br /&gt;
|Nothing serious, but notably nevertheless. Often used to report security events.&lt;br /&gt;
|pr_notice&lt;br /&gt;
|-&lt;br /&gt;
|KERN_INFO&lt;br /&gt;
|&amp;quot;&amp;lt;6&amp;gt;&amp;quot;&lt;br /&gt;
|Informational message e.g. startup information at driver initialization&lt;br /&gt;
|pr_info&lt;br /&gt;
|-&lt;br /&gt;
|KERN_DEBUG&lt;br /&gt;
|&amp;quot;&amp;lt;7&amp;gt;&amp;quot;&lt;br /&gt;
|Debug messages&lt;br /&gt;
|pr_debug, pr_devel if DEBUG is defined&lt;br /&gt;
|-&lt;br /&gt;
|KERN_CONT&lt;br /&gt;
|&amp;quot;&amp;lt;c&amp;gt;&amp;quot;&lt;br /&gt;
|&amp;quot;continued&amp;quot; line of log printout (only done after a line that had no enclosing \n) [http://lwn.net/Articles/252651/]&lt;br /&gt;
|pr_cont&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pr_* macros (with exception of pr_debug) are simple shorthand definitions&lt;br /&gt;
in ''include/linux/printk.h''&lt;br /&gt;
for their respective printk call and should probably be used in newer drivers.&lt;br /&gt;
&lt;br /&gt;
''pr_devel'' and ''pr_debug'' are replaced with ''printk(KERN_DEBUG ...'' if the kernel was&lt;br /&gt;
compiled with ''DEBUG'', otherwise replaced with an empty statement.&lt;br /&gt;
&lt;br /&gt;
For drivers the pr_debug should not be used anymore (use dev_dbg instead).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don't specify a log level in your message it defaults to&lt;br /&gt;
''DEFAULT_MESSAGE_LOGLEVEL'' (usually ''&amp;quot;&amp;lt;4&amp;gt;&amp;quot;''=''KERN_WARNING'')&lt;br /&gt;
which can be set via the ''CONFIG_DEFAULT_MESSAGE_LOGLEVEL'' kernel config&lt;br /&gt;
option (''make menuconfig-&amp;gt; Kernel Hacking -&amp;gt; Default message log level'')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The log level is used by the kernel to determine the importance of&lt;br /&gt;
a message and to decide whether it should be presented to the user&lt;br /&gt;
immediately, by printing it to the current console (where console could also&lt;br /&gt;
be a serial line or even a printer, not an xterm).&lt;br /&gt;
&lt;br /&gt;
For this the kernel compares the log level of the message to the&lt;br /&gt;
''console_loglevel'' (a kernel variable) and if the priority is higher (i.e. a&lt;br /&gt;
lower value) than the ''console_loglevel'' the message will be printed to the current console.&lt;br /&gt;
&lt;br /&gt;
To determine your current ''console_loglevel'' you simply enter:&lt;br /&gt;
 $ cat /proc/sys/kernel/printk&lt;br /&gt;
 	7       4       1       7&lt;br /&gt;
 	current	default	minimum	boot-time-default&lt;br /&gt;
&lt;br /&gt;
The first integer shows you your current console_loglevel; the second the&lt;br /&gt;
default log level that you have seen above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change your current console_loglevel simply write to this file, so in order&lt;br /&gt;
to get all messages printed to the console do a simple&lt;br /&gt;
 # echo 8 &amp;gt; /proc/sys/kernel/printk&lt;br /&gt;
and every kernel message will appear on your console.&lt;br /&gt;
&lt;br /&gt;
Another way to change the console log level is to use ''dmesg'' with the ''-n''&lt;br /&gt;
parameter&lt;br /&gt;
 # #set console_loglevel to print KERN_WARNING (4) or more severe messages&lt;br /&gt;
 # dmesg -n 5&lt;br /&gt;
Only messages with a value lower ('''not''' lower equal) than the&lt;br /&gt;
console_loglevel will be printed.&lt;br /&gt;
&lt;br /&gt;
You can also specify the console_loglevel at boot time using the ''loglevel''&lt;br /&gt;
boot parameter. (see&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/kernel-parameters.txt;hb=HEAD#l1334 Documentation/kernel-parameters.txt] for more details)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Author's practical advice:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Of course you should always specify an appropriate log level for your messages,&lt;br /&gt;
but for '''debugging''', I guess most developers leave the&lt;br /&gt;
console_loglevel unchanged and simply use KERN_ERR or KERN_CRIT to ensure the message reaches the console.&lt;br /&gt;
&lt;br /&gt;
 pr_err(&amp;quot;REMOVE ME: my debug statement that I swear to remove when I'm done\&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Please make sure to remove these 'inappropriately' tagged messages before&lt;br /&gt;
shipping the module ;)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''KERN_CONT'' and ''pr_cont'' are special cases since they do not specify an urgency but rather indicate a 'continued message' e.g.:&lt;br /&gt;
 printk(KERN_ERR &amp;quot;Doing something was &amp;quot;);&lt;br /&gt;
 /* &amp;lt;100 lines of whatever&amp;gt;*/&lt;br /&gt;
 if (success)&lt;br /&gt;
    printk(KERN_CONT &amp;quot;successful\n&amp;quot;);&lt;br /&gt;
 else&lt;br /&gt;
    printk(KERN_CONT &amp;quot;NOT successful\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 -&amp;gt; &amp;quot;Doing something was successful&amp;quot;&lt;br /&gt;
'''Important Note:''' ''KERN_CONT'' and ''pr_cont'' should only be used by core/arch code during early bootup (a continued line is not SMP-safe otherwise).[http://lwn.net/Articles/252651/]&lt;br /&gt;
&lt;br /&gt;
== Rate limiting and one time messages ==&lt;br /&gt;
Occasionally you have to insert a message in a section which gets called&lt;br /&gt;
quite often. This not only might have a severe performance impact, it also&lt;br /&gt;
could overwrite and spam your kernel buffer so it should be avoided.&lt;br /&gt;
&lt;br /&gt;
As always the kernel already provides you with nice functions that solve your&lt;br /&gt;
problems:&lt;br /&gt;
 printk_ratelimited(...)&lt;br /&gt;
and&lt;br /&gt;
 printk_once(...)&lt;br /&gt;
&lt;br /&gt;
''printk_once'' is fairly trivial - no matter how often you call it, it prints once and never again.&lt;br /&gt;
&lt;br /&gt;
''printk_ratelimited'' is a little bit more complicated - it prints by default not more than 10&lt;br /&gt;
times in every 5 seconds (for each function it is called in).&lt;br /&gt;
&lt;br /&gt;
If you need other values for the maximum burst count and the timeout, you can&lt;br /&gt;
always setup your own ratelimit using the ''DEFINE_RATELIMIT_STATE'' macro and&lt;br /&gt;
the ''__ratelimit'' function - see the implementation of&lt;br /&gt;
''printk_ratelimited'' for an example.&lt;br /&gt;
&lt;br /&gt;
Be sure to ''#include &amp;lt;kernel/ratelimit.h&amp;gt;'' in order to use&lt;br /&gt;
''printk_ratelimited()''&lt;br /&gt;
&lt;br /&gt;
Both functions have also their ''pr_*'' equivalents like&lt;br /&gt;
''pr_info_ratelimited'' for ''printk_ratelimited(KERN_INFO...'' and&lt;br /&gt;
''pr_crit_once'' for ''printk_once(KERN_CRIT...''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note: both did not work as expected in my tests here, will probably investigate further'''&lt;br /&gt;
&lt;br /&gt;
== Printk from userspace ==&lt;br /&gt;
Sometimes, especially when doing automated testing, it is quite useful to&lt;br /&gt;
insert some messages in the kernel log buffer in order to annotate what's&lt;br /&gt;
going on.&lt;br /&gt;
&lt;br /&gt;
It is as simple as&lt;br /&gt;
 # echo &amp;quot;Hello Kernel-World&amp;quot; &amp;gt; /dev/kmsg&lt;br /&gt;
&lt;br /&gt;
Of course this messages gets the default log level assigned, if you want e.g.&lt;br /&gt;
to issue a KERN_CRIT message you have to use the string representation of the&lt;br /&gt;
log level - in this case &amp;quot;&amp;lt;2&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;&amp;lt;2&amp;gt;Writing critical printk messages from userspace&amp;quot; &amp;gt;/dev/kmsg&lt;br /&gt;
&lt;br /&gt;
The message will appear like any other '''kernel''' message - there is '''no way''' to distinguish them!&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Don't confuse this with printf - we are printing a kernel message&lt;br /&gt;
from userspace here.&lt;br /&gt;
&lt;br /&gt;
If /dev/kmsg does not exist, it can be created with:&lt;br /&gt;
'mknod -m 600 /dev/kmsg c 1 11'&lt;br /&gt;
&lt;br /&gt;
== Internals / Changing the size of the printk buffer ==&lt;br /&gt;
Printk is implemented by using a ring buffer in the kernel with a size of&lt;br /&gt;
''__LOG_BUF_LEN'' bytes where ''__LOG_BUF_LEN'' equals ''(1 &amp;lt;&amp;lt;&lt;br /&gt;
CONFIG_LOG_BUF_SHIFT)'' (see&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=kernel/printk.c;hb=HEAD kernel/printk.c] for details).&lt;br /&gt;
&lt;br /&gt;
You can specify the size of the buffer in your kernel config by setting&lt;br /&gt;
''CONFIG_LOG_BUF_SHIFT'' to an appropriate value (e.g. 17 for 128Kb) (''make menuconfig -&amp;gt; General Setup -&amp;gt; Kernel log buffer size'').&lt;br /&gt;
&lt;br /&gt;
Using a ring buffer implies that older messages get overwritten once the&lt;br /&gt;
buffer fills up, but this is only a minor drawback compared to the robustness of this&lt;br /&gt;
solution (i.e. minimum memory footprint, callable from every context, not many&lt;br /&gt;
resources wasted if nobody reads the buffer, no filling up of disk space/ram when some kernel process goes&lt;br /&gt;
wild and spams the buffer, ...).&lt;br /&gt;
Using a reasonably large buffer size should give you enough time to read your&lt;br /&gt;
important messages before they are overwritten.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' dmesg reads by default a buffer of max 16392 bytes, so if you use a larger logbuffer you have to invoke dmesg with the ''-s'' parameter e.g.:&lt;br /&gt;
 ### CONFIG_LOG_BUF_SHIFT 17 = 128k&lt;br /&gt;
 $ dmesg -s 128000&lt;br /&gt;
&lt;br /&gt;
The kernel log buffer is accessible for reading from userspace by ''/proc/kmsg''.&lt;br /&gt;
''/proc/kmsg'' behaves more or less like a FIFO and blocks until new messages&lt;br /&gt;
appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Please note''' - reading from ''/proc/kmsg'' consumes the messages in the&lt;br /&gt;
ring buffer so they may not be available for other programs. It is usually a&lt;br /&gt;
good idea to let ''klogd'' or ''syslog'' do this job and read the content&lt;br /&gt;
of the buffer via ''dmesg''.&lt;br /&gt;
&lt;br /&gt;
== Pros and Cons==&lt;br /&gt;
The main advantage of printk over other debugging solutions is that it requires no sophisticated setup and can be called anywhere from any time.&lt;br /&gt;
Printk can be called while holding a lock, from interrupt and process context, is SMP safe and does not need any special preparation. It is just there and just works.&lt;br /&gt;
The only precondition is that you have some kind of working console to display the messages.&lt;br /&gt;
&lt;br /&gt;
For the early stages in the boot process, where no console is available yet,&lt;br /&gt;
there is a special function named ''early_printk'', this function writes&lt;br /&gt;
directly to the VGA buffer or a serial line but otherwise works just like&lt;br /&gt;
printk -- you have to enable this function by setting ''CONFIG_EARLY_PRINTK''&lt;br /&gt;
in your kernel config (''make menuconfig -&amp;gt; Kernel Hacking -&amp;gt; Early printk'').&lt;br /&gt;
&lt;br /&gt;
The major drawback is that printk is quite static, so you have to figure out what you want to trace beforehand and if you want to trace something different you have to recompile your code - which can become quite cumbersome. (And of course printk is not interactive at all, so you can't modify any variables or the like.)&lt;br /&gt;
&lt;br /&gt;
The other drawback is that printing usually consumes quite some processing power and io time, so if you're trying to debug a timing critical section or a timing bug, you're probably out of luck.&lt;br /&gt;
&lt;br /&gt;
== Debugging early boot problems ==&lt;br /&gt;
=== Accessing the printk buffer after a silent hang on boot ===&lt;br /&gt;
Sometimes, if the kernel hangs early in the boot process, you get no messages on the console before the hang.  However, there may still be messages in the printk buffer, which can give you an idea of where the problem is.&lt;br /&gt;
&lt;br /&gt;
The kernel starts putting messages into the printk buffer as soon as it starts.  They stay buffered there until the console code has a chance to initialize the console device (often the serial port for embedded devices).  Even though these messages are not printed before the hang, it is still possible in some circumstances&lt;br /&gt;
to dump the printk buffer and see the messages.&lt;br /&gt;
&lt;br /&gt;
The tricky parts of doing this are:&lt;br /&gt;
&lt;br /&gt;
# using a warm reset (if possible) so the memory contents are not lost when transitioning from the stuck kernel to the bootloader.  You ''can'' do a cold boot, but if the memory is left unpowered for very long, you will start to see memory corruption.&lt;br /&gt;
# figuring out the address to use in the bootloader, based on the address of __log_buf in System.map.  You will probably need to subtract the value of CONFIG_PAGE_OFFSET from the __log_buf address.  However, there may be other offsets present as well (such as TEXT_OFFSET).  Sometimes you can find the buffer by dumping the memory in a suspected area and locating the kernel messages visually in the dump.  Note that the mapping offset between the kernel map of memory and the bootloader map of memory should not change.  So once you figure it out you are set.&lt;br /&gt;
&lt;br /&gt;
Quinn Jensen writes:&lt;br /&gt;
&lt;br /&gt;
Something I've found handy when the console is silent is to dump the printk buffer from the boot loader.  To do it you have to know how your boot loader maps memory compared to the kernel.&lt;br /&gt;
&lt;br /&gt;
==== Redboot example on a Freescale ADS board ====&lt;br /&gt;
Quinn says: Here's what I do with Redboot on i.MX31:&lt;br /&gt;
&lt;br /&gt;
 fgrep printk_buf System.map&lt;br /&gt;
&lt;br /&gt;
this shows the linked address of the printk_buf, e.g.:&lt;br /&gt;
&lt;br /&gt;
 c02338f0 b printk_buf.16194&lt;br /&gt;
&lt;br /&gt;
The address &amp;quot;c02338f0&amp;quot; is in kernel virtual, which, in the case of i.MX31 ADS, redboot will have mapped to 0x802338f0.  So, after resetting the target board, but without letting it try to boot again, at the redboot prompt:&lt;br /&gt;
&lt;br /&gt;
 dump -b 0x802338f0 -l 10000&lt;br /&gt;
&lt;br /&gt;
And you see the printk buffer that never got flushed to the UART.  Knowing what's there can be '''very''' useful in debugging your console.&lt;br /&gt;
&lt;br /&gt;
==== U-boot example on an OMAP OSK board ====&lt;br /&gt;
Tim Bird tried these steps and they worked:&lt;br /&gt;
&lt;br /&gt;
 grep __log_buf System.map&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 grep __log_buf /proc/kallsyms&lt;br /&gt;
&lt;br /&gt;
These show:&lt;br /&gt;
&lt;br /&gt;
 c0352d88 B __log_buf&lt;br /&gt;
&lt;br /&gt;
In the case of the OSK, this address maps to 0x10352d88.  So I reset the target board and use the following:&lt;br /&gt;
&lt;br /&gt;
 OMAP5912 OSK # md 10352d88&lt;br /&gt;
 10352d88: 4c3e353c 78756e69 72657620 6e6f6973    &amp;lt;5&amp;gt;Linux version&lt;br /&gt;
 10352d98: 362e3220 2e32322e 612d3631 6e5f706c     2.6.22.16-alp_n&lt;br /&gt;
 10352da8: 7428206c 64726962 6d697440 6b736564    l (tbird@timdesk&lt;br /&gt;
 10352db8: 2e6d612e 796e6f73 6d6f632e 67282029    .am.sony.com) (g&lt;br /&gt;
 10352dc8: 76206363 69737265 33206e6f 342e342e    cc version 3.4.4&lt;br /&gt;
 10352dd8: 34232029 45525020 54504d45 65755420    ) #4 PREEMPT Tue&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
==== Grub ====&lt;br /&gt;
Grub also supports a dump command which you can invoke from the grub prompt.&lt;br /&gt;
 dump  [ -s offset ] [-n length] { FILE | (mem) }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using CONFIG_DEBUG_LL and printascii() (ARM only) ===&lt;br /&gt;
If the kernel fails before the serial console is enabled, you can use CONFIG_DEBUG_LL to add extra debug output routines to the kernel.  These are printascii, printch and printhex. These routines print directly to the serial port, bypassing the console code, and are available earlier in machine initialization.&lt;br /&gt;
&lt;br /&gt;
To see printks earlier in the boot sequence (before the console is initialized), set CONFIG_DEBUG_LL=y&lt;br /&gt;
and CONFIG_EARLY_PRINTK=y.&lt;br /&gt;
&lt;br /&gt;
Alternatively, add your own calls to printascii, printch, and printhex where you believe the problems&lt;br /&gt;
are located.&lt;br /&gt;
&lt;br /&gt;
Here is an e-mail exchange seen on the linux-embedded mailing list (with answer by George Davis):[http://www.mail-archive.com/linux-embedded@vger.kernel.org/msg00223.html] &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; When we try to boot a 2.6.21 kernel after uncompressing the kernel the boot process dies somehow.&lt;br /&gt;
&amp;gt; We've figured out so far that the kernel dies somewhere between the gunzip and start_kernel.&lt;br /&gt;
&lt;br /&gt;
Try enabling DEBUG_LL to see if it's an machine ID error.  If you see:&lt;br /&gt;
&lt;br /&gt;
Error: unrecognized/unsupported processor variant.&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
&lt;br /&gt;
Error: unrecognized/unsupported machine ID...&lt;br /&gt;
&lt;br /&gt;
Then you either don't have proper processor support enabled for your target or your bootloader is passing in the wrong machine number.&lt;br /&gt;
&lt;br /&gt;
If you still don't see anything, try hacking printk.c to call printascii() (enabled for the DEBUG_LL case) to print directly to the serial port w/o a driver, etc.,.  You can find more details on these low-level debugging hacks via a little googling...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NetConsole ==&lt;br /&gt;
Sometimes you are in the unlucky situation that the machine crashes or hangs and you have no way to access the console afterwards, e.g. the graphic driver hangs and and the kernel dies soon after.&lt;br /&gt;
In this case you could either hook up a serial line to your crashing target machine (if a serial port is available) or use the kernels netconsole feature to enable printk logging via UDP.&lt;br /&gt;
&lt;br /&gt;
In order to use it you have to enable the ''CONFIG_NETCONSOLE'' kernel config&lt;br /&gt;
option (''make menuconfig -&amp;gt; Device Drivers -&amp;gt; Network device support -&amp;gt; Network core driver support -&amp;gt; Network console logging support'') and&lt;br /&gt;
configure it appropriately by using the ''netconsole'' configuration parameter&lt;br /&gt;
&lt;br /&gt;
 netconsole=[src-port]@[src-ip]/[&amp;lt;dev&amp;gt;],[tgt-port]@&amp;lt;tgt-ip&amp;gt;/[tgt-macaddr]&lt;br /&gt;
 	where&lt;br /&gt;
 		src-port      source for UDP packets (defaults to 6665)&lt;br /&gt;
 		src-ip        source IP to use (interface address)&lt;br /&gt;
 		dev           network interface (eth0)&lt;br /&gt;
 		tgt-port      port for logging agent (6666)&lt;br /&gt;
 		tgt-ip        IP address for logging agent&lt;br /&gt;
 		tgt-macaddr   ethernet MAC address for logging agent (broadcast)&lt;br /&gt;
&lt;br /&gt;
e.g. specify at kernel commandline (in your bootloader)&lt;br /&gt;
 linux netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc&lt;br /&gt;
to send messages from 10.0.0.1 port 4444 via eth1 to 10.0.0.2 port 9353 with the MAC 12:34:56:78:9a:bc&lt;br /&gt;
&lt;br /&gt;
or while loading the module e.g&lt;br /&gt;
 # insmod netconsole netconsole=@/,@10.0.0.2/&lt;br /&gt;
to send messages via broadcast to 10.0.0.2 port 6666&lt;br /&gt;
&lt;br /&gt;
On the other machine you can now simply fire up&lt;br /&gt;
 # netcat -u -l -p &amp;lt;port&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
 $ netcat -u -l -p 6666&lt;br /&gt;
and see the printk messages from your target dribbling in.&lt;br /&gt;
&lt;br /&gt;
If you don't see any messages you might have to set the console_loglevel to a&lt;br /&gt;
higher value (see above) or test the connection via telnet e.g. from the target type&lt;br /&gt;
 $ telnet 10.0.0.2 6666&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Netconsole resources ===&lt;br /&gt;
See&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/networking/netconsole.txt;hb=HEAD Documentation/networking/netconsole.txt]&lt;br /&gt;
for more details.&lt;br /&gt;
&lt;br /&gt;
See [http://sarah.thesharps.us/2009-02-22-09-00 Sarah Sharp's blog entry about using netconsole]&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
=== Dmesg / Clearing the buffer ===&lt;br /&gt;
 dmesg -c&lt;br /&gt;
clears the dmesg buffer.&lt;br /&gt;
Sometimes it is nice to start with a blank buffer, so you will only see new&lt;br /&gt;
messages when you invoke ''dmesg''&lt;br /&gt;
&lt;br /&gt;
=== Printk Timestamps ===&lt;br /&gt;
 CONFIG_PRINTK_TIMES&lt;br /&gt;
Setting this kernel config option prepends every printk statement with a&lt;br /&gt;
timestamp representing the time since boot. This is particularly useful to get&lt;br /&gt;
a general idea about the timings of your code.&lt;br /&gt;
&lt;br /&gt;
You can also specify an argument on the kernel command line to enable this, or&lt;br /&gt;
you can enable it any time at runtime by doing the following:&lt;br /&gt;
&lt;br /&gt;
  $echo 1 &amp;gt;/sys/module/printk/parameters/time&lt;br /&gt;
&lt;br /&gt;
Also, there are tools available to use the information to show relative times&lt;br /&gt;
between printks (scripts/show_delta) and create graphs of durations in the&lt;br /&gt;
kernel (scripts/bootgraph.pl)&lt;br /&gt;
&lt;br /&gt;
See [[Printk Times]] for more details&lt;br /&gt;
&lt;br /&gt;
=== Printing buffers as hex ===&lt;br /&gt;
If you want to print a buffer as hex within the kernel, don't reinvent the&lt;br /&gt;
wheel use ''printk_hex_dump_bytes()'' instead.&lt;br /&gt;
&lt;br /&gt;
 print_hex_dump_bytes(const char *prefix_str, int prefix_type, const void *buf, size_t len)&lt;br /&gt;
this function prints a buffer as hex values to the kernel log buffer (with level KERN_DEBUG)&lt;br /&gt;
Example:&lt;br /&gt;
 Kernel Code:&lt;br /&gt;
 char mybuf[] = &amp;quot;abcdef&amp;quot;;&lt;br /&gt;
 print_hex_dump_bytes(&amp;quot;&amp;quot;, DUMP_PREFIX_NONE, mybuf, ARRAY_SIZE(mybuf));&lt;br /&gt;
&lt;br /&gt;
 dmesg output:&lt;br /&gt;
 61 62 63 64 65 66 00                             abcdef.&lt;br /&gt;
&lt;br /&gt;
If you need something more sophisticated and flexible maybe have a look at&lt;br /&gt;
''print_hex_dump()'' and ''hex_dump_to_buffer()''&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Debugging ===&lt;br /&gt;
It is also possible to enable/disable debug information at runtime using the&lt;br /&gt;
dynamic debug functionality of the kernel.&lt;br /&gt;
For this the ''CONFIG_DYNAMIC_DEBUG'' kernel config option must be set.&lt;br /&gt;
See&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/dynamic-debug-howto.txt;hb=HEAD Documentation/dynamic-debug-howto.txt] for more information.&lt;br /&gt;
&lt;br /&gt;
== Disabling printk messages at compile time ==&lt;br /&gt;
There is a configuration option which allows you to turn off all the printk messages in the&lt;br /&gt;
whole kernel (''CONFIG_PRINTK'').  This reduces the size the kernel, usually by at least 100k, &lt;br /&gt;
since all message strings are not compiled into the kernel binary image.  &lt;br /&gt;
&lt;br /&gt;
However, it also means you get absolutely no output from the kernel while it is running.  Disabling kernel&lt;br /&gt;
printk messages is usually the last thing you do when you are tuning your kernel for size.&lt;br /&gt;
&lt;br /&gt;
== References and external links ==&lt;br /&gt;
* [[Linux Kernel Development - by Robert Love|Linux Kernel Development]], Robert Love, 3rd Edition, Chapter 18 Debugging&lt;br /&gt;
* [[Linux Device Drivers]], Corbet, Rubini and Kroah-Hartmann, 3rd Edition, Chapter 4 Section 2&lt;br /&gt;
* [[Essential Linux Device Drivers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/printk-formats.txt;hb=HEAD Documentation/printk-formats.txt]&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/dynamic-debug-howto.txt;hb=HEAD Documentation/dynamic-debug-howto.txt]&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/networking/netconsole.txt;hb=HEAD Documentation/networking/netconsole.txt]&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=kernel/printk.c;hb=HEAD kernel/printk.c] Implementation of printk and others&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/linux/printk.h;hb=HEAD include/linux/printk.h] printk header file&lt;br /&gt;
* [http://www.embedded-bits.co.uk/2010/printk-format-specifiers/ Blog Entry about the different %p format specifiers]&lt;br /&gt;
* [http://lwn.net/Articles/487437/ LWN.net: The perils of pr_info()]&lt;br /&gt;
* [http://www.ibm.com/developerworks/linux/library/l-kernel-logging-apis/index.html Kernel logging: APIs and implementation, Tim Jones (for IBM)] (nice article)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some page related to printk:&lt;br /&gt;
* [[Printk Times]] - has information about how to turn on timestamps for each printk message&lt;br /&gt;
** [[Printk_Times_Sample_4| printk time stamps sample]]&lt;br /&gt;
* [[Printk_Size_Info|printk size information]]&lt;br /&gt;
* [[Do Printk]] - has information about a method of disabling printk messages on a per-module basis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development Tools]]&lt;br /&gt;
[[Category:Tips and Tricks]]&lt;br /&gt;
[[Category:Printk]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Ftrace</id>
		<title>Ftrace</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Ftrace"/>
				<updated>2013-03-21T18:28:42Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* find deepest kernel stack */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ftrace is the Linux kernel internal tracer that was included in the Linux kernel in 2.6.27.&lt;br /&gt;
Although Ftrace is named after the function tracer it also includes many more functionalities.&lt;br /&gt;
But the function tracer is the part of Ftrace that makes it unique as you can trace almost&lt;br /&gt;
any function in the kernel and with dynamic Ftrace, it has no overhead when not enabled.&lt;br /&gt;
&lt;br /&gt;
The interface for Ftrace resides in the debugfs file system in the tracing directory.&lt;br /&gt;
Documentation for this can be found in the Linux kernel source tree at&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/trace/ftrace.txt; Documentation/trace/ftrace.txt].&lt;br /&gt;
&lt;br /&gt;
== trace-cmd ==&lt;br /&gt;
&lt;br /&gt;
Using the Ftrace debugfs interface can be awkward and time consuming. trace-cmd was&lt;br /&gt;
created to interface with Ftrace using a binary tool which comes with full documentation&lt;br /&gt;
in man pages.&lt;br /&gt;
&lt;br /&gt;
Here's some examples of trace-cmd:&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd record -e sched myprogram&lt;br /&gt;
&lt;br /&gt;
The above will enable all the Ftrace tracepoints that are grouped under the sched&lt;br /&gt;
system. You can find these tracepoints by looking at the debugfs system:&lt;br /&gt;
&lt;br /&gt;
 # mount -t debugfs nodev /sys/kernel/debug&lt;br /&gt;
 # ls /sys/kernel/debug/tracing/events/sched&lt;br /&gt;
 enable                  sched_process_fork  sched_stat_sleep&lt;br /&gt;
 filter                  sched_process_free  sched_stat_wait&lt;br /&gt;
 sched_kthread_stop      sched_process_wait  sched_switch&lt;br /&gt;
 sched_kthread_stop_ret  sched_signal_send   sched_wait_task&lt;br /&gt;
 sched_migrate_task      sched_stat_iowait   sched_wakeup&lt;br /&gt;
 sched_process_exit      sched_stat_runtime  sched_wakeup_new&lt;br /&gt;
&lt;br /&gt;
trace-cmd allows you to see the possible events without needing to look at this directory&lt;br /&gt;
as well.&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd list -e | grep sched:&lt;br /&gt;
 sched:sched_kthread_stop&lt;br /&gt;
 sched:sched_kthread_stop_ret&lt;br /&gt;
 sched:sched_wait_task&lt;br /&gt;
 sched:sched_wakeup&lt;br /&gt;
 sched:sched_wakeup_new&lt;br /&gt;
 sched:sched_switch&lt;br /&gt;
 sched:sched_migrate_task&lt;br /&gt;
 sched:sched_process_free&lt;br /&gt;
 sched:sched_process_exit&lt;br /&gt;
 sched:sched_process_wait&lt;br /&gt;
 sched:sched_process_fork&lt;br /&gt;
 sched:sched_signal_send&lt;br /&gt;
 sched:sched_stat_wait&lt;br /&gt;
 sched:sched_stat_runtime&lt;br /&gt;
 sched:sched_stat_sleep&lt;br /&gt;
 sched:sched_stat_iowait&lt;br /&gt;
&lt;br /&gt;
You can find trace-cmd in its [http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary git]&lt;br /&gt;
repository.&lt;br /&gt;
&lt;br /&gt;
Also within that same repository is KernelShark, which is a graphical user interface to trace-cmd. trace-cmd&lt;br /&gt;
is built with just &amp;quot;make&amp;quot; and KernelShark is created with &amp;quot;make gui&amp;quot;. This allows building trace-cmd on&lt;br /&gt;
your embedded device and keeping the build from needing the GTK libraries required by KernelShark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
=== Tracing a specific process with the Ftrace interface ===&lt;br /&gt;
(Adapted from email by Steven Rostedt)&lt;br /&gt;
To trace just the kernel functions executed in the context of a particular function,&lt;br /&gt;
set the pseudo-variable 'set-ftrace-pid', to the process id (pid) of the process.&lt;br /&gt;
&lt;br /&gt;
If the process is not already running, you can use a wrapper shell script and the&lt;br /&gt;
'exec' command, to execute a command as a known pid.&lt;br /&gt;
&lt;br /&gt;
Like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
echo $$ &amp;gt; /debug/tracing/set_ftrace_pid&lt;br /&gt;
# can set other filtering here&lt;br /&gt;
echo function &amp;gt; /debug/tracing/current_tracer&lt;br /&gt;
exec $*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, '$$' is the pid of the currently executing process (the shell&lt;br /&gt;
script.  This is set into the 'set_ftrace_pid' variable, then the 'function'&lt;br /&gt;
tracer is enabled.  Then this script exec's the command (specified by the first&lt;br /&gt;
argument to the script).&lt;br /&gt;
&lt;br /&gt;
Example usage (assuming script is called 'trace_command'):&lt;br /&gt;
 trace_command ls&lt;br /&gt;
&lt;br /&gt;
=== Tracing a specific process with trace-cmd ===&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd record -p function -F ls&lt;br /&gt;
&lt;br /&gt;
=== Capturing an oops (from startup) to the serial console ===&lt;br /&gt;
You can capture the function calls leading up to a panic&lt;br /&gt;
by placing the following on the kernel command line:&lt;br /&gt;
&lt;br /&gt;
 ftrace=function ftrace_dump_on_oops&lt;br /&gt;
&lt;br /&gt;
''Note: You can also use 'ftrace=function_graph' if you would prefer that instead.''&lt;br /&gt;
&lt;br /&gt;
The ftrace documentation, in Documentation/trace/ftrace.txt mentions how to set&lt;br /&gt;
ftrace_dump_on_oops in a running system, but I have found it very handy to have&lt;br /&gt;
it configured to dump the trace from kernel startup, so that any panics that occur&lt;br /&gt;
during boot (before user-space is started) are also captured.&lt;br /&gt;
&lt;br /&gt;
Note that the output will be VERY long.  Please be patient.&lt;br /&gt;
&lt;br /&gt;
The output will look something like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     ash-56      0d..2. 159400967us : _raw_spin_lock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..2. 159400972us : __raw_spin_lock &amp;lt;-_raw_spin_lock&lt;br /&gt;
     ash-56      0d..2. 159400974us : add_preempt_count &amp;lt;-__raw_spin_lock&lt;br /&gt;
     ash-56      0d..3. 159400978us : log_prefix &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400979us : emit_log_char &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400981us : console_trylock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400983us : down_trylock &amp;lt;-console_trylock&lt;br /&gt;
     ash-56      0d..3. 159400985us : _raw_spin_lock_irqsave &amp;lt;-down_trylock&lt;br /&gt;
     ash-56      0d..3. 159400987us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159400989us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..4. 159400991us : _raw_spin_unlock_irqrestore &amp;lt;-down_trylock&lt;br /&gt;
     ash-56      0d..4. 159400993us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..3. 159400994us : _raw_spin_unlock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400997us : sub_preempt_count &amp;lt;-_raw_spin_unlock&lt;br /&gt;
     ash-56      0d..2. 159400999us : console_unlock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..2. 159401000us : _raw_spin_lock_irqsave &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401002us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..2. 159401004us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401006us : _raw_spin_unlock &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401008us : sub_preempt_count &amp;lt;-_raw_spin_unlock&lt;br /&gt;
     ash-56      0d..2. 159401010us : _call_console_drivers &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401012us : _call_console_drivers &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401014us : _raw_spin_lock_irqsave &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401015us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..2. 159401017us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401019us : up &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401021us : _raw_spin_lock_irqsave &amp;lt;-up&lt;br /&gt;
     ash-56      0d..3. 159401023us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401024us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..4. 159401027us : _raw_spin_unlock_irqrestore &amp;lt;-up&lt;br /&gt;
     ash-56      0d..4. 159401029us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..3. 159401031us : _raw_spin_unlock_irqrestore &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401033us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..2. 159401034us : wake_up_klogd &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401037us : sub_preempt_count &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..1. 159401039us : die &amp;lt;-__do_kernel_fault&lt;br /&gt;
     ash-56      0d..1. 159401041us : oops_enter &amp;lt;-die&lt;br /&gt;
---------------------------------&lt;br /&gt;
Modules linked in:&lt;br /&gt;
CPU: 0    Not tainted  (3.0.27_nl-kzm-a9-rt46-00022-g5e35327 #2)&lt;br /&gt;
PC is at sysrq_handle_crash+0x40/0x50&lt;br /&gt;
LR is at _raw_spin_unlock_irqrestore+0x34/0x54&lt;br /&gt;
pc : [&amp;lt;801b7dd4&amp;gt;]    lr : [&amp;lt;802f5420&amp;gt;]    psr: 60000093&lt;br /&gt;
sp : 9f0cdeb0  ip : 802f7ed4  fp : 9f0cdebc&lt;br /&gt;
r10: 9f0cdf68  r9 : 9fbaedc8  r8 : 00000000&lt;br /&gt;
r7 : 60000013  r6 : 00000063  r5 : 00000001  r4 : 8044b890&lt;br /&gt;
r3 : 00000000  r2 : 00000001  r1 : 20000093  r0 : 00000001&lt;br /&gt;
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user&lt;br /&gt;
Control: 10c5787d  Table: 5f11c04a  DAC: 00000015&lt;br /&gt;
Process ash (pid: 56, stack limit = 0x9f0cc2f0)&lt;br /&gt;
Stack: (0x9f0cdeb0 to 0x9f0ce000)&lt;br /&gt;
dea0:                                     9f0cdee4 9f0cdec0 801b85d0 801b7da0&lt;br /&gt;
dec0: 9f0cdf68 00000002 801b867c 9f07a960 00000002 2ad20000 9f0cdefc 9f0cdee8&lt;br /&gt;
dee0: 801b86b0 801b852c 9f0cdf68 9fbaed80 9f0cdf2c 9f0cdf00 80108a84 801b8688&lt;br /&gt;
df00: 9f0cdf68 00000002 9f07a960 2ad20000 9f0cdf68 2ad20000 00000001 00000000&lt;br /&gt;
df20: 9f0cdf5c 9f0cdf30 800c2f14 80108a00 00000002 00000889 800c4978 00000002&lt;br /&gt;
df40: 9f07a960 0005a750 00000002 2ad20000 9f0cdfa4 9f0cdf60 800c3250 800c2e5c&lt;br /&gt;
df60: 00020001 0004423c 00000000 00000000 9f0cc000 00000000 9f0cdfa4 00000002&lt;br /&gt;
df80: 2ad20000 0005a750 00000004 8000db24 9f0cc000 00000000 00000000 9f0cdfa8&lt;br /&gt;
dfa0: 8000d8c0 800c3208 00000002 2ad20000 00000001 2ad20000 00000002 00000889&lt;br /&gt;
dfc0: 00000002 2ad20000 0005a750 00000004 00000001 00000000 2ad093b8 7e8766d4&lt;br /&gt;
dfe0: 00000000 7e8766c0 2ac20f08 2ac023ec 40000010 00000001 00000000 00000000&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;801b7d94&amp;gt;] (sysrq_handle_crash+0x0/0x50) from [&amp;lt;801b85d0&amp;gt;] (__handle_sysrq+0xb0/0x15c)&lt;br /&gt;
[&amp;lt;801b8520&amp;gt;] (__handle_sysrq+0x0/0x15c) from [&amp;lt;801b86b0&amp;gt;] (write_sysrq_trigger+0x34/0x44)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:9f07a960 r5:801b867c r4:00000002&lt;br /&gt;
r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801b867c&amp;gt;] (write_sysrq_trigger+0x0/0x44) from [&amp;lt;80108a84&amp;gt;] (proc_reg_write+0x90/0xa4)&lt;br /&gt;
 r4:9fbaed80 r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801089f4&amp;gt;] (proc_reg_write+0x0/0xa4) from [&amp;lt;800c2f14&amp;gt;] (vfs_write+0xc4/0x150)&lt;br /&gt;
[&amp;lt;800c2e50&amp;gt;] (vfs_write+0x0/0x150) from [&amp;lt;800c3250&amp;gt;] (sys_write+0x54/0x110)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:0005a750 r5:9f07a960 r4:00000002&lt;br /&gt;
[&amp;lt;800c31fc&amp;gt;] (sys_write+0x0/0x110) from [&amp;lt;8000d8c0&amp;gt;] (ret_fast_syscall+0x0/0x30)&lt;br /&gt;
Code: 0a000000 e12fff33 e3a03000 e3a02001 (e5c32000)&lt;br /&gt;
---[ end trace feb441c6e3b9c3f1 ]---&lt;br /&gt;
Kernel panic - not syncing: Fatal exception&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;80011908&amp;gt;] (dump_backtrace+0x0/0x114) from [&amp;lt;802f2304&amp;gt;] (dump_stack+0x20/0x24)&lt;br /&gt;
 r6:9f0cdd1c r5:8039bb64 r4:8045dc40 r3:00000002&lt;br /&gt;
[&amp;lt;802f22e4&amp;gt;] (dump_stack+0x0/0x24) from [&amp;lt;802f2404&amp;gt;] (panic+0xfc/0x220)&lt;br /&gt;
[&amp;lt;802f2308&amp;gt;] (panic+0x0/0x220) from [&amp;lt;80011dd4&amp;gt;] (die+0x18c/0x1d0)&lt;br /&gt;
 r3:00000001 r2:9f0cdd28 r1:20000113 r0:8039bb64&lt;br /&gt;
 r7:00000001&lt;br /&gt;
[&amp;lt;80011c48&amp;gt;] (die+0x0/0x1d0) from [&amp;lt;80014edc&amp;gt;] (__do_kernel_fault+0x74/0x94)&lt;br /&gt;
 r8:00000000 r7:9f0cde68 r6:9f0c1d40 r5:00000817 r4:00000000&lt;br /&gt;
[&amp;lt;80014e68&amp;gt;] (__do_kernel_fault+0x0/0x94) from [&amp;lt;802f7ca0&amp;gt;] (do_page_fault+0x254/0x274)&lt;br /&gt;
 r8:00000817 r7:9f0c1d40 r6:9f06d5e0 r5:00000000 r4:9f0cde68&lt;br /&gt;
r3:9f0cde68&lt;br /&gt;
[&amp;lt;802f7a4c&amp;gt;] (do_page_fault+0x0/0x274) from [&amp;lt;802f7db0&amp;gt;] (do_DataAbort+0x40/0xa8)&lt;br /&gt;
[&amp;lt;802f7d70&amp;gt;] (do_DataAbort+0x0/0xa8) from [&amp;lt;802f5d98&amp;gt;] (__dabt_svc+0x38/0x60)&lt;br /&gt;
 r8:00000000 r7:9f0cde9c r6:ffffffff r5:60000093 r4:801b7dd4&lt;br /&gt;
[&amp;lt;801b7d94&amp;gt;] (sysrq_handle_crash+0x0/0x50) from [&amp;lt;801b85d0&amp;gt;] (__handle_sysrq+0xb0/0x15c)&lt;br /&gt;
[&amp;lt;801b8520&amp;gt;] (__handle_sysrq+0x0/0x15c) from [&amp;lt;801b86b0&amp;gt;] (write_sysrq_trigger+0x34/0x44)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:9f07a960 r5:801b867c r4:00000002&lt;br /&gt;
r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801b867c&amp;gt;] (write_sysrq_trigger+0x0/0x44) from [&amp;lt;80108a84&amp;gt;] (proc_reg_write+0x90/0xa4)&lt;br /&gt;
 r4:9fbaed80 r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801089f4&amp;gt;] (proc_reg_write+0x0/0xa4) from [&amp;lt;800c2f14&amp;gt;] (vfs_write+0xc4/0x150)&lt;br /&gt;
[&amp;lt;800c2e50&amp;gt;] (vfs_write+0x0/0x150) from [&amp;lt;800c3250&amp;gt;] (sys_write+0x54/0x110)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:0005a750 r5:9f07a960 r4:00000002&lt;br /&gt;
[&amp;lt;800c31fc&amp;gt;] (sys_write+0x0/0x110) from [&amp;lt;8000d8c0&amp;gt;] (ret_fast_syscall+0x0/0x30)&lt;br /&gt;
CPU1: stopping&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;80011908&amp;gt;] (dump_backtrace+0x0/0x114) from [&amp;lt;802f2304&amp;gt;] (dump_stack+0x20/0x24)&lt;br /&gt;
 r6:00000006 r5:00000001 r4:00000000 r3:00000000&lt;br /&gt;
[&amp;lt;802f22e4&amp;gt;] (dump_stack+0x0/0x24) from [&amp;lt;80008308&amp;gt;] (do_IPI+0xd8/0x148)&lt;br /&gt;
[&amp;lt;80008230&amp;gt;] (do_IPI+0x0/0x148) from [&amp;lt;802f5df4&amp;gt;] (__irq_svc+0x34/0xd0)&lt;br /&gt;
Exception stack(0x9fb47f68 to 0x9fb47fb0)&lt;br /&gt;
7f60:                   00000000 00000000 f300a000 00000000 9fb46000 80432444&lt;br /&gt;
7f80: 8045d464 802fd754 4000406a 411fc092 00000000 9fb47fbc 8000e660 9fb47fb0&lt;br /&gt;
7fa0: 8000e67c 8000e680 60000013 ffffffff&lt;br /&gt;
 r7:9fb47f9c r6:f0020000 r5:60000013 r4:8000e680&lt;br /&gt;
[&amp;lt;8000e64c&amp;gt;] (default_idle+0x0/0x38) from [&amp;lt;8000e920&amp;gt;] (cpu_idle+0x88/0xcc)&lt;br /&gt;
[&amp;lt;8000e898&amp;gt;] (cpu_idle+0x0/0xcc) from [&amp;lt;802f0130&amp;gt;] (secondary_start_kernel+0x140/0x164)&lt;br /&gt;
 r7:8045d57c r6:10c0387d r5:8043a2f8 r4:00000001&lt;br /&gt;
[&amp;lt;802efff0&amp;gt;] (secondary_start_kernel+0x0/0x164) from [&amp;lt;402efab4&amp;gt;] (0x402efab4)&lt;br /&gt;
 r5:00000015 r4:5fb4806a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Find latencies on kernel startup ===&lt;br /&gt;
It is possible to use ftrace to record functions that exceed a certain amount of time, using&lt;br /&gt;
the 'tracing_thresh' option.&lt;br /&gt;
This can be used for finding routines that are taking a long time&lt;br /&gt;
on kernel startup, to help optimize bootup time:&lt;br /&gt;
&lt;br /&gt;
* Make sure the following kerne configuration options are set:&lt;br /&gt;
** CONFIG_FTRACE: &amp;quot;Tracers&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_TRACER: &amp;quot;Kernel Function Tracer&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_GRAPH_TRACER: &amp;quot;Kernel Function Graph Tracer&amp;quot;&lt;br /&gt;
* Use the following on the kernel command line:&lt;br /&gt;
** tracing_thresh=200 ftrace=function_graph&lt;br /&gt;
*** this traces all functions taking longer than 200 microseconds (.2 ms).  You can use any duration threshhold you want.&lt;br /&gt;
* to get the data:&lt;br /&gt;
** $ mount -t debugfs debugfs /debug&lt;br /&gt;
** $ cat /debug/tracing/trace&lt;br /&gt;
These command should be probably be done programatically (as part of an init script), to avoid data loss&lt;br /&gt;
* scope of operation&lt;br /&gt;
** the tracer starts sometime during initialization, and you only get timings after it starts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Find deepest kernel stack ===&lt;br /&gt;
This is useful to find the routine with the deepest kernel stack&lt;br /&gt;
The system continually monitors the stack depth of all processes, and&lt;br /&gt;
whenever a low-water mark is hit (deepest stack), it records the list&lt;br /&gt;
of functions.&lt;br /&gt;
&lt;br /&gt;
(The following instructions work for a v3.0 Linux kernel)&lt;br /&gt;
* Kernel configuration: Set the following kernel configuration options:&lt;br /&gt;
** CONFIG_FTRACE: &amp;quot;Tracers&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_TRACER: &amp;quot;Kernel Function Tracer&amp;quot;&lt;br /&gt;
** CONFIG_STACK_TRACER: &amp;quot;Trace max stack&amp;quot;&lt;br /&gt;
* Turning it on: You can turn it on at boot time or at runtime.&lt;br /&gt;
** At boot time, use the following on the kernel command line:&lt;br /&gt;
*** stacktrace&lt;br /&gt;
** or, at runtime do:&lt;br /&gt;
*** echo 1 &amp;gt;/proc/sys/kernel/stack_tracer_enabled&lt;br /&gt;
* To get the data:&lt;br /&gt;
** $ mount -t debugfs debugfs /debug&lt;br /&gt;
** $ cat /debug/tracing/stack_trace&lt;br /&gt;
* scope of operation&lt;br /&gt;
** the stack tracer will continue operating until you turn it off, which can be done with:&lt;br /&gt;
*** echo 0 &amp;gt;/proc/sys/kernel/stack_tracer_enabled&lt;br /&gt;
&lt;br /&gt;
=== additional resources ===&lt;br /&gt;
See http://lwn.net/Articles/295955/&lt;br /&gt;
&lt;br /&gt;
=== output ===&lt;br /&gt;
Here is what the output looks like, on ARM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/debug/tracing # cat stack_trace&lt;br /&gt;
        Depth    Size   Location    (42 entries)&lt;br /&gt;
        -----    ----   --------&lt;br /&gt;
  0)     3328      16   ftrace_test_stop_func+0x28/0x34&lt;br /&gt;
  1)     3312      28   __gnu_mcount_nc+0x58/0x60&lt;br /&gt;
  2)     3284      52   skb_release_data+0xc0/0xc8&lt;br /&gt;
  3)     3232      24   __kfree_skb+0x24/0xc0&lt;br /&gt;
  4)     3208      32   consume_skb+0xe4/0xf0&lt;br /&gt;
  5)     3176      56   smsc911x_hard_start_xmit+0x188/0x2f4&lt;br /&gt;
  6)     3120      72   dev_hard_start_xmit+0x440/0x6a4&lt;br /&gt;
  7)     3048      40   sch_direct_xmit+0x8c/0x1f8&lt;br /&gt;
  8)     3008      48   dev_queue_xmit+0x2c8/0x570&lt;br /&gt;
  9)     2960      56   neigh_resolve_output+0x32c/0x390&lt;br /&gt;
 10)     2904      40   ip_finish_output+0x2bc/0x37c&lt;br /&gt;
 11)     2864      32   ip_output+0xb0/0xb8&lt;br /&gt;
 12)     2832      24   ip_local_out+0x38/0x3c&lt;br /&gt;
 13)     2808      32   ip_send_skb+0x18/0xa4&lt;br /&gt;
 14)     2776      56   udp_send_skb+0x274/0x394&lt;br /&gt;
 15)     2720     240   udp_sendmsg+0x4dc/0x748&lt;br /&gt;
 16)     2480      32   inet_sendmsg+0x70/0x7c&lt;br /&gt;
 17)     2448     232   sock_sendmsg+0xa8/0x160&lt;br /&gt;
 18)     2216      32   kernel_sendmsg+0x40/0x48&lt;br /&gt;
 19)     2184      96   xs_send_kvec+0xa8/0xb0&lt;br /&gt;
 20)     2088      64   xs_sendpages+0x90/0x1f8&lt;br /&gt;
 21)     2024      40   xs_udp_send_request+0x4c/0x13c&lt;br /&gt;
 22)     1984      48   xprt_transmit+0x114/0x214&lt;br /&gt;
 23)     1936      40   call_transmit+0x208/0x27c&lt;br /&gt;
 24)     1896      48   __rpc_execute+0x88/0x334&lt;br /&gt;
 25)     1848      24   rpc_execute+0x68/0x70&lt;br /&gt;
 26)     1824      24   rpc_run_task+0xa8/0xb4&lt;br /&gt;
 27)     1800      64   rpc_call_sync+0x68/0x90&lt;br /&gt;
 28)     1736      32   nfs_rpc_wrapper.clone.6+0x3c/0x7c&lt;br /&gt;
 29)     1704      48   nfs_proc_getattr+0x70/0xac&lt;br /&gt;
 30)     1656      48   __nfs_revalidate_inode+0xe4/0x1f8&lt;br /&gt;
 31)     1608      56   nfs_lookup_revalidate+0x1ac/0x40c&lt;br /&gt;
 32)     1552      72   do_lookup+0x228/0x2e4&lt;br /&gt;
 33)     1480      72   do_last.clone.44+0x10c/0x688&lt;br /&gt;
 34)     1408      88   path_openat+0x2fc/0x394&lt;br /&gt;
 35)     1320     144   do_filp_open+0x40/0x8c&lt;br /&gt;
 36)     1176      40   open_exec+0x2c/0xc0&lt;br /&gt;
 37)     1136     136   load_elf_binary+0x1cc/0x12b8&lt;br /&gt;
 38)     1000      72   search_binary_handler+0x150/0x3a0&lt;br /&gt;
 39)      928      56   do_execve+0x170/0x328&lt;br /&gt;
 40)      872      32   sys_execve+0x44/0x64&lt;br /&gt;
 41)      840     840   ret_fast_syscall+0x0/0x30&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux tracing]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Kernel_Small_Stacks</id>
		<title>Kernel Small Stacks</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Kernel_Small_Stacks"/>
				<updated>2013-03-21T18:28:24Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Stack tracer in ftrace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is some random information about small kernel stack sizes.&lt;br /&gt;
&lt;br /&gt;
The default stack size for a process running in kernel space is 8K (as of 2011).&lt;br /&gt;
&lt;br /&gt;
There used to be an option on x86 to reduce the stack size to 4K.  And indeed there&lt;br /&gt;
were efforts in 2006 to make this the default stack size.  However, using a small stack&lt;br /&gt;
opens up the dangerous possibility that the stack will overflow, causing a kernel hang.&lt;br /&gt;
&lt;br /&gt;
Besides wasting memory, if the stack space is not really needed, 8K stacks&lt;br /&gt;
also have an effect on, and are affected by, general kernel memory allocation.&lt;br /&gt;
To create an 8K stack requires an order-1 allocation, meaning that 2 contiguous&lt;br /&gt;
physical pages must be allocated together in order to create a new process stack.&lt;br /&gt;
If memory has become fragmented, it may be impossible to fulfill an order-1 allocation,&lt;br /&gt;
even though individual pages of physical memory may be free.  Thus 4K stack&lt;br /&gt;
allocations (order-0 allocations) are more likely to succeed.  This is important for&lt;br /&gt;
systems operating under extreme memory pressure.&lt;br /&gt;
&lt;br /&gt;
There were years of debate on the kernel mailing list about whether 4K stacks should&lt;br /&gt;
be the default, and lots of bug reports that ended up being caused stack overflows&lt;br /&gt;
with 4K stacks enabled. The option to support 4k stacks on x86 was removed in 2010,&lt;br /&gt;
from kernel version 2.6.37 with this commit: dcfa726280116dd31adad37da940f542663567d0&lt;br /&gt;
&lt;br /&gt;
=== Historical information on 4K Stacks ===&lt;br /&gt;
Here are some articles and links to information about 4K stacks:&lt;br /&gt;
* [http://lwn.net/Articles/84583/ 4K Stacks in 2.6] - LWN.net, May 2004&lt;br /&gt;
* [http://lwn.net/Articles/150580/ 4K stacks for everyone?] - LWN.net, Sep 2005&lt;br /&gt;
* [http://lwn.net/Articles/160138/ 4K stacks - again] - LWN.net, Nov 2005&lt;br /&gt;
* [http://lwn.net/Articles/279229/ 4K stacks by default?] - LWN.net, Apr 2008&lt;br /&gt;
&lt;br /&gt;
* http://www.redhat.com/archives/rhl-list/2007-March/msg00854.html - James Wilkinson message about memory fragmentation.&lt;br /&gt;
&lt;br /&gt;
== Stack layout ==&lt;br /&gt;
The kernel stack is laid out with the stack pointer at the top of each stack (at the&lt;br /&gt;
highest stack address), growing downward for each function call and stack allocation.&lt;br /&gt;
The thread_info structure for a process is at the bottom of the stack.  There is&lt;br /&gt;
no physical mechanism to detect, at allocation time, if the stack pointer wanders into&lt;br /&gt;
the thread_info area of the stack.  Hence, if the stack overflows (the stack pointer&lt;br /&gt;
goes into the thread_info area), the behavior of the system is undefined.&lt;br /&gt;
&lt;br /&gt;
Stack structure:&lt;br /&gt;
 top     +----------------+&lt;br /&gt;
         | return vals    |&lt;br /&gt;
         |   &amp;amp; local vars |&lt;br /&gt;
         | ...            |&lt;br /&gt;
         |                |&lt;br /&gt;
         |                |&lt;br /&gt;
         | 0's            |&lt;br /&gt;
         | thread_info    |&lt;br /&gt;
 bottom  +----------------+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Stack measuring/monitoring mechanisms ==&lt;br /&gt;
Because of previous efforts to conserve stack space, there are actually a few&lt;br /&gt;
different mechanisms for monitoring the kernel stack usage.  Some tools report&lt;br /&gt;
on the static size of stack usage by kernel functions (a check which is done by&lt;br /&gt;
either the compiler or a separate tool operating on the kernel binary), and &lt;br /&gt;
some mechanisms can report on actual stack utilization at runtime.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG_FRAME_WARN ===&lt;br /&gt;
This kernel configuration option passes an option to the compiler to cause it&lt;br /&gt;
to emit a warning when a static stack size for a routine is detected that is&lt;br /&gt;
larger than the specified threshold.  It requires gcc version 4.4 or later in order&lt;br /&gt;
to work.&lt;br /&gt;
&lt;br /&gt;
The gcc option used is &amp;quot;-Wframe-larger-than=xxx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
By default, CONFIG_FRAME_WARN has the value of 1024, but you can set it&lt;br /&gt;
to any value from 0 to 8192.&lt;br /&gt;
&lt;br /&gt;
Here is a sample of build output with this option configured to 256:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  CC      ipc/msg.o&lt;br /&gt;
  CC      ipc/sem.o&lt;br /&gt;
 .../linux-3.0.y/ipc/sem.c: In function 'semctl_main.clone.7':&lt;br /&gt;
 .../linux-3.0.y/ipc/sem.c:1021:1: warning: the frame size of 520 bytes is larger than 256 bytes&lt;br /&gt;
 .../linux-3.0.y/ipc/sem.c: In function 'sys_semtimedop':&lt;br /&gt;
 .../linux-3.0.y/ipc/sem.c:1514:1: warning: the frame size of 472 bytes is larger than 256 bytes&lt;br /&gt;
  CC      ipc/shm.o&lt;br /&gt;
  CC      ipc/ipcns_notifier.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== checkstack.pl ===&lt;br /&gt;
The kernel source includes a script to perform static stack analysis&lt;br /&gt;
called scripts/checkstack.pl.&lt;br /&gt;
&lt;br /&gt;
Usage is as follows:&lt;br /&gt;
 $(CROSS_COMPILE)objdump -d vmlinux | scripts/checkstack.pl [arch]&lt;br /&gt;
&lt;br /&gt;
Replace [arch] with the architecture of the kernel being analyzed.&lt;br /&gt;
Several architectures are supported, including arm, mips and x86.&lt;br /&gt;
You should use a cross-objdump that matches the architecture you&lt;br /&gt;
compiled the kernel for.  For example, if you used:&lt;br /&gt;
arm-gnueabi-linux-gcc as your compiler, you would use &lt;br /&gt;
arm-gnueabi-linux-objdump as your object dump program.  This should&lt;br /&gt;
have been included in your cross-compiler toolchain package.&lt;br /&gt;
&lt;br /&gt;
Below is some sample output from using checkstack.pl.  Note that&lt;br /&gt;
the file is first dumped to an assembly file (.S), and then piped&lt;br /&gt;
to checkstack.pl.  You can examine the assembly file to see&lt;br /&gt;
in detail the instructions used to reserve space on the stack,&lt;br /&gt;
for routines of interest found by checkstack.pl.&lt;br /&gt;
&lt;br /&gt;
An item in brackets is a module name, in case of a loadable module.&lt;br /&gt;
The number at end is stack depth detected for function.  The Leading&lt;br /&gt;
value is the address of the stack reservation code.&lt;br /&gt;
&lt;br /&gt;
 $ arm-eabi-objdummp -d vmlinux -o vmlinux-arm.S&lt;br /&gt;
 $ cat vmlinux-arm.S | scripts/checkstack.pl arm&lt;br /&gt;
 0x0012c858 nlmclnt_reclaim [vmlinux-arm.o]:             720&lt;br /&gt;
 0x0025748c do_tcp_getsockopt.clone.11 [vmlinux-arm.o]:  552&lt;br /&gt;
 0x00258d04 do_tcp_setsockopt.clone.14 [vmlinux-arm.o]:  544&lt;br /&gt;
 0x000b2db4 do_sys_poll [vmlinux-arm.o]:                 532&lt;br /&gt;
 0x00138744 semctl_main.clone.7 [vmlinux-arm.o]:         532&lt;br /&gt;
 0x00138ec4 sys_semtimedop [vmlinux-arm.o]:              484&lt;br /&gt;
 0x000c5618 default_file_splice_read [vmlinux-arm.o]:    436&lt;br /&gt;
 0x00251de4 do_ip_setsockopt.clone.22 [vmlinux-arm.o]:   416&lt;br /&gt;
 0x00191fd4 extract_buf [vmlinux-arm.o]:                 408&lt;br /&gt;
 0x0019bc24 loop_get_status_old [vmlinux-arm.o]:         396&lt;br /&gt;
 0x000e6f88 do_task_stat [vmlinux-arm.o]:                380&lt;br /&gt;
 0x0019b8f0 loop_set_status_old [vmlinux-arm.o]:         380&lt;br /&gt;
 0x002078f0 snd_ctl_elem_add_user [vmlinux-arm.o]:       376&lt;br /&gt;
 0x0026267c tcp_make_synack [vmlinux-arm.o]:             372&lt;br /&gt;
 0x00127be4 nfs_dns_parse [vmlinux-arm.o]:               368&lt;br /&gt;
 0x000b2240 do_select [vmlinux-arm.o]:                   340&lt;br /&gt;
 0x001f6f10 mmc_blk_issue_rw_rq [vmlinux-arm.o]:         340&lt;br /&gt;
 0x001726a0 fb_set_var [vmlinux-arm.o]:                  336&lt;br /&gt;
 0x000c58d0 __generic_file_splice_read [vmlinux-arm.o]:  316&lt;br /&gt;
 0x0022a074 dev_seq_printf_stats [vmlinux-arm.o]:        316&lt;br /&gt;
 0x0006383c tracing_splice_read_pipe [vmlinux-arm.o]:    308&lt;br /&gt;
 0x000c53c8 vmsplice_to_pipe [vmlinux-arm.o]:            308&lt;br /&gt;
 0x002512b4 do_ip_getsockopt [vmlinux-arm.o]:            304&lt;br /&gt;
 0x00225f68 skb_splice_bits [vmlinux-arm.o]:             300 &lt;br /&gt;
&lt;br /&gt;
=== stack_size ===&lt;br /&gt;
Below are some results for static analysis of function stack depth in the Linux kernel,&lt;br /&gt;
using 'stack_size'.  (stack_size is a custom tool written by Tim Bird, before he found&lt;br /&gt;
out about checkstack.pl.)&lt;br /&gt;
&lt;br /&gt;
See this kernel message for a patch containing 'stack_size': https://lkml.org/lkml/2011/10/18/479&lt;br /&gt;
&lt;br /&gt;
==== ARM results ====&lt;br /&gt;
The following results include the reduction in size for 'struct poll_wqueue':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./stack_size vmlinux-arm&lt;br /&gt;
============ RESULTS ===============&lt;br /&gt;
number of functions     = 14371&lt;br /&gt;
max function stack depth= 736&lt;br /&gt;
function with max depth = nlmclnt_reclaim&lt;br /&gt;
&lt;br /&gt;
Function Name                    Stack Depth&lt;br /&gt;
=====================            ===========&lt;br /&gt;
__generic_file_splice_read        352&lt;br /&gt;
do_select                         376&lt;br /&gt;
loop_set_status_old               392&lt;br /&gt;
snd_ctl_elem_add_user             408&lt;br /&gt;
extract_buf                       432&lt;br /&gt;
default_file_splice_read          472&lt;br /&gt;
sys_semtimedop                    520&lt;br /&gt;
semctl_main.clone.7               560&lt;br /&gt;
do_sys_poll                       568&lt;br /&gt;
nlmclnt_reclaim                   736&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== x86_64 results ====&lt;br /&gt;
&lt;br /&gt;
 $ ./show_stacks_x86_64.py vmlinux-x86_64.o&lt;br /&gt;
 ============ RESULTS ===============&lt;br /&gt;
 number of functions     = 29587&lt;br /&gt;
 max function stack depth= 1208&lt;br /&gt;
 function with max depth = security_load_policy&lt;br /&gt;
 &lt;br /&gt;
 Function Name                    Stack Depth&lt;br /&gt;
 =====================            ===========&lt;br /&gt;
 x86_schedule_events               632&lt;br /&gt;
 drm_crtc_helper_set_mode          632&lt;br /&gt;
 sys_semtimedop                    664&lt;br /&gt;
 do_task_stat                      712&lt;br /&gt;
 node_read_meminfo                 760&lt;br /&gt;
 default_file_splice_read          792&lt;br /&gt;
 do_select                         920&lt;br /&gt;
 nlmclnt_reclaim                   936&lt;br /&gt;
 do_sys_poll                      1048&lt;br /&gt;
 security_load_policy             1208&lt;br /&gt;
&lt;br /&gt;
=== CONFIG_DEBUG_STACK_USAGE ===&lt;br /&gt;
There is kernel feature to output the stack usage of each process, as well as the&lt;br /&gt;
process that uses the most stack in the system.  This is controlled&lt;br /&gt;
by the kernel configuration option CONFIG_DEBUG_STACK_USAGE.&lt;br /&gt;
&lt;br /&gt;
This option modifies the process creation path so that the stack is initialized with&lt;br /&gt;
all zeros.  At any time, a request can be made to measure the stack depth of&lt;br /&gt;
all running processes.  This is calculated by measuring the amount of zeros&lt;br /&gt;
from the end of thread_info to the first non-zero item on each stack.&lt;br /&gt;
&lt;br /&gt;
In more detail, it does the following:&lt;br /&gt;
* at process creation time, fills the stack with zeros (kernel/fork.c)&lt;br /&gt;
* on sysrq 't', show free space, from call to stack_not_used() (kernel/sched.c)&lt;br /&gt;
** it shows as 0 otherwise ??&lt;br /&gt;
* define check_stack_usage(), which emits printks on each low-water hit&lt;br /&gt;
** low-water appears to be global over all stacks&lt;br /&gt;
** check_stack_usage() is only called on process exit, so you might not know about a problem process until very late&lt;br /&gt;
* stack_not_used() is defined in include/linux/sched.h.  It counts the number of zero bytes following the end of thread_info going up.&lt;br /&gt;
&lt;br /&gt;
As the systems runs, any time the stack low-water mark is exceeded, then &lt;br /&gt;
the kernel prints a report (logs it to the kernel message log).  This can&lt;br /&gt;
be viewed with the dmesg command:&lt;br /&gt;
&lt;br /&gt;
Here is example output, greping the kernel message log for &amp;quot;greatest&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dmesg | grep greatest                                                       &lt;br /&gt;
kworker/u:0 used greatest stack depth: 10564 bytes left                         &lt;br /&gt;
busybox used greatest stack depth: 9512 bytes left                              &lt;br /&gt;
busybox used greatest stack depth: 9504 bytes left                              &lt;br /&gt;
grep used greatest stack depth: 9372 bytes left                                 &lt;br /&gt;
init used greatest stack depth: 9028 bytes left &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get a report on the stack usage of currently running processes, you use 't' with sysrq.  For example:&lt;br /&gt;
 $ echo t &amp;gt;/proc/sysrq-trigger&lt;br /&gt;
&lt;br /&gt;
A stack dump for each process is shown, along with stack usage information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is some sample output:&lt;br /&gt;
 $ echo t &amp;gt;/proc/sysrq-trigger&lt;br /&gt;
 $ dmesg | grep -v [[]&lt;br /&gt;
   task                PC stack   pid father&lt;br /&gt;
 init            S 802af8b0   932     1      0 0x00000000&lt;br /&gt;
 kthreadd        S 802af8b0  2496     2      0 0x00000000&lt;br /&gt;
 ksoftirqd/0     S 802af8b0  2840     3      2 0x00000000&lt;br /&gt;
 kworker/0:0     S 802af8b0  2776     4      2 0x00000000&lt;br /&gt;
 kworker/u:0     S 802af8b0  2548     5      2 0x00000000&lt;br /&gt;
 migration/0     S 802af8b0  2704     6      2 0x00000000&lt;br /&gt;
 migration/1     S 802af8b0  2704     7      2 0x00000000&lt;br /&gt;
 kworker/1:0     S 802af8b0  2560     8      2 0x00000000&lt;br /&gt;
 ksoftirqd/1     S 802af8b0  3024     9      2 0x00000000&lt;br /&gt;
 khelper         S 802af8b0  2824    10      2 0x00000000&lt;br /&gt;
 sync_supers     S 802af8b0  2872    11      2 0x00000000&lt;br /&gt;
 bdi-default     S 802af8b0  2584    12      2 0x00000000&lt;br /&gt;
 kblockd         S 802af8b0  2824    13      2 0x00000000&lt;br /&gt;
 khubd           S 802af8b0  2744    14      2 0x00000000&lt;br /&gt;
 rpciod          S 802af8b0  3024    15      2 0x00000000&lt;br /&gt;
 kworker/0:1     S 802af8b0  1240    16      2 0x00000000&lt;br /&gt;
 kswapd0         S 802af8b0  2848    17      2 0x00000000&lt;br /&gt;
 fsnotify_mark   S 802af8b0  2632    18      2 0x00000000&lt;br /&gt;
 nfsiod          S 802af8b0  3024    19      2 0x00000000&lt;br /&gt;
 kworker/u:1     S 802af8b0  2840    20      2 0x00000000&lt;br /&gt;
 hoge            S 802af8b0  3024    23      2 0x00000000&lt;br /&gt;
 kworker/1:1     S 802af8b0  1716    24      2 0x00000000&lt;br /&gt;
 flush-0:13      S 802af8b0  2528    28      2 0x00000000&lt;br /&gt;
 telnetd         S 802af8b0  1848    48      1 0x00000000&lt;br /&gt;
 ash             R running   1264    56      1 0x00000000&lt;br /&gt;
&lt;br /&gt;
=== Stack tracer in ftrace ===&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see: [[Ftrace#Find_deepest_kernel_stack]]&lt;br /&gt;
&lt;br /&gt;
Rough notes:&lt;br /&gt;
* Turn on CONFIG_STACK_TRACER in kernel config&lt;br /&gt;
* pass 'stacktrace' on kernel command line, or at runtime do:&lt;br /&gt;
* echo 1 &amp;gt;/proc/sys/kernel/stack_tracer_enabled&lt;br /&gt;
* mount -t debugfs none /sys/kernel/debug&lt;br /&gt;
* &amp;lt;do some stuff&amp;gt;&lt;br /&gt;
* cat /sys/kernel/debug/tracing/stack_trace&lt;br /&gt;
&lt;br /&gt;
See http://lwn.net/Articles/295955/&lt;br /&gt;
&lt;br /&gt;
=== Stack limit patches ===&lt;br /&gt;
Sony has a series of patches which implement a stack guard page, and&lt;br /&gt;
use that to show a backtrace if the process uses more than a specified amount&lt;br /&gt;
in its kernel stack.  In essence, this creates a hard failure for a &lt;br /&gt;
controlled stack overflow event.&lt;br /&gt;
&lt;br /&gt;
These patches do the following:&lt;br /&gt;
Add the config options:&lt;br /&gt;
* CONFIG_SNSC_DEBUG_STACK_LIMIT - perform stack layout changes&lt;br /&gt;
* CONFIG_SNSC_SUPPORT_4KB_MAPPING - re-map kernel memory for 4K TLB mappings&lt;br /&gt;
* CONFIG_SNSC_DEBUG_STACK_LIMIT_MANUAL - allow a user-specified starting stack size&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the patches do several things:&lt;br /&gt;
* change the stack layout to place thread_info at the top of the stack rather than at the bottom&lt;br /&gt;
* change the stack size to 16KB (order 2)&lt;br /&gt;
* allow configuring the default starting position of the stack, to simulate an arbitrary stack size (default is right below thread_info)&lt;br /&gt;
* remap the kernel memory so that 4KB mappings are used&lt;br /&gt;
** this allows unmapping the bottom page of the stack, so that a fault occurs when the page is accessed (on a stack overflow for a manually configured small stack)&lt;br /&gt;
** this is only turned on if you specify 'use_4kb_mapping' on the&lt;br /&gt;
* unmap the bottom page of the stack (the guard page)&lt;br /&gt;
** this is only turned on if you specify 'unmap_stack'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[ FIXTHIS - need to add more to this section]&lt;br /&gt;
&lt;br /&gt;
== ARM 4K Stacks ==&lt;br /&gt;
In October of 2011, Tim Bird submitted patches to add 4K stack support for the ARM &lt;br /&gt;
architecture to the Linux kernel.  The patches he submitted are here:&lt;br /&gt;
* https://lkml.org/lkml/2011/10/18/476 - ARM 4Kstacks: introduction&lt;br /&gt;
* https://lkml.org/lkml/2011/10/18/477 - ARM 4Kstacks: Add support for 4K kernel stacks to ARM&lt;br /&gt;
* https://lkml.org/lkml/2011/10/18/479 - ARM: Add static kernel function stack size analyzer, for ARM&lt;br /&gt;
* https://lkml.org/lkml/2011/10/18/481 - ARM 4Kstacks: Decrease poll and select stack usage, when using 4K stacks&lt;br /&gt;
&lt;br /&gt;
After some discussion, these patches were not accepted into mainline.&lt;br /&gt;
&lt;br /&gt;
The following points were problems that needed to be addressed for this patch set:&lt;br /&gt;
 * Should make this depend on CONFIG_EXPERT (to warn developers who attempt to use this)&lt;br /&gt;
 * Should add interrupt stacks to ARM to take pressure off of 4K stacks&lt;br /&gt;
 * Should determine if 4K stacks use case will cause ripple effect and lots of ifdefs and hard maintenance issues throughout the kernel.  In particular, need to look at:&lt;br /&gt;
   * %pV recursion in printk.  This is used by several file systems&lt;br /&gt;
     * question: for operation or just reporting??&lt;br /&gt;
&lt;br /&gt;
Dave Chinner ([https://lkml.org/lkml/2011/10/19/56 here]) wrote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
There's a good reason 4k stacks went away: it's&lt;br /&gt;
simply not enough space for the deep 60+ function call stacks we see&lt;br /&gt;
with even trivial storage stack configurations.&lt;br /&gt;
&lt;br /&gt;
The stack usage on 32 bit ARM and x86 is going to be similar, so&lt;br /&gt;
you're going to be fighting a losing battle - there is no stack&lt;br /&gt;
space that can be trimmed from most paths. To make matter worse,&lt;br /&gt;
there's been stuff done to the storage stack that significantly&lt;br /&gt;
increases stack usage since 4k stacks went away (e.g. the on-stack&lt;br /&gt;
block plugging changes).&lt;br /&gt;
&lt;br /&gt;
And FWIW, XFS is widely used on ARM based NAS devices, so this isn't&lt;br /&gt;
a theoretical problem I'm making up here...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a pretty good example of people denying a use case with a red&lt;br /&gt;
herring.&lt;br /&gt;
&lt;br /&gt;
== Possible mixed stack size feature ==&lt;br /&gt;
One option for realizing most of the benefits of 4K stacks, while preserving&lt;br /&gt;
more robustness, would be to utilize mixed stack sizes in the kernel.&lt;br /&gt;
&lt;br /&gt;
Processes known to exercise only certain, stack-conservative, code paths&lt;br /&gt;
in the kernel could utilize 4K stacks, and other processes could utilize&lt;br /&gt;
8K (or larger) stacks for safety purposes.&lt;br /&gt;
&lt;br /&gt;
There would have to be a mechanism to support selecting the stack size&lt;br /&gt;
at process creation time.  One simple mechanism would be to introduce&lt;br /&gt;
a child_stack_size parameter in thread_info, settable via /proc, and use&lt;br /&gt;
this on the clone system call.&lt;br /&gt;
&lt;br /&gt;
A system to support different-sized stacks by changing the stack size of&lt;br /&gt;
already running processes would likely be too complicated to be practical.&lt;br /&gt;
&lt;br /&gt;
Currently, the method of accessing the thread_info structure for a task in the&lt;br /&gt;
kernel relies on the stack size of all processes being consistent among all&lt;br /&gt;
processes (and being a power of two).  &lt;br /&gt;
A pointer to thread_info is obtained by masking the current stack pointer&lt;br /&gt;
with a value dependent on the (global) size of the stack.&lt;br /&gt;
With mixed stack sizes, a different mechanism would be needed to convert&lt;br /&gt;
from stack pointer to thread_info.  One method which might work would be to&lt;br /&gt;
pre-allocate a stack pool for non-standard-sized stacks, and use pointer&lt;br /&gt;
comparison to see if SP fell within the pool.  If the pool was exhausted,&lt;br /&gt;
the default stack size would be used.&lt;br /&gt;
&lt;br /&gt;
This would work best in the case of a system with an identifiable number of&lt;br /&gt;
processes which would use special-sized stacks.&lt;br /&gt;
&lt;br /&gt;
== Problems ==&lt;br /&gt;
This area has random notes for stack depth management issues:&lt;br /&gt;
&lt;br /&gt;
=== Problem routines ===&lt;br /&gt;
==== do_select, do_sys_poll ====&lt;br /&gt;
The structure 'struct poll_wqueue' is a large data structure used for the select() and poll()&lt;br /&gt;
system calls to manage a sub-set of the file descriptors being polled.  This structure includes&lt;br /&gt;
an array of wait queues which can be used immediately (without requiring or waiting for a memory allocation)&lt;br /&gt;
for polling file I/O.&lt;br /&gt;
&lt;br /&gt;
The number of entries in the array of wait queues can be controlled via macros in include/linux/poll.h&lt;br /&gt;
&lt;br /&gt;
==== nlm_clnt_reclaim ====&lt;br /&gt;
network lock manager for network filesystems.  Not applicable to most embedded products&lt;br /&gt;
(except possibly during development).&lt;br /&gt;
&lt;br /&gt;
==== security_load_policy ====&lt;br /&gt;
An selinux routine, not applicable to embedded.&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Kernel_Small_Stacks</id>
		<title>Kernel Small Stacks</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Kernel_Small_Stacks"/>
				<updated>2013-03-21T18:24:58Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Stack tracer in ftrace */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Here is some random information about small kernel stack sizes.&lt;br /&gt;
&lt;br /&gt;
The default stack size for a process running in kernel space is 8K (as of 2011).&lt;br /&gt;
&lt;br /&gt;
There used to be an option on x86 to reduce the stack size to 4K.  And indeed there&lt;br /&gt;
were efforts in 2006 to make this the default stack size.  However, using a small stack&lt;br /&gt;
opens up the dangerous possibility that the stack will overflow, causing a kernel hang.&lt;br /&gt;
&lt;br /&gt;
Besides wasting memory, if the stack space is not really needed, 8K stacks&lt;br /&gt;
also have an effect on, and are affected by, general kernel memory allocation.&lt;br /&gt;
To create an 8K stack requires an order-1 allocation, meaning that 2 contiguous&lt;br /&gt;
physical pages must be allocated together in order to create a new process stack.&lt;br /&gt;
If memory has become fragmented, it may be impossible to fulfill an order-1 allocation,&lt;br /&gt;
even though individual pages of physical memory may be free.  Thus 4K stack&lt;br /&gt;
allocations (order-0 allocations) are more likely to succeed.  This is important for&lt;br /&gt;
systems operating under extreme memory pressure.&lt;br /&gt;
&lt;br /&gt;
There were years of debate on the kernel mailing list about whether 4K stacks should&lt;br /&gt;
be the default, and lots of bug reports that ended up being caused stack overflows&lt;br /&gt;
with 4K stacks enabled. The option to support 4k stacks on x86 was removed in 2010,&lt;br /&gt;
from kernel version 2.6.37 with this commit: dcfa726280116dd31adad37da940f542663567d0&lt;br /&gt;
&lt;br /&gt;
=== Historical information on 4K Stacks ===&lt;br /&gt;
Here are some articles and links to information about 4K stacks:&lt;br /&gt;
* [http://lwn.net/Articles/84583/ 4K Stacks in 2.6] - LWN.net, May 2004&lt;br /&gt;
* [http://lwn.net/Articles/150580/ 4K stacks for everyone?] - LWN.net, Sep 2005&lt;br /&gt;
* [http://lwn.net/Articles/160138/ 4K stacks - again] - LWN.net, Nov 2005&lt;br /&gt;
* [http://lwn.net/Articles/279229/ 4K stacks by default?] - LWN.net, Apr 2008&lt;br /&gt;
&lt;br /&gt;
* http://www.redhat.com/archives/rhl-list/2007-March/msg00854.html - James Wilkinson message about memory fragmentation.&lt;br /&gt;
&lt;br /&gt;
== Stack layout ==&lt;br /&gt;
The kernel stack is laid out with the stack pointer at the top of each stack (at the&lt;br /&gt;
highest stack address), growing downward for each function call and stack allocation.&lt;br /&gt;
The thread_info structure for a process is at the bottom of the stack.  There is&lt;br /&gt;
no physical mechanism to detect, at allocation time, if the stack pointer wanders into&lt;br /&gt;
the thread_info area of the stack.  Hence, if the stack overflows (the stack pointer&lt;br /&gt;
goes into the thread_info area), the behavior of the system is undefined.&lt;br /&gt;
&lt;br /&gt;
Stack structure:&lt;br /&gt;
 top     +----------------+&lt;br /&gt;
         | return vals    |&lt;br /&gt;
         |   &amp;amp; local vars |&lt;br /&gt;
         | ...            |&lt;br /&gt;
         |                |&lt;br /&gt;
         |                |&lt;br /&gt;
         | 0's            |&lt;br /&gt;
         | thread_info    |&lt;br /&gt;
 bottom  +----------------+&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Stack measuring/monitoring mechanisms ==&lt;br /&gt;
Because of previous efforts to conserve stack space, there are actually a few&lt;br /&gt;
different mechanisms for monitoring the kernel stack usage.  Some tools report&lt;br /&gt;
on the static size of stack usage by kernel functions (a check which is done by&lt;br /&gt;
either the compiler or a separate tool operating on the kernel binary), and &lt;br /&gt;
some mechanisms can report on actual stack utilization at runtime.&lt;br /&gt;
&lt;br /&gt;
=== CONFIG_FRAME_WARN ===&lt;br /&gt;
This kernel configuration option passes an option to the compiler to cause it&lt;br /&gt;
to emit a warning when a static stack size for a routine is detected that is&lt;br /&gt;
larger than the specified threshold.  It requires gcc version 4.4 or later in order&lt;br /&gt;
to work.&lt;br /&gt;
&lt;br /&gt;
The gcc option used is &amp;quot;-Wframe-larger-than=xxx&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
By default, CONFIG_FRAME_WARN has the value of 1024, but you can set it&lt;br /&gt;
to any value from 0 to 8192.&lt;br /&gt;
&lt;br /&gt;
Here is a sample of build output with this option configured to 256:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  CC      ipc/msg.o&lt;br /&gt;
  CC      ipc/sem.o&lt;br /&gt;
 .../linux-3.0.y/ipc/sem.c: In function 'semctl_main.clone.7':&lt;br /&gt;
 .../linux-3.0.y/ipc/sem.c:1021:1: warning: the frame size of 520 bytes is larger than 256 bytes&lt;br /&gt;
 .../linux-3.0.y/ipc/sem.c: In function 'sys_semtimedop':&lt;br /&gt;
 .../linux-3.0.y/ipc/sem.c:1514:1: warning: the frame size of 472 bytes is larger than 256 bytes&lt;br /&gt;
  CC      ipc/shm.o&lt;br /&gt;
  CC      ipc/ipcns_notifier.o&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== checkstack.pl ===&lt;br /&gt;
The kernel source includes a script to perform static stack analysis&lt;br /&gt;
called scripts/checkstack.pl.&lt;br /&gt;
&lt;br /&gt;
Usage is as follows:&lt;br /&gt;
 $(CROSS_COMPILE)objdump -d vmlinux | scripts/checkstack.pl [arch]&lt;br /&gt;
&lt;br /&gt;
Replace [arch] with the architecture of the kernel being analyzed.&lt;br /&gt;
Several architectures are supported, including arm, mips and x86.&lt;br /&gt;
You should use a cross-objdump that matches the architecture you&lt;br /&gt;
compiled the kernel for.  For example, if you used:&lt;br /&gt;
arm-gnueabi-linux-gcc as your compiler, you would use &lt;br /&gt;
arm-gnueabi-linux-objdump as your object dump program.  This should&lt;br /&gt;
have been included in your cross-compiler toolchain package.&lt;br /&gt;
&lt;br /&gt;
Below is some sample output from using checkstack.pl.  Note that&lt;br /&gt;
the file is first dumped to an assembly file (.S), and then piped&lt;br /&gt;
to checkstack.pl.  You can examine the assembly file to see&lt;br /&gt;
in detail the instructions used to reserve space on the stack,&lt;br /&gt;
for routines of interest found by checkstack.pl.&lt;br /&gt;
&lt;br /&gt;
An item in brackets is a module name, in case of a loadable module.&lt;br /&gt;
The number at end is stack depth detected for function.  The Leading&lt;br /&gt;
value is the address of the stack reservation code.&lt;br /&gt;
&lt;br /&gt;
 $ arm-eabi-objdummp -d vmlinux -o vmlinux-arm.S&lt;br /&gt;
 $ cat vmlinux-arm.S | scripts/checkstack.pl arm&lt;br /&gt;
 0x0012c858 nlmclnt_reclaim [vmlinux-arm.o]:             720&lt;br /&gt;
 0x0025748c do_tcp_getsockopt.clone.11 [vmlinux-arm.o]:  552&lt;br /&gt;
 0x00258d04 do_tcp_setsockopt.clone.14 [vmlinux-arm.o]:  544&lt;br /&gt;
 0x000b2db4 do_sys_poll [vmlinux-arm.o]:                 532&lt;br /&gt;
 0x00138744 semctl_main.clone.7 [vmlinux-arm.o]:         532&lt;br /&gt;
 0x00138ec4 sys_semtimedop [vmlinux-arm.o]:              484&lt;br /&gt;
 0x000c5618 default_file_splice_read [vmlinux-arm.o]:    436&lt;br /&gt;
 0x00251de4 do_ip_setsockopt.clone.22 [vmlinux-arm.o]:   416&lt;br /&gt;
 0x00191fd4 extract_buf [vmlinux-arm.o]:                 408&lt;br /&gt;
 0x0019bc24 loop_get_status_old [vmlinux-arm.o]:         396&lt;br /&gt;
 0x000e6f88 do_task_stat [vmlinux-arm.o]:                380&lt;br /&gt;
 0x0019b8f0 loop_set_status_old [vmlinux-arm.o]:         380&lt;br /&gt;
 0x002078f0 snd_ctl_elem_add_user [vmlinux-arm.o]:       376&lt;br /&gt;
 0x0026267c tcp_make_synack [vmlinux-arm.o]:             372&lt;br /&gt;
 0x00127be4 nfs_dns_parse [vmlinux-arm.o]:               368&lt;br /&gt;
 0x000b2240 do_select [vmlinux-arm.o]:                   340&lt;br /&gt;
 0x001f6f10 mmc_blk_issue_rw_rq [vmlinux-arm.o]:         340&lt;br /&gt;
 0x001726a0 fb_set_var [vmlinux-arm.o]:                  336&lt;br /&gt;
 0x000c58d0 __generic_file_splice_read [vmlinux-arm.o]:  316&lt;br /&gt;
 0x0022a074 dev_seq_printf_stats [vmlinux-arm.o]:        316&lt;br /&gt;
 0x0006383c tracing_splice_read_pipe [vmlinux-arm.o]:    308&lt;br /&gt;
 0x000c53c8 vmsplice_to_pipe [vmlinux-arm.o]:            308&lt;br /&gt;
 0x002512b4 do_ip_getsockopt [vmlinux-arm.o]:            304&lt;br /&gt;
 0x00225f68 skb_splice_bits [vmlinux-arm.o]:             300 &lt;br /&gt;
&lt;br /&gt;
=== stack_size ===&lt;br /&gt;
Below are some results for static analysis of function stack depth in the Linux kernel,&lt;br /&gt;
using 'stack_size'.  (stack_size is a custom tool written by Tim Bird, before he found&lt;br /&gt;
out about checkstack.pl.)&lt;br /&gt;
&lt;br /&gt;
See this kernel message for a patch containing 'stack_size': https://lkml.org/lkml/2011/10/18/479&lt;br /&gt;
&lt;br /&gt;
==== ARM results ====&lt;br /&gt;
The following results include the reduction in size for 'struct poll_wqueue':&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ ./stack_size vmlinux-arm&lt;br /&gt;
============ RESULTS ===============&lt;br /&gt;
number of functions     = 14371&lt;br /&gt;
max function stack depth= 736&lt;br /&gt;
function with max depth = nlmclnt_reclaim&lt;br /&gt;
&lt;br /&gt;
Function Name                    Stack Depth&lt;br /&gt;
=====================            ===========&lt;br /&gt;
__generic_file_splice_read        352&lt;br /&gt;
do_select                         376&lt;br /&gt;
loop_set_status_old               392&lt;br /&gt;
snd_ctl_elem_add_user             408&lt;br /&gt;
extract_buf                       432&lt;br /&gt;
default_file_splice_read          472&lt;br /&gt;
sys_semtimedop                    520&lt;br /&gt;
semctl_main.clone.7               560&lt;br /&gt;
do_sys_poll                       568&lt;br /&gt;
nlmclnt_reclaim                   736&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== x86_64 results ====&lt;br /&gt;
&lt;br /&gt;
 $ ./show_stacks_x86_64.py vmlinux-x86_64.o&lt;br /&gt;
 ============ RESULTS ===============&lt;br /&gt;
 number of functions     = 29587&lt;br /&gt;
 max function stack depth= 1208&lt;br /&gt;
 function with max depth = security_load_policy&lt;br /&gt;
 &lt;br /&gt;
 Function Name                    Stack Depth&lt;br /&gt;
 =====================            ===========&lt;br /&gt;
 x86_schedule_events               632&lt;br /&gt;
 drm_crtc_helper_set_mode          632&lt;br /&gt;
 sys_semtimedop                    664&lt;br /&gt;
 do_task_stat                      712&lt;br /&gt;
 node_read_meminfo                 760&lt;br /&gt;
 default_file_splice_read          792&lt;br /&gt;
 do_select                         920&lt;br /&gt;
 nlmclnt_reclaim                   936&lt;br /&gt;
 do_sys_poll                      1048&lt;br /&gt;
 security_load_policy             1208&lt;br /&gt;
&lt;br /&gt;
=== CONFIG_DEBUG_STACK_USAGE ===&lt;br /&gt;
There is kernel feature to output the stack usage of each process, as well as the&lt;br /&gt;
process that uses the most stack in the system.  This is controlled&lt;br /&gt;
by the kernel configuration option CONFIG_DEBUG_STACK_USAGE.&lt;br /&gt;
&lt;br /&gt;
This option modifies the process creation path so that the stack is initialized with&lt;br /&gt;
all zeros.  At any time, a request can be made to measure the stack depth of&lt;br /&gt;
all running processes.  This is calculated by measuring the amount of zeros&lt;br /&gt;
from the end of thread_info to the first non-zero item on each stack.&lt;br /&gt;
&lt;br /&gt;
In more detail, it does the following:&lt;br /&gt;
* at process creation time, fills the stack with zeros (kernel/fork.c)&lt;br /&gt;
* on sysrq 't', show free space, from call to stack_not_used() (kernel/sched.c)&lt;br /&gt;
** it shows as 0 otherwise ??&lt;br /&gt;
* define check_stack_usage(), which emits printks on each low-water hit&lt;br /&gt;
** low-water appears to be global over all stacks&lt;br /&gt;
** check_stack_usage() is only called on process exit, so you might not know about a problem process until very late&lt;br /&gt;
* stack_not_used() is defined in include/linux/sched.h.  It counts the number of zero bytes following the end of thread_info going up.&lt;br /&gt;
&lt;br /&gt;
As the systems runs, any time the stack low-water mark is exceeded, then &lt;br /&gt;
the kernel prints a report (logs it to the kernel message log).  This can&lt;br /&gt;
be viewed with the dmesg command:&lt;br /&gt;
&lt;br /&gt;
Here is example output, greping the kernel message log for &amp;quot;greatest&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# dmesg | grep greatest                                                       &lt;br /&gt;
kworker/u:0 used greatest stack depth: 10564 bytes left                         &lt;br /&gt;
busybox used greatest stack depth: 9512 bytes left                              &lt;br /&gt;
busybox used greatest stack depth: 9504 bytes left                              &lt;br /&gt;
grep used greatest stack depth: 9372 bytes left                                 &lt;br /&gt;
init used greatest stack depth: 9028 bytes left &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To get a report on the stack usage of currently running processes, you use 't' with sysrq.  For example:&lt;br /&gt;
 $ echo t &amp;gt;/proc/sysrq-trigger&lt;br /&gt;
&lt;br /&gt;
A stack dump for each process is shown, along with stack usage information.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is some sample output:&lt;br /&gt;
 $ echo t &amp;gt;/proc/sysrq-trigger&lt;br /&gt;
 $ dmesg | grep -v [[]&lt;br /&gt;
   task                PC stack   pid father&lt;br /&gt;
 init            S 802af8b0   932     1      0 0x00000000&lt;br /&gt;
 kthreadd        S 802af8b0  2496     2      0 0x00000000&lt;br /&gt;
 ksoftirqd/0     S 802af8b0  2840     3      2 0x00000000&lt;br /&gt;
 kworker/0:0     S 802af8b0  2776     4      2 0x00000000&lt;br /&gt;
 kworker/u:0     S 802af8b0  2548     5      2 0x00000000&lt;br /&gt;
 migration/0     S 802af8b0  2704     6      2 0x00000000&lt;br /&gt;
 migration/1     S 802af8b0  2704     7      2 0x00000000&lt;br /&gt;
 kworker/1:0     S 802af8b0  2560     8      2 0x00000000&lt;br /&gt;
 ksoftirqd/1     S 802af8b0  3024     9      2 0x00000000&lt;br /&gt;
 khelper         S 802af8b0  2824    10      2 0x00000000&lt;br /&gt;
 sync_supers     S 802af8b0  2872    11      2 0x00000000&lt;br /&gt;
 bdi-default     S 802af8b0  2584    12      2 0x00000000&lt;br /&gt;
 kblockd         S 802af8b0  2824    13      2 0x00000000&lt;br /&gt;
 khubd           S 802af8b0  2744    14      2 0x00000000&lt;br /&gt;
 rpciod          S 802af8b0  3024    15      2 0x00000000&lt;br /&gt;
 kworker/0:1     S 802af8b0  1240    16      2 0x00000000&lt;br /&gt;
 kswapd0         S 802af8b0  2848    17      2 0x00000000&lt;br /&gt;
 fsnotify_mark   S 802af8b0  2632    18      2 0x00000000&lt;br /&gt;
 nfsiod          S 802af8b0  3024    19      2 0x00000000&lt;br /&gt;
 kworker/u:1     S 802af8b0  2840    20      2 0x00000000&lt;br /&gt;
 hoge            S 802af8b0  3024    23      2 0x00000000&lt;br /&gt;
 kworker/1:1     S 802af8b0  1716    24      2 0x00000000&lt;br /&gt;
 flush-0:13      S 802af8b0  2528    28      2 0x00000000&lt;br /&gt;
 telnetd         S 802af8b0  1848    48      1 0x00000000&lt;br /&gt;
 ash             R running   1264    56      1 0x00000000&lt;br /&gt;
&lt;br /&gt;
=== Stack tracer in ftrace ===&lt;br /&gt;
&lt;br /&gt;
For detailed instructions, see: http://elinux.org/Ftrace#find_deepest_kernel_stack&lt;br /&gt;
&lt;br /&gt;
Rough notes:&lt;br /&gt;
* Turn on CONFIG_STACK_TRACER in kernel config&lt;br /&gt;
* pass 'stacktrace' on kernel command line, or at runtime do:&lt;br /&gt;
* echo 1 &amp;gt;/proc/sys/kernel/stack_tracer_enabled&lt;br /&gt;
* mount -t debugfs none /sys/kernel/debug&lt;br /&gt;
* &amp;lt;do some stuff&amp;gt;&lt;br /&gt;
* cat /sys/kernel/debug/tracing/stack_trace&lt;br /&gt;
&lt;br /&gt;
See http://lwn.net/Articles/295955/&lt;br /&gt;
&lt;br /&gt;
=== Stack limit patches ===&lt;br /&gt;
Sony has a series of patches which implement a stack guard page, and&lt;br /&gt;
use that to show a backtrace if the process uses more than a specified amount&lt;br /&gt;
in its kernel stack.  In essence, this creates a hard failure for a &lt;br /&gt;
controlled stack overflow event.&lt;br /&gt;
&lt;br /&gt;
These patches do the following:&lt;br /&gt;
Add the config options:&lt;br /&gt;
* CONFIG_SNSC_DEBUG_STACK_LIMIT - perform stack layout changes&lt;br /&gt;
* CONFIG_SNSC_SUPPORT_4KB_MAPPING - re-map kernel memory for 4K TLB mappings&lt;br /&gt;
* CONFIG_SNSC_DEBUG_STACK_LIMIT_MANUAL - allow a user-specified starting stack size&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
the patches do several things:&lt;br /&gt;
* change the stack layout to place thread_info at the top of the stack rather than at the bottom&lt;br /&gt;
* change the stack size to 16KB (order 2)&lt;br /&gt;
* allow configuring the default starting position of the stack, to simulate an arbitrary stack size (default is right below thread_info)&lt;br /&gt;
* remap the kernel memory so that 4KB mappings are used&lt;br /&gt;
** this allows unmapping the bottom page of the stack, so that a fault occurs when the page is accessed (on a stack overflow for a manually configured small stack)&lt;br /&gt;
** this is only turned on if you specify 'use_4kb_mapping' on the&lt;br /&gt;
* unmap the bottom page of the stack (the guard page)&lt;br /&gt;
** this is only turned on if you specify 'unmap_stack'&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[ FIXTHIS - need to add more to this section]&lt;br /&gt;
&lt;br /&gt;
== ARM 4K Stacks ==&lt;br /&gt;
In October of 2011, Tim Bird submitted patches to add 4K stack support for the ARM &lt;br /&gt;
architecture to the Linux kernel.  The patches he submitted are here:&lt;br /&gt;
* https://lkml.org/lkml/2011/10/18/476 - ARM 4Kstacks: introduction&lt;br /&gt;
* https://lkml.org/lkml/2011/10/18/477 - ARM 4Kstacks: Add support for 4K kernel stacks to ARM&lt;br /&gt;
* https://lkml.org/lkml/2011/10/18/479 - ARM: Add static kernel function stack size analyzer, for ARM&lt;br /&gt;
* https://lkml.org/lkml/2011/10/18/481 - ARM 4Kstacks: Decrease poll and select stack usage, when using 4K stacks&lt;br /&gt;
&lt;br /&gt;
After some discussion, these patches were not accepted into mainline.&lt;br /&gt;
&lt;br /&gt;
The following points were problems that needed to be addressed for this patch set:&lt;br /&gt;
 * Should make this depend on CONFIG_EXPERT (to warn developers who attempt to use this)&lt;br /&gt;
 * Should add interrupt stacks to ARM to take pressure off of 4K stacks&lt;br /&gt;
 * Should determine if 4K stacks use case will cause ripple effect and lots of ifdefs and hard maintenance issues throughout the kernel.  In particular, need to look at:&lt;br /&gt;
   * %pV recursion in printk.  This is used by several file systems&lt;br /&gt;
     * question: for operation or just reporting??&lt;br /&gt;
&lt;br /&gt;
Dave Chinner ([https://lkml.org/lkml/2011/10/19/56 here]) wrote:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
There's a good reason 4k stacks went away: it's&lt;br /&gt;
simply not enough space for the deep 60+ function call stacks we see&lt;br /&gt;
with even trivial storage stack configurations.&lt;br /&gt;
&lt;br /&gt;
The stack usage on 32 bit ARM and x86 is going to be similar, so&lt;br /&gt;
you're going to be fighting a losing battle - there is no stack&lt;br /&gt;
space that can be trimmed from most paths. To make matter worse,&lt;br /&gt;
there's been stuff done to the storage stack that significantly&lt;br /&gt;
increases stack usage since 4k stacks went away (e.g. the on-stack&lt;br /&gt;
block plugging changes).&lt;br /&gt;
&lt;br /&gt;
And FWIW, XFS is widely used on ARM based NAS devices, so this isn't&lt;br /&gt;
a theoretical problem I'm making up here...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is a pretty good example of people denying a use case with a red&lt;br /&gt;
herring.&lt;br /&gt;
&lt;br /&gt;
== Possible mixed stack size feature ==&lt;br /&gt;
One option for realizing most of the benefits of 4K stacks, while preserving&lt;br /&gt;
more robustness, would be to utilize mixed stack sizes in the kernel.&lt;br /&gt;
&lt;br /&gt;
Processes known to exercise only certain, stack-conservative, code paths&lt;br /&gt;
in the kernel could utilize 4K stacks, and other processes could utilize&lt;br /&gt;
8K (or larger) stacks for safety purposes.&lt;br /&gt;
&lt;br /&gt;
There would have to be a mechanism to support selecting the stack size&lt;br /&gt;
at process creation time.  One simple mechanism would be to introduce&lt;br /&gt;
a child_stack_size parameter in thread_info, settable via /proc, and use&lt;br /&gt;
this on the clone system call.&lt;br /&gt;
&lt;br /&gt;
A system to support different-sized stacks by changing the stack size of&lt;br /&gt;
already running processes would likely be too complicated to be practical.&lt;br /&gt;
&lt;br /&gt;
Currently, the method of accessing the thread_info structure for a task in the&lt;br /&gt;
kernel relies on the stack size of all processes being consistent among all&lt;br /&gt;
processes (and being a power of two).  &lt;br /&gt;
A pointer to thread_info is obtained by masking the current stack pointer&lt;br /&gt;
with a value dependent on the (global) size of the stack.&lt;br /&gt;
With mixed stack sizes, a different mechanism would be needed to convert&lt;br /&gt;
from stack pointer to thread_info.  One method which might work would be to&lt;br /&gt;
pre-allocate a stack pool for non-standard-sized stacks, and use pointer&lt;br /&gt;
comparison to see if SP fell within the pool.  If the pool was exhausted,&lt;br /&gt;
the default stack size would be used.&lt;br /&gt;
&lt;br /&gt;
This would work best in the case of a system with an identifiable number of&lt;br /&gt;
processes which would use special-sized stacks.&lt;br /&gt;
&lt;br /&gt;
== Problems ==&lt;br /&gt;
This area has random notes for stack depth management issues:&lt;br /&gt;
&lt;br /&gt;
=== Problem routines ===&lt;br /&gt;
==== do_select, do_sys_poll ====&lt;br /&gt;
The structure 'struct poll_wqueue' is a large data structure used for the select() and poll()&lt;br /&gt;
system calls to manage a sub-set of the file descriptors being polled.  This structure includes&lt;br /&gt;
an array of wait queues which can be used immediately (without requiring or waiting for a memory allocation)&lt;br /&gt;
for polling file I/O.&lt;br /&gt;
&lt;br /&gt;
The number of entries in the array of wait queues can be controlled via macros in include/linux/poll.h&lt;br /&gt;
&lt;br /&gt;
==== nlm_clnt_reclaim ====&lt;br /&gt;
network lock manager for network filesystems.  Not applicable to most embedded products&lt;br /&gt;
(except possibly during development).&lt;br /&gt;
&lt;br /&gt;
==== security_load_policy ====&lt;br /&gt;
An selinux routine, not applicable to embedded.&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Ftrace</id>
		<title>Ftrace</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Ftrace"/>
				<updated>2013-03-21T18:24:45Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* find deepest kernel stack */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ftrace is the Linux kernel internal tracer that was included in the Linux kernel in 2.6.27.&lt;br /&gt;
Although Ftrace is named after the function tracer it also includes many more functionalities.&lt;br /&gt;
But the function tracer is the part of Ftrace that makes it unique as you can trace almost&lt;br /&gt;
any function in the kernel and with dynamic Ftrace, it has no overhead when not enabled.&lt;br /&gt;
&lt;br /&gt;
The interface for Ftrace resides in the debugfs file system in the tracing directory.&lt;br /&gt;
Documentation for this can be found in the Linux kernel source tree at&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/trace/ftrace.txt; Documentation/trace/ftrace.txt].&lt;br /&gt;
&lt;br /&gt;
== trace-cmd ==&lt;br /&gt;
&lt;br /&gt;
Using the Ftrace debugfs interface can be awkward and time consuming. trace-cmd was&lt;br /&gt;
created to interface with Ftrace using a binary tool which comes with full documentation&lt;br /&gt;
in man pages.&lt;br /&gt;
&lt;br /&gt;
Here's some examples of trace-cmd:&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd record -e sched myprogram&lt;br /&gt;
&lt;br /&gt;
The above will enable all the Ftrace tracepoints that are grouped under the sched&lt;br /&gt;
system. You can find these tracepoints by looking at the debugfs system:&lt;br /&gt;
&lt;br /&gt;
 # mount -t debugfs nodev /sys/kernel/debug&lt;br /&gt;
 # ls /sys/kernel/debug/tracing/events/sched&lt;br /&gt;
 enable                  sched_process_fork  sched_stat_sleep&lt;br /&gt;
 filter                  sched_process_free  sched_stat_wait&lt;br /&gt;
 sched_kthread_stop      sched_process_wait  sched_switch&lt;br /&gt;
 sched_kthread_stop_ret  sched_signal_send   sched_wait_task&lt;br /&gt;
 sched_migrate_task      sched_stat_iowait   sched_wakeup&lt;br /&gt;
 sched_process_exit      sched_stat_runtime  sched_wakeup_new&lt;br /&gt;
&lt;br /&gt;
trace-cmd allows you to see the possible events without needing to look at this directory&lt;br /&gt;
as well.&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd list -e | grep sched:&lt;br /&gt;
 sched:sched_kthread_stop&lt;br /&gt;
 sched:sched_kthread_stop_ret&lt;br /&gt;
 sched:sched_wait_task&lt;br /&gt;
 sched:sched_wakeup&lt;br /&gt;
 sched:sched_wakeup_new&lt;br /&gt;
 sched:sched_switch&lt;br /&gt;
 sched:sched_migrate_task&lt;br /&gt;
 sched:sched_process_free&lt;br /&gt;
 sched:sched_process_exit&lt;br /&gt;
 sched:sched_process_wait&lt;br /&gt;
 sched:sched_process_fork&lt;br /&gt;
 sched:sched_signal_send&lt;br /&gt;
 sched:sched_stat_wait&lt;br /&gt;
 sched:sched_stat_runtime&lt;br /&gt;
 sched:sched_stat_sleep&lt;br /&gt;
 sched:sched_stat_iowait&lt;br /&gt;
&lt;br /&gt;
You can find trace-cmd in its [http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary git]&lt;br /&gt;
repository.&lt;br /&gt;
&lt;br /&gt;
Also within that same repository is KernelShark, which is a graphical user interface to trace-cmd. trace-cmd&lt;br /&gt;
is built with just &amp;quot;make&amp;quot; and KernelShark is created with &amp;quot;make gui&amp;quot;. This allows building trace-cmd on&lt;br /&gt;
your embedded device and keeping the build from needing the GTK libraries required by KernelShark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
=== Tracing a specific process with the Ftrace interface ===&lt;br /&gt;
(Adapted from email by Steven Rostedt)&lt;br /&gt;
To trace just the kernel functions executed in the context of a particular function,&lt;br /&gt;
set the pseudo-variable 'set-ftrace-pid', to the process id (pid) of the process.&lt;br /&gt;
&lt;br /&gt;
If the process is not already running, you can use a wrapper shell script and the&lt;br /&gt;
'exec' command, to execute a command as a known pid.&lt;br /&gt;
&lt;br /&gt;
Like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
echo $$ &amp;gt; /debug/tracing/set_ftrace_pid&lt;br /&gt;
# can set other filtering here&lt;br /&gt;
echo function &amp;gt; /debug/tracing/current_tracer&lt;br /&gt;
exec $*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, '$$' is the pid of the currently executing process (the shell&lt;br /&gt;
script.  This is set into the 'set_ftrace_pid' variable, then the 'function'&lt;br /&gt;
tracer is enabled.  Then this script exec's the command (specified by the first&lt;br /&gt;
argument to the script).&lt;br /&gt;
&lt;br /&gt;
Example usage (assuming script is called 'trace_command'):&lt;br /&gt;
 trace_command ls&lt;br /&gt;
&lt;br /&gt;
=== Tracing a specific process with trace-cmd ===&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd record -p function -F ls&lt;br /&gt;
&lt;br /&gt;
=== Capturing an oops (from startup) to the serial console ===&lt;br /&gt;
You can capture the function calls leading up to a panic&lt;br /&gt;
by placing the following on the kernel command line:&lt;br /&gt;
&lt;br /&gt;
 ftrace=function ftrace_dump_on_oops&lt;br /&gt;
&lt;br /&gt;
''Note: You can also use 'ftrace=function_graph' if you would prefer that instead.''&lt;br /&gt;
&lt;br /&gt;
The ftrace documentation, in Documentation/trace/ftrace.txt mentions how to set&lt;br /&gt;
ftrace_dump_on_oops in a running system, but I have found it very handy to have&lt;br /&gt;
it configured to dump the trace from kernel startup, so that any panics that occur&lt;br /&gt;
during boot (before user-space is started) are also captured.&lt;br /&gt;
&lt;br /&gt;
Note that the output will be VERY long.  Please be patient.&lt;br /&gt;
&lt;br /&gt;
The output will look something like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     ash-56      0d..2. 159400967us : _raw_spin_lock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..2. 159400972us : __raw_spin_lock &amp;lt;-_raw_spin_lock&lt;br /&gt;
     ash-56      0d..2. 159400974us : add_preempt_count &amp;lt;-__raw_spin_lock&lt;br /&gt;
     ash-56      0d..3. 159400978us : log_prefix &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400979us : emit_log_char &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400981us : console_trylock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400983us : down_trylock &amp;lt;-console_trylock&lt;br /&gt;
     ash-56      0d..3. 159400985us : _raw_spin_lock_irqsave &amp;lt;-down_trylock&lt;br /&gt;
     ash-56      0d..3. 159400987us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159400989us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..4. 159400991us : _raw_spin_unlock_irqrestore &amp;lt;-down_trylock&lt;br /&gt;
     ash-56      0d..4. 159400993us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..3. 159400994us : _raw_spin_unlock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400997us : sub_preempt_count &amp;lt;-_raw_spin_unlock&lt;br /&gt;
     ash-56      0d..2. 159400999us : console_unlock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..2. 159401000us : _raw_spin_lock_irqsave &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401002us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..2. 159401004us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401006us : _raw_spin_unlock &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401008us : sub_preempt_count &amp;lt;-_raw_spin_unlock&lt;br /&gt;
     ash-56      0d..2. 159401010us : _call_console_drivers &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401012us : _call_console_drivers &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401014us : _raw_spin_lock_irqsave &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401015us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..2. 159401017us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401019us : up &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401021us : _raw_spin_lock_irqsave &amp;lt;-up&lt;br /&gt;
     ash-56      0d..3. 159401023us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401024us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..4. 159401027us : _raw_spin_unlock_irqrestore &amp;lt;-up&lt;br /&gt;
     ash-56      0d..4. 159401029us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..3. 159401031us : _raw_spin_unlock_irqrestore &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401033us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..2. 159401034us : wake_up_klogd &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401037us : sub_preempt_count &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..1. 159401039us : die &amp;lt;-__do_kernel_fault&lt;br /&gt;
     ash-56      0d..1. 159401041us : oops_enter &amp;lt;-die&lt;br /&gt;
---------------------------------&lt;br /&gt;
Modules linked in:&lt;br /&gt;
CPU: 0    Not tainted  (3.0.27_nl-kzm-a9-rt46-00022-g5e35327 #2)&lt;br /&gt;
PC is at sysrq_handle_crash+0x40/0x50&lt;br /&gt;
LR is at _raw_spin_unlock_irqrestore+0x34/0x54&lt;br /&gt;
pc : [&amp;lt;801b7dd4&amp;gt;]    lr : [&amp;lt;802f5420&amp;gt;]    psr: 60000093&lt;br /&gt;
sp : 9f0cdeb0  ip : 802f7ed4  fp : 9f0cdebc&lt;br /&gt;
r10: 9f0cdf68  r9 : 9fbaedc8  r8 : 00000000&lt;br /&gt;
r7 : 60000013  r6 : 00000063  r5 : 00000001  r4 : 8044b890&lt;br /&gt;
r3 : 00000000  r2 : 00000001  r1 : 20000093  r0 : 00000001&lt;br /&gt;
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user&lt;br /&gt;
Control: 10c5787d  Table: 5f11c04a  DAC: 00000015&lt;br /&gt;
Process ash (pid: 56, stack limit = 0x9f0cc2f0)&lt;br /&gt;
Stack: (0x9f0cdeb0 to 0x9f0ce000)&lt;br /&gt;
dea0:                                     9f0cdee4 9f0cdec0 801b85d0 801b7da0&lt;br /&gt;
dec0: 9f0cdf68 00000002 801b867c 9f07a960 00000002 2ad20000 9f0cdefc 9f0cdee8&lt;br /&gt;
dee0: 801b86b0 801b852c 9f0cdf68 9fbaed80 9f0cdf2c 9f0cdf00 80108a84 801b8688&lt;br /&gt;
df00: 9f0cdf68 00000002 9f07a960 2ad20000 9f0cdf68 2ad20000 00000001 00000000&lt;br /&gt;
df20: 9f0cdf5c 9f0cdf30 800c2f14 80108a00 00000002 00000889 800c4978 00000002&lt;br /&gt;
df40: 9f07a960 0005a750 00000002 2ad20000 9f0cdfa4 9f0cdf60 800c3250 800c2e5c&lt;br /&gt;
df60: 00020001 0004423c 00000000 00000000 9f0cc000 00000000 9f0cdfa4 00000002&lt;br /&gt;
df80: 2ad20000 0005a750 00000004 8000db24 9f0cc000 00000000 00000000 9f0cdfa8&lt;br /&gt;
dfa0: 8000d8c0 800c3208 00000002 2ad20000 00000001 2ad20000 00000002 00000889&lt;br /&gt;
dfc0: 00000002 2ad20000 0005a750 00000004 00000001 00000000 2ad093b8 7e8766d4&lt;br /&gt;
dfe0: 00000000 7e8766c0 2ac20f08 2ac023ec 40000010 00000001 00000000 00000000&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;801b7d94&amp;gt;] (sysrq_handle_crash+0x0/0x50) from [&amp;lt;801b85d0&amp;gt;] (__handle_sysrq+0xb0/0x15c)&lt;br /&gt;
[&amp;lt;801b8520&amp;gt;] (__handle_sysrq+0x0/0x15c) from [&amp;lt;801b86b0&amp;gt;] (write_sysrq_trigger+0x34/0x44)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:9f07a960 r5:801b867c r4:00000002&lt;br /&gt;
r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801b867c&amp;gt;] (write_sysrq_trigger+0x0/0x44) from [&amp;lt;80108a84&amp;gt;] (proc_reg_write+0x90/0xa4)&lt;br /&gt;
 r4:9fbaed80 r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801089f4&amp;gt;] (proc_reg_write+0x0/0xa4) from [&amp;lt;800c2f14&amp;gt;] (vfs_write+0xc4/0x150)&lt;br /&gt;
[&amp;lt;800c2e50&amp;gt;] (vfs_write+0x0/0x150) from [&amp;lt;800c3250&amp;gt;] (sys_write+0x54/0x110)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:0005a750 r5:9f07a960 r4:00000002&lt;br /&gt;
[&amp;lt;800c31fc&amp;gt;] (sys_write+0x0/0x110) from [&amp;lt;8000d8c0&amp;gt;] (ret_fast_syscall+0x0/0x30)&lt;br /&gt;
Code: 0a000000 e12fff33 e3a03000 e3a02001 (e5c32000)&lt;br /&gt;
---[ end trace feb441c6e3b9c3f1 ]---&lt;br /&gt;
Kernel panic - not syncing: Fatal exception&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;80011908&amp;gt;] (dump_backtrace+0x0/0x114) from [&amp;lt;802f2304&amp;gt;] (dump_stack+0x20/0x24)&lt;br /&gt;
 r6:9f0cdd1c r5:8039bb64 r4:8045dc40 r3:00000002&lt;br /&gt;
[&amp;lt;802f22e4&amp;gt;] (dump_stack+0x0/0x24) from [&amp;lt;802f2404&amp;gt;] (panic+0xfc/0x220)&lt;br /&gt;
[&amp;lt;802f2308&amp;gt;] (panic+0x0/0x220) from [&amp;lt;80011dd4&amp;gt;] (die+0x18c/0x1d0)&lt;br /&gt;
 r3:00000001 r2:9f0cdd28 r1:20000113 r0:8039bb64&lt;br /&gt;
 r7:00000001&lt;br /&gt;
[&amp;lt;80011c48&amp;gt;] (die+0x0/0x1d0) from [&amp;lt;80014edc&amp;gt;] (__do_kernel_fault+0x74/0x94)&lt;br /&gt;
 r8:00000000 r7:9f0cde68 r6:9f0c1d40 r5:00000817 r4:00000000&lt;br /&gt;
[&amp;lt;80014e68&amp;gt;] (__do_kernel_fault+0x0/0x94) from [&amp;lt;802f7ca0&amp;gt;] (do_page_fault+0x254/0x274)&lt;br /&gt;
 r8:00000817 r7:9f0c1d40 r6:9f06d5e0 r5:00000000 r4:9f0cde68&lt;br /&gt;
r3:9f0cde68&lt;br /&gt;
[&amp;lt;802f7a4c&amp;gt;] (do_page_fault+0x0/0x274) from [&amp;lt;802f7db0&amp;gt;] (do_DataAbort+0x40/0xa8)&lt;br /&gt;
[&amp;lt;802f7d70&amp;gt;] (do_DataAbort+0x0/0xa8) from [&amp;lt;802f5d98&amp;gt;] (__dabt_svc+0x38/0x60)&lt;br /&gt;
 r8:00000000 r7:9f0cde9c r6:ffffffff r5:60000093 r4:801b7dd4&lt;br /&gt;
[&amp;lt;801b7d94&amp;gt;] (sysrq_handle_crash+0x0/0x50) from [&amp;lt;801b85d0&amp;gt;] (__handle_sysrq+0xb0/0x15c)&lt;br /&gt;
[&amp;lt;801b8520&amp;gt;] (__handle_sysrq+0x0/0x15c) from [&amp;lt;801b86b0&amp;gt;] (write_sysrq_trigger+0x34/0x44)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:9f07a960 r5:801b867c r4:00000002&lt;br /&gt;
r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801b867c&amp;gt;] (write_sysrq_trigger+0x0/0x44) from [&amp;lt;80108a84&amp;gt;] (proc_reg_write+0x90/0xa4)&lt;br /&gt;
 r4:9fbaed80 r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801089f4&amp;gt;] (proc_reg_write+0x0/0xa4) from [&amp;lt;800c2f14&amp;gt;] (vfs_write+0xc4/0x150)&lt;br /&gt;
[&amp;lt;800c2e50&amp;gt;] (vfs_write+0x0/0x150) from [&amp;lt;800c3250&amp;gt;] (sys_write+0x54/0x110)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:0005a750 r5:9f07a960 r4:00000002&lt;br /&gt;
[&amp;lt;800c31fc&amp;gt;] (sys_write+0x0/0x110) from [&amp;lt;8000d8c0&amp;gt;] (ret_fast_syscall+0x0/0x30)&lt;br /&gt;
CPU1: stopping&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;80011908&amp;gt;] (dump_backtrace+0x0/0x114) from [&amp;lt;802f2304&amp;gt;] (dump_stack+0x20/0x24)&lt;br /&gt;
 r6:00000006 r5:00000001 r4:00000000 r3:00000000&lt;br /&gt;
[&amp;lt;802f22e4&amp;gt;] (dump_stack+0x0/0x24) from [&amp;lt;80008308&amp;gt;] (do_IPI+0xd8/0x148)&lt;br /&gt;
[&amp;lt;80008230&amp;gt;] (do_IPI+0x0/0x148) from [&amp;lt;802f5df4&amp;gt;] (__irq_svc+0x34/0xd0)&lt;br /&gt;
Exception stack(0x9fb47f68 to 0x9fb47fb0)&lt;br /&gt;
7f60:                   00000000 00000000 f300a000 00000000 9fb46000 80432444&lt;br /&gt;
7f80: 8045d464 802fd754 4000406a 411fc092 00000000 9fb47fbc 8000e660 9fb47fb0&lt;br /&gt;
7fa0: 8000e67c 8000e680 60000013 ffffffff&lt;br /&gt;
 r7:9fb47f9c r6:f0020000 r5:60000013 r4:8000e680&lt;br /&gt;
[&amp;lt;8000e64c&amp;gt;] (default_idle+0x0/0x38) from [&amp;lt;8000e920&amp;gt;] (cpu_idle+0x88/0xcc)&lt;br /&gt;
[&amp;lt;8000e898&amp;gt;] (cpu_idle+0x0/0xcc) from [&amp;lt;802f0130&amp;gt;] (secondary_start_kernel+0x140/0x164)&lt;br /&gt;
 r7:8045d57c r6:10c0387d r5:8043a2f8 r4:00000001&lt;br /&gt;
[&amp;lt;802efff0&amp;gt;] (secondary_start_kernel+0x0/0x164) from [&amp;lt;402efab4&amp;gt;] (0x402efab4)&lt;br /&gt;
 r5:00000015 r4:5fb4806a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Find latencies on kernel startup ===&lt;br /&gt;
It is possible to use ftrace to record functions that exceed a certain amount of time, using&lt;br /&gt;
the 'tracing_thresh' option.&lt;br /&gt;
This can be used for finding routines that are taking a long time&lt;br /&gt;
on kernel startup, to help optimize bootup time:&lt;br /&gt;
&lt;br /&gt;
* Make sure the following kerne configuration options are set:&lt;br /&gt;
** CONFIG_FTRACE: &amp;quot;Tracers&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_TRACER: &amp;quot;Kernel Function Tracer&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_GRAPH_TRACER: &amp;quot;Kernel Function Graph Tracer&amp;quot;&lt;br /&gt;
* Use the following on the kernel command line:&lt;br /&gt;
** tracing_thresh=200 ftrace=function_graph&lt;br /&gt;
*** this traces all functions taking longer than 200 microseconds (.2 ms).  You can use any duration threshhold you want.&lt;br /&gt;
* to get the data:&lt;br /&gt;
** $ mount -t debugfs debugfs /debug&lt;br /&gt;
** $ cat /debug/tracing/trace&lt;br /&gt;
These command should be probably be done programatically (as part of an init script), to avoid data loss&lt;br /&gt;
* scope of operation&lt;br /&gt;
** the tracer starts sometime during initialization, and you only get timings after it starts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== find deepest kernel stack ===&lt;br /&gt;
This is useful to find the routine with the deepest kernel stack&lt;br /&gt;
The system continually monitors the stack depth of all processes, and&lt;br /&gt;
whenever a low-water mark is hit (deepest stack), it records the list&lt;br /&gt;
of functions.&lt;br /&gt;
&lt;br /&gt;
(The following instructions work for a v3.0 Linux kernel)&lt;br /&gt;
* Kernel configuration: Set the following kernel configuration options:&lt;br /&gt;
** CONFIG_FTRACE: &amp;quot;Tracers&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_TRACER: &amp;quot;Kernel Function Tracer&amp;quot;&lt;br /&gt;
** CONFIG_STACK_TRACER: &amp;quot;Trace max stack&amp;quot;&lt;br /&gt;
* Turning it on: You can turn it on at boot time or at runtime.&lt;br /&gt;
** At boot time, use the following on the kernel command line:&lt;br /&gt;
*** stacktrace&lt;br /&gt;
** or, at runtime do:&lt;br /&gt;
*** echo 1 &amp;gt;/proc/sys/kernel/stack_tracer_enabled&lt;br /&gt;
* To get the data:&lt;br /&gt;
** $ mount -t debugfs debugfs /debug&lt;br /&gt;
** $ cat /debug/tracing/stack_trace&lt;br /&gt;
* scope of operation&lt;br /&gt;
** the stack tracer will continue operating until you turn it off, which can be done with:&lt;br /&gt;
*** echo 0 &amp;gt;/proc/sys/kernel/stack_tracer_enabled&lt;br /&gt;
&lt;br /&gt;
=== additional resources ===&lt;br /&gt;
See http://lwn.net/Articles/295955/&lt;br /&gt;
&lt;br /&gt;
=== output ===&lt;br /&gt;
Here is what the output looks like, on ARM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/debug/tracing # cat stack_trace&lt;br /&gt;
        Depth    Size   Location    (42 entries)&lt;br /&gt;
        -----    ----   --------&lt;br /&gt;
  0)     3328      16   ftrace_test_stop_func+0x28/0x34&lt;br /&gt;
  1)     3312      28   __gnu_mcount_nc+0x58/0x60&lt;br /&gt;
  2)     3284      52   skb_release_data+0xc0/0xc8&lt;br /&gt;
  3)     3232      24   __kfree_skb+0x24/0xc0&lt;br /&gt;
  4)     3208      32   consume_skb+0xe4/0xf0&lt;br /&gt;
  5)     3176      56   smsc911x_hard_start_xmit+0x188/0x2f4&lt;br /&gt;
  6)     3120      72   dev_hard_start_xmit+0x440/0x6a4&lt;br /&gt;
  7)     3048      40   sch_direct_xmit+0x8c/0x1f8&lt;br /&gt;
  8)     3008      48   dev_queue_xmit+0x2c8/0x570&lt;br /&gt;
  9)     2960      56   neigh_resolve_output+0x32c/0x390&lt;br /&gt;
 10)     2904      40   ip_finish_output+0x2bc/0x37c&lt;br /&gt;
 11)     2864      32   ip_output+0xb0/0xb8&lt;br /&gt;
 12)     2832      24   ip_local_out+0x38/0x3c&lt;br /&gt;
 13)     2808      32   ip_send_skb+0x18/0xa4&lt;br /&gt;
 14)     2776      56   udp_send_skb+0x274/0x394&lt;br /&gt;
 15)     2720     240   udp_sendmsg+0x4dc/0x748&lt;br /&gt;
 16)     2480      32   inet_sendmsg+0x70/0x7c&lt;br /&gt;
 17)     2448     232   sock_sendmsg+0xa8/0x160&lt;br /&gt;
 18)     2216      32   kernel_sendmsg+0x40/0x48&lt;br /&gt;
 19)     2184      96   xs_send_kvec+0xa8/0xb0&lt;br /&gt;
 20)     2088      64   xs_sendpages+0x90/0x1f8&lt;br /&gt;
 21)     2024      40   xs_udp_send_request+0x4c/0x13c&lt;br /&gt;
 22)     1984      48   xprt_transmit+0x114/0x214&lt;br /&gt;
 23)     1936      40   call_transmit+0x208/0x27c&lt;br /&gt;
 24)     1896      48   __rpc_execute+0x88/0x334&lt;br /&gt;
 25)     1848      24   rpc_execute+0x68/0x70&lt;br /&gt;
 26)     1824      24   rpc_run_task+0xa8/0xb4&lt;br /&gt;
 27)     1800      64   rpc_call_sync+0x68/0x90&lt;br /&gt;
 28)     1736      32   nfs_rpc_wrapper.clone.6+0x3c/0x7c&lt;br /&gt;
 29)     1704      48   nfs_proc_getattr+0x70/0xac&lt;br /&gt;
 30)     1656      48   __nfs_revalidate_inode+0xe4/0x1f8&lt;br /&gt;
 31)     1608      56   nfs_lookup_revalidate+0x1ac/0x40c&lt;br /&gt;
 32)     1552      72   do_lookup+0x228/0x2e4&lt;br /&gt;
 33)     1480      72   do_last.clone.44+0x10c/0x688&lt;br /&gt;
 34)     1408      88   path_openat+0x2fc/0x394&lt;br /&gt;
 35)     1320     144   do_filp_open+0x40/0x8c&lt;br /&gt;
 36)     1176      40   open_exec+0x2c/0xc0&lt;br /&gt;
 37)     1136     136   load_elf_binary+0x1cc/0x12b8&lt;br /&gt;
 38)     1000      72   search_binary_handler+0x150/0x3a0&lt;br /&gt;
 39)      928      56   do_execve+0x170/0x328&lt;br /&gt;
 40)      872      32   sys_execve+0x44/0x64&lt;br /&gt;
 41)      840     840   ret_fast_syscall+0x0/0x30&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux tracing]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Ftrace</id>
		<title>Ftrace</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Ftrace"/>
				<updated>2013-03-21T18:22:08Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* find deepest kernel stack */  refine instructions&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Ftrace is the Linux kernel internal tracer that was included in the Linux kernel in 2.6.27.&lt;br /&gt;
Although Ftrace is named after the function tracer it also includes many more functionalities.&lt;br /&gt;
But the function tracer is the part of Ftrace that makes it unique as you can trace almost&lt;br /&gt;
any function in the kernel and with dynamic Ftrace, it has no overhead when not enabled.&lt;br /&gt;
&lt;br /&gt;
The interface for Ftrace resides in the debugfs file system in the tracing directory.&lt;br /&gt;
Documentation for this can be found in the Linux kernel source tree at&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/trace/ftrace.txt; Documentation/trace/ftrace.txt].&lt;br /&gt;
&lt;br /&gt;
== trace-cmd ==&lt;br /&gt;
&lt;br /&gt;
Using the Ftrace debugfs interface can be awkward and time consuming. trace-cmd was&lt;br /&gt;
created to interface with Ftrace using a binary tool which comes with full documentation&lt;br /&gt;
in man pages.&lt;br /&gt;
&lt;br /&gt;
Here's some examples of trace-cmd:&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd record -e sched myprogram&lt;br /&gt;
&lt;br /&gt;
The above will enable all the Ftrace tracepoints that are grouped under the sched&lt;br /&gt;
system. You can find these tracepoints by looking at the debugfs system:&lt;br /&gt;
&lt;br /&gt;
 # mount -t debugfs nodev /sys/kernel/debug&lt;br /&gt;
 # ls /sys/kernel/debug/tracing/events/sched&lt;br /&gt;
 enable                  sched_process_fork  sched_stat_sleep&lt;br /&gt;
 filter                  sched_process_free  sched_stat_wait&lt;br /&gt;
 sched_kthread_stop      sched_process_wait  sched_switch&lt;br /&gt;
 sched_kthread_stop_ret  sched_signal_send   sched_wait_task&lt;br /&gt;
 sched_migrate_task      sched_stat_iowait   sched_wakeup&lt;br /&gt;
 sched_process_exit      sched_stat_runtime  sched_wakeup_new&lt;br /&gt;
&lt;br /&gt;
trace-cmd allows you to see the possible events without needing to look at this directory&lt;br /&gt;
as well.&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd list -e | grep sched:&lt;br /&gt;
 sched:sched_kthread_stop&lt;br /&gt;
 sched:sched_kthread_stop_ret&lt;br /&gt;
 sched:sched_wait_task&lt;br /&gt;
 sched:sched_wakeup&lt;br /&gt;
 sched:sched_wakeup_new&lt;br /&gt;
 sched:sched_switch&lt;br /&gt;
 sched:sched_migrate_task&lt;br /&gt;
 sched:sched_process_free&lt;br /&gt;
 sched:sched_process_exit&lt;br /&gt;
 sched:sched_process_wait&lt;br /&gt;
 sched:sched_process_fork&lt;br /&gt;
 sched:sched_signal_send&lt;br /&gt;
 sched:sched_stat_wait&lt;br /&gt;
 sched:sched_stat_runtime&lt;br /&gt;
 sched:sched_stat_sleep&lt;br /&gt;
 sched:sched_stat_iowait&lt;br /&gt;
&lt;br /&gt;
You can find trace-cmd in its [http://git.kernel.org/?p=linux/kernel/git/rostedt/trace-cmd.git;a=summary git]&lt;br /&gt;
repository.&lt;br /&gt;
&lt;br /&gt;
Also within that same repository is KernelShark, which is a graphical user interface to trace-cmd. trace-cmd&lt;br /&gt;
is built with just &amp;quot;make&amp;quot; and KernelShark is created with &amp;quot;make gui&amp;quot;. This allows building trace-cmd on&lt;br /&gt;
your embedded device and keeping the build from needing the GTK libraries required by KernelShark.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tips ==&lt;br /&gt;
=== Tracing a specific process with the Ftrace interface ===&lt;br /&gt;
(Adapted from email by Steven Rostedt)&lt;br /&gt;
To trace just the kernel functions executed in the context of a particular function,&lt;br /&gt;
set the pseudo-variable 'set-ftrace-pid', to the process id (pid) of the process.&lt;br /&gt;
&lt;br /&gt;
If the process is not already running, you can use a wrapper shell script and the&lt;br /&gt;
'exec' command, to execute a command as a known pid.&lt;br /&gt;
&lt;br /&gt;
Like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
echo $$ &amp;gt; /debug/tracing/set_ftrace_pid&lt;br /&gt;
# can set other filtering here&lt;br /&gt;
echo function &amp;gt; /debug/tracing/current_tracer&lt;br /&gt;
exec $*&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In this example, '$$' is the pid of the currently executing process (the shell&lt;br /&gt;
script.  This is set into the 'set_ftrace_pid' variable, then the 'function'&lt;br /&gt;
tracer is enabled.  Then this script exec's the command (specified by the first&lt;br /&gt;
argument to the script).&lt;br /&gt;
&lt;br /&gt;
Example usage (assuming script is called 'trace_command'):&lt;br /&gt;
 trace_command ls&lt;br /&gt;
&lt;br /&gt;
=== Tracing a specific process with trace-cmd ===&lt;br /&gt;
&lt;br /&gt;
 # trace-cmd record -p function -F ls&lt;br /&gt;
&lt;br /&gt;
=== Capturing an oops (from startup) to the serial console ===&lt;br /&gt;
You can capture the function calls leading up to a panic&lt;br /&gt;
by placing the following on the kernel command line:&lt;br /&gt;
&lt;br /&gt;
 ftrace=function ftrace_dump_on_oops&lt;br /&gt;
&lt;br /&gt;
''Note: You can also use 'ftrace=function_graph' if you would prefer that instead.''&lt;br /&gt;
&lt;br /&gt;
The ftrace documentation, in Documentation/trace/ftrace.txt mentions how to set&lt;br /&gt;
ftrace_dump_on_oops in a running system, but I have found it very handy to have&lt;br /&gt;
it configured to dump the trace from kernel startup, so that any panics that occur&lt;br /&gt;
during boot (before user-space is started) are also captured.&lt;br /&gt;
&lt;br /&gt;
Note that the output will be VERY long.  Please be patient.&lt;br /&gt;
&lt;br /&gt;
The output will look something like the following:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     ash-56      0d..2. 159400967us : _raw_spin_lock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..2. 159400972us : __raw_spin_lock &amp;lt;-_raw_spin_lock&lt;br /&gt;
     ash-56      0d..2. 159400974us : add_preempt_count &amp;lt;-__raw_spin_lock&lt;br /&gt;
     ash-56      0d..3. 159400978us : log_prefix &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400979us : emit_log_char &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400981us : console_trylock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400983us : down_trylock &amp;lt;-console_trylock&lt;br /&gt;
     ash-56      0d..3. 159400985us : _raw_spin_lock_irqsave &amp;lt;-down_trylock&lt;br /&gt;
     ash-56      0d..3. 159400987us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159400989us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..4. 159400991us : _raw_spin_unlock_irqrestore &amp;lt;-down_trylock&lt;br /&gt;
     ash-56      0d..4. 159400993us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..3. 159400994us : _raw_spin_unlock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..3. 159400997us : sub_preempt_count &amp;lt;-_raw_spin_unlock&lt;br /&gt;
     ash-56      0d..2. 159400999us : console_unlock &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..2. 159401000us : _raw_spin_lock_irqsave &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401002us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..2. 159401004us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401006us : _raw_spin_unlock &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401008us : sub_preempt_count &amp;lt;-_raw_spin_unlock&lt;br /&gt;
     ash-56      0d..2. 159401010us : _call_console_drivers &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401012us : _call_console_drivers &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401014us : _raw_spin_lock_irqsave &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401015us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..2. 159401017us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401019us : up &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401021us : _raw_spin_lock_irqsave &amp;lt;-up&lt;br /&gt;
     ash-56      0d..3. 159401023us : __raw_spin_lock_irqsave &amp;lt;-_raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..3. 159401024us : add_preempt_count &amp;lt;-__raw_spin_lock_irqsave&lt;br /&gt;
     ash-56      0d..4. 159401027us : _raw_spin_unlock_irqrestore &amp;lt;-up&lt;br /&gt;
     ash-56      0d..4. 159401029us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..3. 159401031us : _raw_spin_unlock_irqrestore &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..3. 159401033us : sub_preempt_count &amp;lt;-_raw_spin_unlock_irqrestore&lt;br /&gt;
     ash-56      0d..2. 159401034us : wake_up_klogd &amp;lt;-console_unlock&lt;br /&gt;
     ash-56      0d..2. 159401037us : sub_preempt_count &amp;lt;-vprintk&lt;br /&gt;
     ash-56      0d..1. 159401039us : die &amp;lt;-__do_kernel_fault&lt;br /&gt;
     ash-56      0d..1. 159401041us : oops_enter &amp;lt;-die&lt;br /&gt;
---------------------------------&lt;br /&gt;
Modules linked in:&lt;br /&gt;
CPU: 0    Not tainted  (3.0.27_nl-kzm-a9-rt46-00022-g5e35327 #2)&lt;br /&gt;
PC is at sysrq_handle_crash+0x40/0x50&lt;br /&gt;
LR is at _raw_spin_unlock_irqrestore+0x34/0x54&lt;br /&gt;
pc : [&amp;lt;801b7dd4&amp;gt;]    lr : [&amp;lt;802f5420&amp;gt;]    psr: 60000093&lt;br /&gt;
sp : 9f0cdeb0  ip : 802f7ed4  fp : 9f0cdebc&lt;br /&gt;
r10: 9f0cdf68  r9 : 9fbaedc8  r8 : 00000000&lt;br /&gt;
r7 : 60000013  r6 : 00000063  r5 : 00000001  r4 : 8044b890&lt;br /&gt;
r3 : 00000000  r2 : 00000001  r1 : 20000093  r0 : 00000001&lt;br /&gt;
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment user&lt;br /&gt;
Control: 10c5787d  Table: 5f11c04a  DAC: 00000015&lt;br /&gt;
Process ash (pid: 56, stack limit = 0x9f0cc2f0)&lt;br /&gt;
Stack: (0x9f0cdeb0 to 0x9f0ce000)&lt;br /&gt;
dea0:                                     9f0cdee4 9f0cdec0 801b85d0 801b7da0&lt;br /&gt;
dec0: 9f0cdf68 00000002 801b867c 9f07a960 00000002 2ad20000 9f0cdefc 9f0cdee8&lt;br /&gt;
dee0: 801b86b0 801b852c 9f0cdf68 9fbaed80 9f0cdf2c 9f0cdf00 80108a84 801b8688&lt;br /&gt;
df00: 9f0cdf68 00000002 9f07a960 2ad20000 9f0cdf68 2ad20000 00000001 00000000&lt;br /&gt;
df20: 9f0cdf5c 9f0cdf30 800c2f14 80108a00 00000002 00000889 800c4978 00000002&lt;br /&gt;
df40: 9f07a960 0005a750 00000002 2ad20000 9f0cdfa4 9f0cdf60 800c3250 800c2e5c&lt;br /&gt;
df60: 00020001 0004423c 00000000 00000000 9f0cc000 00000000 9f0cdfa4 00000002&lt;br /&gt;
df80: 2ad20000 0005a750 00000004 8000db24 9f0cc000 00000000 00000000 9f0cdfa8&lt;br /&gt;
dfa0: 8000d8c0 800c3208 00000002 2ad20000 00000001 2ad20000 00000002 00000889&lt;br /&gt;
dfc0: 00000002 2ad20000 0005a750 00000004 00000001 00000000 2ad093b8 7e8766d4&lt;br /&gt;
dfe0: 00000000 7e8766c0 2ac20f08 2ac023ec 40000010 00000001 00000000 00000000&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;801b7d94&amp;gt;] (sysrq_handle_crash+0x0/0x50) from [&amp;lt;801b85d0&amp;gt;] (__handle_sysrq+0xb0/0x15c)&lt;br /&gt;
[&amp;lt;801b8520&amp;gt;] (__handle_sysrq+0x0/0x15c) from [&amp;lt;801b86b0&amp;gt;] (write_sysrq_trigger+0x34/0x44)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:9f07a960 r5:801b867c r4:00000002&lt;br /&gt;
r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801b867c&amp;gt;] (write_sysrq_trigger+0x0/0x44) from [&amp;lt;80108a84&amp;gt;] (proc_reg_write+0x90/0xa4)&lt;br /&gt;
 r4:9fbaed80 r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801089f4&amp;gt;] (proc_reg_write+0x0/0xa4) from [&amp;lt;800c2f14&amp;gt;] (vfs_write+0xc4/0x150)&lt;br /&gt;
[&amp;lt;800c2e50&amp;gt;] (vfs_write+0x0/0x150) from [&amp;lt;800c3250&amp;gt;] (sys_write+0x54/0x110)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:0005a750 r5:9f07a960 r4:00000002&lt;br /&gt;
[&amp;lt;800c31fc&amp;gt;] (sys_write+0x0/0x110) from [&amp;lt;8000d8c0&amp;gt;] (ret_fast_syscall+0x0/0x30)&lt;br /&gt;
Code: 0a000000 e12fff33 e3a03000 e3a02001 (e5c32000)&lt;br /&gt;
---[ end trace feb441c6e3b9c3f1 ]---&lt;br /&gt;
Kernel panic - not syncing: Fatal exception&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;80011908&amp;gt;] (dump_backtrace+0x0/0x114) from [&amp;lt;802f2304&amp;gt;] (dump_stack+0x20/0x24)&lt;br /&gt;
 r6:9f0cdd1c r5:8039bb64 r4:8045dc40 r3:00000002&lt;br /&gt;
[&amp;lt;802f22e4&amp;gt;] (dump_stack+0x0/0x24) from [&amp;lt;802f2404&amp;gt;] (panic+0xfc/0x220)&lt;br /&gt;
[&amp;lt;802f2308&amp;gt;] (panic+0x0/0x220) from [&amp;lt;80011dd4&amp;gt;] (die+0x18c/0x1d0)&lt;br /&gt;
 r3:00000001 r2:9f0cdd28 r1:20000113 r0:8039bb64&lt;br /&gt;
 r7:00000001&lt;br /&gt;
[&amp;lt;80011c48&amp;gt;] (die+0x0/0x1d0) from [&amp;lt;80014edc&amp;gt;] (__do_kernel_fault+0x74/0x94)&lt;br /&gt;
 r8:00000000 r7:9f0cde68 r6:9f0c1d40 r5:00000817 r4:00000000&lt;br /&gt;
[&amp;lt;80014e68&amp;gt;] (__do_kernel_fault+0x0/0x94) from [&amp;lt;802f7ca0&amp;gt;] (do_page_fault+0x254/0x274)&lt;br /&gt;
 r8:00000817 r7:9f0c1d40 r6:9f06d5e0 r5:00000000 r4:9f0cde68&lt;br /&gt;
r3:9f0cde68&lt;br /&gt;
[&amp;lt;802f7a4c&amp;gt;] (do_page_fault+0x0/0x274) from [&amp;lt;802f7db0&amp;gt;] (do_DataAbort+0x40/0xa8)&lt;br /&gt;
[&amp;lt;802f7d70&amp;gt;] (do_DataAbort+0x0/0xa8) from [&amp;lt;802f5d98&amp;gt;] (__dabt_svc+0x38/0x60)&lt;br /&gt;
 r8:00000000 r7:9f0cde9c r6:ffffffff r5:60000093 r4:801b7dd4&lt;br /&gt;
[&amp;lt;801b7d94&amp;gt;] (sysrq_handle_crash+0x0/0x50) from [&amp;lt;801b85d0&amp;gt;] (__handle_sysrq+0xb0/0x15c)&lt;br /&gt;
[&amp;lt;801b8520&amp;gt;] (__handle_sysrq+0x0/0x15c) from [&amp;lt;801b86b0&amp;gt;] (write_sysrq_trigger+0x34/0x44)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:9f07a960 r5:801b867c r4:00000002&lt;br /&gt;
r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801b867c&amp;gt;] (write_sysrq_trigger+0x0/0x44) from [&amp;lt;80108a84&amp;gt;] (proc_reg_write+0x90/0xa4)&lt;br /&gt;
 r4:9fbaed80 r3:9f0cdf68&lt;br /&gt;
[&amp;lt;801089f4&amp;gt;] (proc_reg_write+0x0/0xa4) from [&amp;lt;800c2f14&amp;gt;] (vfs_write+0xc4/0x150)&lt;br /&gt;
[&amp;lt;800c2e50&amp;gt;] (vfs_write+0x0/0x150) from [&amp;lt;800c3250&amp;gt;] (sys_write+0x54/0x110)&lt;br /&gt;
 r8:2ad20000 r7:00000002 r6:0005a750 r5:9f07a960 r4:00000002&lt;br /&gt;
[&amp;lt;800c31fc&amp;gt;] (sys_write+0x0/0x110) from [&amp;lt;8000d8c0&amp;gt;] (ret_fast_syscall+0x0/0x30)&lt;br /&gt;
CPU1: stopping&lt;br /&gt;
Backtrace:&lt;br /&gt;
[&amp;lt;80011908&amp;gt;] (dump_backtrace+0x0/0x114) from [&amp;lt;802f2304&amp;gt;] (dump_stack+0x20/0x24)&lt;br /&gt;
 r6:00000006 r5:00000001 r4:00000000 r3:00000000&lt;br /&gt;
[&amp;lt;802f22e4&amp;gt;] (dump_stack+0x0/0x24) from [&amp;lt;80008308&amp;gt;] (do_IPI+0xd8/0x148)&lt;br /&gt;
[&amp;lt;80008230&amp;gt;] (do_IPI+0x0/0x148) from [&amp;lt;802f5df4&amp;gt;] (__irq_svc+0x34/0xd0)&lt;br /&gt;
Exception stack(0x9fb47f68 to 0x9fb47fb0)&lt;br /&gt;
7f60:                   00000000 00000000 f300a000 00000000 9fb46000 80432444&lt;br /&gt;
7f80: 8045d464 802fd754 4000406a 411fc092 00000000 9fb47fbc 8000e660 9fb47fb0&lt;br /&gt;
7fa0: 8000e67c 8000e680 60000013 ffffffff&lt;br /&gt;
 r7:9fb47f9c r6:f0020000 r5:60000013 r4:8000e680&lt;br /&gt;
[&amp;lt;8000e64c&amp;gt;] (default_idle+0x0/0x38) from [&amp;lt;8000e920&amp;gt;] (cpu_idle+0x88/0xcc)&lt;br /&gt;
[&amp;lt;8000e898&amp;gt;] (cpu_idle+0x0/0xcc) from [&amp;lt;802f0130&amp;gt;] (secondary_start_kernel+0x140/0x164)&lt;br /&gt;
 r7:8045d57c r6:10c0387d r5:8043a2f8 r4:00000001&lt;br /&gt;
[&amp;lt;802efff0&amp;gt;] (secondary_start_kernel+0x0/0x164) from [&amp;lt;402efab4&amp;gt;] (0x402efab4)&lt;br /&gt;
 r5:00000015 r4:5fb4806a&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Find latencies on kernel startup ===&lt;br /&gt;
It is possible to use ftrace to record functions that exceed a certain amount of time, using&lt;br /&gt;
the 'tracing_thresh' option.&lt;br /&gt;
This can be used for finding routines that are taking a long time&lt;br /&gt;
on kernel startup, to help optimize bootup time:&lt;br /&gt;
&lt;br /&gt;
* Make sure the following kerne configuration options are set:&lt;br /&gt;
** CONFIG_FTRACE: &amp;quot;Tracers&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_TRACER: &amp;quot;Kernel Function Tracer&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_GRAPH_TRACER: &amp;quot;Kernel Function Graph Tracer&amp;quot;&lt;br /&gt;
* Use the following on the kernel command line:&lt;br /&gt;
** tracing_thresh=200 ftrace=function_graph&lt;br /&gt;
*** this traces all functions taking longer than 200 microseconds (.2 ms).  You can use any duration threshhold you want.&lt;br /&gt;
* to get the data:&lt;br /&gt;
** $ mount -t debugfs debugfs /debug&lt;br /&gt;
** $ cat /debug/tracing/trace&lt;br /&gt;
These command should be probably be done programatically (as part of an init script), to avoid data loss&lt;br /&gt;
* scope of operation&lt;br /&gt;
** the tracer starts sometime during initialization, and you only get timings after it starts&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== find deepest kernel stack ===&lt;br /&gt;
This is useful to find the routine with the deepest kernel stack&lt;br /&gt;
The system continually monitors the stack depth of all processes, and&lt;br /&gt;
whenever a low-water mark is hit (deepest stack), it records the list&lt;br /&gt;
of functions.&lt;br /&gt;
&lt;br /&gt;
(The following instructions work for a v3.0 Linux kernel)&lt;br /&gt;
* Kernel configuration: Set the following kernel configuration options:&lt;br /&gt;
** CONFIG_FTRACE: &amp;quot;Tracers&amp;quot;&lt;br /&gt;
** CONFIG_FUNCTION_TRACER: &amp;quot;Kernel Function Tracer&amp;quot;&lt;br /&gt;
** CONFIG_STACK_TRACER: &amp;quot;Trace max stack&amp;quot;&lt;br /&gt;
* Turning it on: You can turn it on at boot time or at runtime.&lt;br /&gt;
** At boot time, use the following on the kernel command line:&lt;br /&gt;
*** stacktrace&lt;br /&gt;
** or, at runtime do:&lt;br /&gt;
*** echo 1 &amp;gt;/proc/sys/kernel/stack_tracer_enabled&lt;br /&gt;
* To get the data:&lt;br /&gt;
** $ mount -t debugfs debugfs /debug&lt;br /&gt;
** $ cat /debug/tracing/stack_trace&lt;br /&gt;
* scope of operation&lt;br /&gt;
** the stack tracer will continue operating until you turn it off, which can be done with:&lt;br /&gt;
*** echo 0 &amp;gt;/proc/sys/kernel/stack_tracer_enabled&lt;br /&gt;
&lt;br /&gt;
Here is what the output looks like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/debug/tracing # cat stack_trace&lt;br /&gt;
        Depth    Size   Location    (42 entries)&lt;br /&gt;
        -----    ----   --------&lt;br /&gt;
  0)     3328      16   ftrace_test_stop_func+0x28/0x34&lt;br /&gt;
  1)     3312      28   __gnu_mcount_nc+0x58/0x60&lt;br /&gt;
  2)     3284      52   skb_release_data+0xc0/0xc8&lt;br /&gt;
  3)     3232      24   __kfree_skb+0x24/0xc0&lt;br /&gt;
  4)     3208      32   consume_skb+0xe4/0xf0&lt;br /&gt;
  5)     3176      56   smsc911x_hard_start_xmit+0x188/0x2f4&lt;br /&gt;
  6)     3120      72   dev_hard_start_xmit+0x440/0x6a4&lt;br /&gt;
  7)     3048      40   sch_direct_xmit+0x8c/0x1f8&lt;br /&gt;
  8)     3008      48   dev_queue_xmit+0x2c8/0x570&lt;br /&gt;
  9)     2960      56   neigh_resolve_output+0x32c/0x390&lt;br /&gt;
 10)     2904      40   ip_finish_output+0x2bc/0x37c&lt;br /&gt;
 11)     2864      32   ip_output+0xb0/0xb8&lt;br /&gt;
 12)     2832      24   ip_local_out+0x38/0x3c&lt;br /&gt;
 13)     2808      32   ip_send_skb+0x18/0xa4&lt;br /&gt;
 14)     2776      56   udp_send_skb+0x274/0x394&lt;br /&gt;
 15)     2720     240   udp_sendmsg+0x4dc/0x748&lt;br /&gt;
 16)     2480      32   inet_sendmsg+0x70/0x7c&lt;br /&gt;
 17)     2448     232   sock_sendmsg+0xa8/0x160&lt;br /&gt;
 18)     2216      32   kernel_sendmsg+0x40/0x48&lt;br /&gt;
 19)     2184      96   xs_send_kvec+0xa8/0xb0&lt;br /&gt;
 20)     2088      64   xs_sendpages+0x90/0x1f8&lt;br /&gt;
 21)     2024      40   xs_udp_send_request+0x4c/0x13c&lt;br /&gt;
 22)     1984      48   xprt_transmit+0x114/0x214&lt;br /&gt;
 23)     1936      40   call_transmit+0x208/0x27c&lt;br /&gt;
 24)     1896      48   __rpc_execute+0x88/0x334&lt;br /&gt;
 25)     1848      24   rpc_execute+0x68/0x70&lt;br /&gt;
 26)     1824      24   rpc_run_task+0xa8/0xb4&lt;br /&gt;
 27)     1800      64   rpc_call_sync+0x68/0x90&lt;br /&gt;
 28)     1736      32   nfs_rpc_wrapper.clone.6+0x3c/0x7c&lt;br /&gt;
 29)     1704      48   nfs_proc_getattr+0x70/0xac&lt;br /&gt;
 30)     1656      48   __nfs_revalidate_inode+0xe4/0x1f8&lt;br /&gt;
 31)     1608      56   nfs_lookup_revalidate+0x1ac/0x40c&lt;br /&gt;
 32)     1552      72   do_lookup+0x228/0x2e4&lt;br /&gt;
 33)     1480      72   do_last.clone.44+0x10c/0x688&lt;br /&gt;
 34)     1408      88   path_openat+0x2fc/0x394&lt;br /&gt;
 35)     1320     144   do_filp_open+0x40/0x8c&lt;br /&gt;
 36)     1176      40   open_exec+0x2c/0xc0&lt;br /&gt;
 37)     1136     136   load_elf_binary+0x1cc/0x12b8&lt;br /&gt;
 38)     1000      72   search_binary_handler+0x150/0x3a0&lt;br /&gt;
 39)      928      56   do_execve+0x170/0x328&lt;br /&gt;
 40)      872      32   sys_execve+0x44/0x64&lt;br /&gt;
 41)      840     840   ret_fast_syscall+0x0/0x30&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux tracing]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Android_Intro</id>
		<title>Android Intro</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Android_Intro"/>
				<updated>2013-03-19T17:08:49Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Overview ==&lt;br /&gt;
&lt;br /&gt;
Android is a software platform and operating system written by Google and the Open Handset Alliance, designed for use in small form factor devices and smartphones.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Google_Android Android wikipedia entry] is a really good place to get an overview of Android capabilities, history and direction.  I won't duplicate the information from that site here.&lt;br /&gt;
&lt;br /&gt;
The official web site for Android is http://www.android.com/.   From here you can find links to:&lt;br /&gt;
* [http://www.android.com/market/ Android Market] - This is the place where developers can post (for free or for sale) applications to run on Android-based devices, and where users can download these applications.&lt;br /&gt;
* [http://developer.android.com/index.html Android Developer Site] - Where software developers can learn how to write applications for Android devices, or modify aspects of the Android software itself.&lt;br /&gt;
* [http://source.android.com/ Android Open Source Project] - This is where you can find the source code for the Android operating system (including Linux kernel, the libraries, Dalvik VM and rest of the Android system.)&lt;br /&gt;
* [https://training.linuxfoundation.org/free-linux-training/download-training-materials/growth-of-android-in-embedded-systems The Growth of Android in Embedded Systems] - This Linux Training publication has some excellent material on the current (as of early 2013) status of Android as it relates to traditional embedded linux.&lt;br /&gt;
&lt;br /&gt;
Clicking on the &amp;quot;What is Android&amp;quot; tab takes you to: http://www.android.com/about/, which has some high-level bullet points, and a video with a little bit of Android history.&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
=== Prototype Video ===&lt;br /&gt;
In November, 2007, Google released a video showing some of the features of their early prototype work on Android.&lt;br /&gt;
See http://www.youtube.com/watch?v=1FJHYqE0RDg&lt;br /&gt;
&lt;br /&gt;
=== G1 Product Video ===&lt;br /&gt;
The first phone product based on Android was the G1, manufactured by HTC and shipped by T-Mobile.&lt;br /&gt;
&lt;br /&gt;
The G1 home page is at: http://www.t-mobileg1.com/.  This site contains many videos and voiceovers&lt;br /&gt;
describing G1 and Android features.&lt;br /&gt;
&lt;br /&gt;
Engadget Hand's-on walkthrough of G1 features (September, 2008)&lt;br /&gt;
http://www.engadget.com/2008/09/23/video-android-walkthrough-on-t-mobile-g1/&lt;br /&gt;
&lt;br /&gt;
== Technical Information ==&lt;br /&gt;
A good place to start, for technical information, is Google's&lt;br /&gt;
[http://developer.android.com/guide/basics/what-is-android.html|&amp;quot;What is Android?&amp;quot; page ]&lt;br /&gt;
&lt;br /&gt;
Another good place with technical information is [http://android-dls.com/wiki/index.php?title=Android_FAQ Android FAQ]&lt;br /&gt;
&lt;br /&gt;
Also, go to [[Android Architecture]] on this site.&lt;br /&gt;
&lt;br /&gt;
[[Category:Android]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Debugging_by_printing</id>
		<title>Debugging by printing</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Debugging_by_printing"/>
				<updated>2013-03-18T20:03:34Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Using CONFIG_DEBUG_LL and printascii() (ARM only) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Probably the simplest way to get some debug information from your kernel code is by printing out various information with the kernel's equivalent of printf - the printk function and its derivatives.&lt;br /&gt;
The k in printk is used to specifically remind kernel developers that the environment is different. &lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
printk works more or less the same way as printf in userspace, so if you ever debugged your userspace program using printf, you are ready to do the same with your kernel code, e.g. by adding:&lt;br /&gt;
 printk(&amp;quot;My Debugger is Printk\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
This wasn't that difficult, was it?&lt;br /&gt;
&lt;br /&gt;
Usually you would print out some more interesting information like&lt;br /&gt;
 printk(&amp;quot;Var1 %d var2 %d\n&amp;quot;, var1, var2);&lt;br /&gt;
just like in userspace.&lt;br /&gt;
&lt;br /&gt;
In order to see the kernel messages, just use the&lt;br /&gt;
 $ dmesg&lt;br /&gt;
command in one of your shells - this one will print out the whole kernel log&lt;br /&gt;
buffer to you.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Most of the conversion specifiers supported by the user-space library routine printf() are also available in the kernel; there are some notable additions, including &amp;quot;%pf&amp;quot;, which will print the symbol name in place of the numeric pointer value, if available.&lt;br /&gt;
&lt;br /&gt;
The supported format strings are quite extensively documented in&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/printk-formats.txt;hb=HEAD Documentation/printk-formats.txt]&lt;br /&gt;
&lt;br /&gt;
However please '''note''': always use ''%zu'', ''%zd'' or ''%zx'' for printing&lt;br /&gt;
''size_t'' and ''ssize_t'' values. ssize_t and size_t are quite common values in the kernel, so&lt;br /&gt;
please use the ''%z'' to avoid annoying compile warnings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Author's practical advice:'''&amp;lt;br&amp;gt;&lt;br /&gt;
If you want to debug an oops (e.g caused by releasing a resource twice) in your driver and you don't have a clue where the oops happens, simply add this line&lt;br /&gt;
 printk(KERN_ALERT &amp;quot;DEBUG: Passed %s %d \n&amp;quot;,__FUNCTION__,__LINE__);&lt;br /&gt;
after each possibly offending statement.&lt;br /&gt;
Recompile and (re-)load the module and trigger the error condition - your log now shows you the last line that was successfully executed before the oops happened.&lt;br /&gt;
&lt;br /&gt;
Of course you should '''remove''' these 'rude' statements before shipping your module ;)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Log Levels ==&lt;br /&gt;
If you look into real kernel code you will always see something like:&lt;br /&gt;
 printk(KERN_ERR &amp;quot;something went wrong, return code: %d\n&amp;quot;,ret);&lt;br /&gt;
&lt;br /&gt;
where &amp;quot;''KERN_ERR''&amp;quot; is one of the eight different log levels defined in&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/linux/printk.h;hb=HEAD include/linux/printk.h] and specifes the severity of the error message.&lt;br /&gt;
&lt;br /&gt;
Note that there is '''NO''' comma between the ''KERN_ERR'' and the format string (as the preprocessor concatenates both strings)&lt;br /&gt;
&lt;br /&gt;
The log levels are:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!Name&lt;br /&gt;
!String&lt;br /&gt;
!Meaning&lt;br /&gt;
!alias function&lt;br /&gt;
|-&lt;br /&gt;
|KERN_EMERG&lt;br /&gt;
|&amp;quot;&amp;lt;0&amp;gt;&amp;quot;&lt;br /&gt;
|Emergency messages, system is about to crash or is unstable&lt;br /&gt;
|pr_emerg&lt;br /&gt;
|-&lt;br /&gt;
|KERN_ALERT&lt;br /&gt;
|&amp;quot;&amp;lt;1&amp;gt;&amp;quot;&lt;br /&gt;
|Something bad happened and action must be taken immediately&lt;br /&gt;
|pr_alert&lt;br /&gt;
|-&lt;br /&gt;
|KERN_CRIT&lt;br /&gt;
|&amp;quot;&amp;lt;2&amp;gt;&amp;quot;&lt;br /&gt;
|A critical condition occurred like a serious hardware/software failure&lt;br /&gt;
|pr_crit&lt;br /&gt;
|-&lt;br /&gt;
|KERN_ERR&lt;br /&gt;
| &amp;quot;&amp;lt;3&amp;gt;&amp;quot;&lt;br /&gt;
|An error condition, often used by drivers to indicate difficulties with the hardware&lt;br /&gt;
|pr_err&lt;br /&gt;
|-&lt;br /&gt;
|KERN_WARNING&lt;br /&gt;
|&amp;quot;&amp;lt;4&amp;gt;&amp;quot;&lt;br /&gt;
|A warning, meaning nothing serious by itself but might indicate problems&lt;br /&gt;
|pr_warning&lt;br /&gt;
|-&lt;br /&gt;
|KERN_NOTICE&lt;br /&gt;
|&amp;quot;&amp;lt;5&amp;gt;&amp;quot;&lt;br /&gt;
|Nothing serious, but notably nevertheless. Often used to report security events.&lt;br /&gt;
|pr_notice&lt;br /&gt;
|-&lt;br /&gt;
|KERN_INFO&lt;br /&gt;
|&amp;quot;&amp;lt;6&amp;gt;&amp;quot;&lt;br /&gt;
|Informational message e.g. startup information at driver initialization&lt;br /&gt;
|pr_info&lt;br /&gt;
|-&lt;br /&gt;
|KERN_DEBUG&lt;br /&gt;
|&amp;quot;&amp;lt;7&amp;gt;&amp;quot;&lt;br /&gt;
|Debug messages&lt;br /&gt;
|pr_debug, pr_devel if DEBUG is defined&lt;br /&gt;
|-&lt;br /&gt;
|KERN_CONT&lt;br /&gt;
|&amp;quot;&amp;lt;c&amp;gt;&amp;quot;&lt;br /&gt;
|&amp;quot;continued&amp;quot; line of log printout (only done after a line that had no enclosing \n) [http://lwn.net/Articles/252651/]&lt;br /&gt;
|pr_cont&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The pr_* macros (with exception of pr_debug) are simple shorthand definitions&lt;br /&gt;
in ''include/linux/printk.h''&lt;br /&gt;
for their respective printk call and should probably be used in newer drivers.&lt;br /&gt;
&lt;br /&gt;
''pr_devel'' and ''pr_debug'' are replaced with ''printk(KERN_DEBUG ...'' if the kernel was&lt;br /&gt;
compiled with ''DEBUG'', otherwise replaced with an empty statement.&lt;br /&gt;
&lt;br /&gt;
For drivers the pr_debug should not be used anymore (use dev_dbg instead).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you don't specify a log level in your message it defaults to&lt;br /&gt;
''DEFAULT_MESSAGE_LOGLEVEL'' (usually ''&amp;quot;&amp;lt;4&amp;gt;&amp;quot;''=''KERN_WARNING'')&lt;br /&gt;
which can be set via the ''CONFIG_DEFAULT_MESSAGE_LOGLEVEL'' kernel config&lt;br /&gt;
option (''make menuconfig-&amp;gt; Kernel Hacking -&amp;gt; Default message log level'')&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The log level is used by the kernel to determine the importance of&lt;br /&gt;
a message and to decide whether it should be presented to the user&lt;br /&gt;
immediately, by printing it to the current console (where console could also&lt;br /&gt;
be a serial line or even a printer, not an xterm).&lt;br /&gt;
&lt;br /&gt;
For this the kernel compares the log level of the message to the&lt;br /&gt;
''console_loglevel'' (a kernel variable) and if the priority is higher (i.e. a&lt;br /&gt;
lower value) than the ''console_loglevel'' the message will be printed to the current console.&lt;br /&gt;
&lt;br /&gt;
To determine your current ''console_loglevel'' you simply enter:&lt;br /&gt;
 $ cat /proc/sys/kernel/printk&lt;br /&gt;
 	7       4       1       7&lt;br /&gt;
 	current	default	minimum	boot-time-default&lt;br /&gt;
&lt;br /&gt;
The first integer shows you your current console_loglevel; the second the&lt;br /&gt;
default log level that you have seen above.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To change your current console_loglevel simply write to this file, so in order&lt;br /&gt;
to get all messages printed to the console do a simple&lt;br /&gt;
 # echo 8 &amp;gt; /proc/sys/kernel/printk&lt;br /&gt;
and every kernel message will appear on your console.&lt;br /&gt;
&lt;br /&gt;
Another way to change the console log level is to use ''dmesg'' with the ''-n''&lt;br /&gt;
parameter&lt;br /&gt;
 # #set console_loglevel to print KERN_WARNING (4) or more severe messages&lt;br /&gt;
 # dmesg -n 5&lt;br /&gt;
Only messages with a value lower ('''not''' lower equal) than the&lt;br /&gt;
console_loglevel will be printed.&lt;br /&gt;
&lt;br /&gt;
You can also specify the console_loglevel at boot time using the ''loglevel''&lt;br /&gt;
boot parameter. (see&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/kernel-parameters.txt;hb=HEAD#l1334 Documentation/kernel-parameters.txt] for more details)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
'''Author's practical advice:'''&amp;lt;br&amp;gt;&lt;br /&gt;
Of course you should always specify an appropriate log level for your messages,&lt;br /&gt;
but for '''debugging''', I guess most developers leave the&lt;br /&gt;
console_loglevel unchanged and simply use KERN_ERR or KERN_CRIT to ensure the message reaches the console.&lt;br /&gt;
&lt;br /&gt;
 pr_err(&amp;quot;REMOVE ME: my debug statement that I swear to remove when I'm done\&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Please make sure to remove these 'inappropriately' tagged messages before&lt;br /&gt;
shipping the module ;)&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''KERN_CONT'' and ''pr_cont'' are special cases since they do not specify an urgency but rather indicate a 'continued message' e.g.:&lt;br /&gt;
 printk(KERN_ERR &amp;quot;Doing something was &amp;quot;);&lt;br /&gt;
 /* &amp;lt;100 lines of whatever&amp;gt;*/&lt;br /&gt;
 if (success)&lt;br /&gt;
    printk(KERN_CONT &amp;quot;successful\n&amp;quot;);&lt;br /&gt;
 else&lt;br /&gt;
    printk(KERN_CONT &amp;quot;NOT successful\n&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
 -&amp;gt; &amp;quot;Doing something was successful&amp;quot;&lt;br /&gt;
'''Important Note:''' ''KERN_CONT'' and ''pr_cont'' should only be used by core/arch code during early bootup (a continued line is not SMP-safe otherwise).[http://lwn.net/Articles/252651/]&lt;br /&gt;
&lt;br /&gt;
== Rate limiting and one time messages ==&lt;br /&gt;
Occasionally you have to insert a message in a section which gets called&lt;br /&gt;
quite often. This not only might have a severe performance impact, it also&lt;br /&gt;
could overwrite and spam your kernel buffer so it should be avoided.&lt;br /&gt;
&lt;br /&gt;
As always the kernel already provides you with nice functions that solve your&lt;br /&gt;
problems:&lt;br /&gt;
 printk_ratelimited(...)&lt;br /&gt;
and&lt;br /&gt;
 printk_once(...)&lt;br /&gt;
&lt;br /&gt;
''printk_once'' is fairly trivial - no matter how often you call it, it prints once and never again.&lt;br /&gt;
&lt;br /&gt;
''printk_ratelimited'' is a little bit more complicated - it prints by default not more than 10&lt;br /&gt;
times in every 5 seconds (for each function it is called in).&lt;br /&gt;
&lt;br /&gt;
If you need other values for the maximum burst count and the timeout, you can&lt;br /&gt;
always setup your own ratelimit using the ''DEFINE_RATELIMIT_STATE'' macro and&lt;br /&gt;
the ''__ratelimit'' function - see the implementation of&lt;br /&gt;
''printk_ratelimited'' for an example.&lt;br /&gt;
&lt;br /&gt;
Be sure to ''#include &amp;lt;kernel/ratelimit.h&amp;gt;'' in order to use&lt;br /&gt;
''printk_ratelimited()''&lt;br /&gt;
&lt;br /&gt;
Both functions have also their ''pr_*'' equivalents like&lt;br /&gt;
''pr_info_ratelimited'' for ''printk_ratelimited(KERN_INFO...'' and&lt;br /&gt;
''pr_crit_once'' for ''printk_once(KERN_CRIT...''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Note: both did not work as expected in my tests here, will probably investigate further'''&lt;br /&gt;
&lt;br /&gt;
== Printk from userspace ==&lt;br /&gt;
Sometimes, especially when doing automated testing, it is quite useful to&lt;br /&gt;
insert some messages in the kernel log buffer in order to annotate what's&lt;br /&gt;
going on.&lt;br /&gt;
&lt;br /&gt;
It is as simple as&lt;br /&gt;
 # echo &amp;quot;Hello Kernel-World&amp;quot; &amp;gt; /dev/kmsg&lt;br /&gt;
&lt;br /&gt;
Of course this messages gets the default log level assigned, if you want e.g.&lt;br /&gt;
to issue a KERN_CRIT message you have to use the string representation of the&lt;br /&gt;
log level - in this case &amp;quot;&amp;lt;2&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
 # echo &amp;quot;&amp;lt;2&amp;gt;Writing critical printk messages from userspace&amp;quot; &amp;gt;/dev/kmsg&lt;br /&gt;
&lt;br /&gt;
The message will appear like any other '''kernel''' message - there is '''no way''' to distinguish them!&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Don't confuse this with printf - we are printing a kernel message&lt;br /&gt;
from userspace here.&lt;br /&gt;
&lt;br /&gt;
== Internals / Changing the size of the printk buffer ==&lt;br /&gt;
Printk is implemented by using a ring buffer in the kernel with a size of&lt;br /&gt;
''__LOG_BUF_LEN'' bytes where ''__LOG_BUF_LEN'' equals ''(1 &amp;lt;&amp;lt;&lt;br /&gt;
CONFIG_LOG_BUF_SHIFT)'' (see&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=kernel/printk.c;hb=HEAD kernel/printk.c] for details).&lt;br /&gt;
&lt;br /&gt;
You can specify the size of the buffer in your kernel config by setting&lt;br /&gt;
''CONFIG_LOG_BUF_SHIFT'' to an appropriate value (e.g. 17 for 128Kb) (''make menuconfig -&amp;gt; General Setup -&amp;gt; Kernel log buffer size'').&lt;br /&gt;
&lt;br /&gt;
Using a ring buffer implies that older messages get overwritten once the&lt;br /&gt;
buffer fills up, but this is only a minor drawback compared to the robustness of this&lt;br /&gt;
solution (i.e. minimum memory footprint, callable from every context, not many&lt;br /&gt;
resources wasted if nobody reads the buffer, no filling up of disk space/ram when some kernel process goes&lt;br /&gt;
wild and spams the buffer, ...).&lt;br /&gt;
Using a reasonably large buffer size should give you enough time to read your&lt;br /&gt;
important messages before they are overwritten.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' dmesg reads by default a buffer of max 16392 bytes, so if you use a larger logbuffer you have to invoke dmesg with the ''-s'' parameter e.g.:&lt;br /&gt;
 ### CONFIG_LOG_BUF_SHIFT 17 = 128k&lt;br /&gt;
 $ dmesg -s 128000&lt;br /&gt;
&lt;br /&gt;
The kernel log buffer is accessible for reading from userspace by ''/proc/kmsg''.&lt;br /&gt;
''/proc/kmsg'' behaves more or less like a FIFO and blocks until new messages&lt;br /&gt;
appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Please note''' - reading from ''/proc/kmsg'' consumes the messages in the&lt;br /&gt;
ring buffer so they may not be available for other programs. It is usually a&lt;br /&gt;
good idea to let ''klogd'' or ''syslog'' do this job and read the content&lt;br /&gt;
of the buffer via ''dmesg''.&lt;br /&gt;
&lt;br /&gt;
== Pros and Cons==&lt;br /&gt;
The main advantage of printk over other debugging solutions is that it requires no sophisticated setup and can be called anywhere from any time.&lt;br /&gt;
Printk can be called while holding a lock, from interrupt and process context, is SMP safe and does not need any special preparation. It is just there and just works.&lt;br /&gt;
The only precondition is that you have some kind of working console to display the messages.&lt;br /&gt;
&lt;br /&gt;
For the early stages in the boot process, where no console is available yet,&lt;br /&gt;
there is a special function named ''early_printk'', this function writes&lt;br /&gt;
directly to the VGA buffer or a serial line but otherwise works just like&lt;br /&gt;
printk -- you have to enable this function by setting ''CONFIG_EARLY_PRINTK''&lt;br /&gt;
in your kernel config (''make menuconfig -&amp;gt; Kernel Hacking -&amp;gt; Early printk'').&lt;br /&gt;
&lt;br /&gt;
The major drawback is that printk is quite static, so you have to figure out what you want to trace beforehand and if you want to trace something different you have to recompile your code - which can become quite cumbersome. (And of course printk is not interactive at all, so you can't modify any variables or the like.)&lt;br /&gt;
&lt;br /&gt;
The other drawback is that printing usually consumes quite some processing power and io time, so if you're trying to debug a timing critical section or a timing bug, you're probably out of luck.&lt;br /&gt;
&lt;br /&gt;
== Debugging early boot problems ==&lt;br /&gt;
=== Accessing the printk buffer after a silent hang on boot ===&lt;br /&gt;
Sometimes, if the kernel hangs early in the boot process, you get no messages on the console before the hang.  However, there may still be messages in the printk buffer, which can give you an idea of where the problem is.&lt;br /&gt;
&lt;br /&gt;
The kernel starts putting messages into the printk buffer as soon as it starts.  They stay buffered there until the console code has a chance to initialize the console device (often the serial port for embedded devices).  Even though these messages are not printed before the hang, it is still possible in some circumstances&lt;br /&gt;
to dump the printk buffer and see the messages.&lt;br /&gt;
&lt;br /&gt;
The tricky parts of doing this are:&lt;br /&gt;
&lt;br /&gt;
# using a warm reset (if possible) so the memory contents are not lost when transitioning from the stuck kernel to the bootloader.  You ''can'' do a cold boot, but if the memory is left unpowered for very long, you will start to see memory corruption.&lt;br /&gt;
# figuring out the address to use in the bootloader, based on the address of __log_buf in System.map.  You will probably need to subtract the value of CONFIG_PAGE_OFFSET from the __log_buf address.  However, there may be other offsets present as well (such as TEXT_OFFSET).  Sometimes you can find the buffer by dumping the memory in a suspected area and locating the kernel messages visually in the dump.  Note that the mapping offset between the kernel map of memory and the bootloader map of memory should not change.  So once you figure it out you are set.&lt;br /&gt;
&lt;br /&gt;
Quinn Jensen writes:&lt;br /&gt;
&lt;br /&gt;
Something I've found handy when the console is silent is to dump the printk buffer from the boot loader.  To do it you have to know how your boot loader maps memory compared to the kernel.&lt;br /&gt;
&lt;br /&gt;
==== Redboot example on a Freescale ADS board ====&lt;br /&gt;
Quinn says: Here's what I do with Redboot on i.MX31:&lt;br /&gt;
&lt;br /&gt;
 fgrep printk_buf System.map&lt;br /&gt;
&lt;br /&gt;
this shows the linked address of the printk_buf, e.g.:&lt;br /&gt;
&lt;br /&gt;
 c02338f0 b printk_buf.16194&lt;br /&gt;
&lt;br /&gt;
The address &amp;quot;c02338f0&amp;quot; is in kernel virtual, which, in the case of i.MX31 ADS, redboot will have mapped to 0x802338f0.  So, after resetting the target board, but without letting it try to boot again, at the redboot prompt:&lt;br /&gt;
&lt;br /&gt;
 dump -b 0x802338f0 -l 10000&lt;br /&gt;
&lt;br /&gt;
And you see the printk buffer that never got flushed to the UART.  Knowing what's there can be '''very''' useful in debugging your console.&lt;br /&gt;
&lt;br /&gt;
==== U-boot example on an OMAP OSK board ====&lt;br /&gt;
Tim Bird tried these steps and they worked:&lt;br /&gt;
&lt;br /&gt;
 grep __log_buf System.map&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
&lt;br /&gt;
 grep __log_buf /proc/kallsyms&lt;br /&gt;
&lt;br /&gt;
These show:&lt;br /&gt;
&lt;br /&gt;
 c0352d88 B __log_buf&lt;br /&gt;
&lt;br /&gt;
In the case of the OSK, this address maps to 0x10352d88.  So I reset the target board and use the following:&lt;br /&gt;
&lt;br /&gt;
 OMAP5912 OSK # md 10352d88&lt;br /&gt;
 10352d88: 4c3e353c 78756e69 72657620 6e6f6973    &amp;lt;5&amp;gt;Linux version&lt;br /&gt;
 10352d98: 362e3220 2e32322e 612d3631 6e5f706c     2.6.22.16-alp_n&lt;br /&gt;
 10352da8: 7428206c 64726962 6d697440 6b736564    l (tbird@timdesk&lt;br /&gt;
 10352db8: 2e6d612e 796e6f73 6d6f632e 67282029    .am.sony.com) (g&lt;br /&gt;
 10352dc8: 76206363 69737265 33206e6f 342e342e    cc version 3.4.4&lt;br /&gt;
 10352dd8: 34232029 45525020 54504d45 65755420    ) #4 PREEMPT Tue&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
==== Grub ====&lt;br /&gt;
Grub also supports a dump command which you can invoke from the grub prompt.&lt;br /&gt;
 dump  [ -s offset ] [-n length] { FILE | (mem) }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Using CONFIG_DEBUG_LL and printascii() (ARM only) ===&lt;br /&gt;
If the kernel fails before the serial console is enabled, you can use CONFIG_DEBUG_LL to add extra debug output routines to the kernel.  These are printascii, printch and printhex. These routines print directly to the serial port, bypassing the console code, and are available earlier in machine initialization.&lt;br /&gt;
&lt;br /&gt;
To see printks earlier in the boot sequence (before the console is initialized), set CONFIG_DEBUG_LL=y&lt;br /&gt;
and CONFIG_EARLY_PRINTK=y.&lt;br /&gt;
&lt;br /&gt;
Alternatively, add your own calls to printascii, printch, and printhex where you believe the problems&lt;br /&gt;
are located.&lt;br /&gt;
&lt;br /&gt;
Here is an e-mail exchange seen on the linux-embedded mailing list (with answer by George Davis):[http://www.mail-archive.com/linux-embedded@vger.kernel.org/msg00223.html] &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;gt; When we try to boot a 2.6.21 kernel after uncompressing the kernel the boot process dies somehow.&lt;br /&gt;
&amp;gt; We've figured out so far that the kernel dies somewhere between the gunzip and start_kernel.&lt;br /&gt;
&lt;br /&gt;
Try enabling DEBUG_LL to see if it's an machine ID error.  If you see:&lt;br /&gt;
&lt;br /&gt;
Error: unrecognized/unsupported processor variant.&lt;br /&gt;
&lt;br /&gt;
or:&lt;br /&gt;
&lt;br /&gt;
Error: unrecognized/unsupported machine ID...&lt;br /&gt;
&lt;br /&gt;
Then you either don't have proper processor support enabled for your target or your bootloader is passing in the wrong machine number.&lt;br /&gt;
&lt;br /&gt;
If you still don't see anything, try hacking printk.c to call printascii() (enabled for the DEBUG_LL case) to print directly to the serial port w/o a driver, etc.,.  You can find more details on these low-level debugging hacks via a little googling...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== NetConsole ==&lt;br /&gt;
Sometimes you are in the unlucky situation that the machine crashes or hangs and you have no way to access the console afterwards, e.g. the graphic driver hangs and and the kernel dies soon after.&lt;br /&gt;
In this case you could either hook up a serial line to your crashing target machine (if a serial port is available) or use the kernels netconsole feature to enable printk logging via UDP.&lt;br /&gt;
&lt;br /&gt;
In order to use it you have to enable the ''CONFIG_NETCONSOLE'' kernel config&lt;br /&gt;
option (''make menuconfig -&amp;gt; Device Drivers -&amp;gt; Network device support -&amp;gt; Network core driver support -&amp;gt; Network console logging support'') and&lt;br /&gt;
configure it appropriately by using the ''netconsole'' configuration parameter&lt;br /&gt;
&lt;br /&gt;
 netconsole=[src-port]@[src-ip]/[&amp;lt;dev&amp;gt;],[tgt-port]@&amp;lt;tgt-ip&amp;gt;/[tgt-macaddr]&lt;br /&gt;
 	where&lt;br /&gt;
 		src-port      source for UDP packets (defaults to 6665)&lt;br /&gt;
 		src-ip        source IP to use (interface address)&lt;br /&gt;
 		dev           network interface (eth0)&lt;br /&gt;
 		tgt-port      port for logging agent (6666)&lt;br /&gt;
 		tgt-ip        IP address for logging agent&lt;br /&gt;
 		tgt-macaddr   ethernet MAC address for logging agent (broadcast)&lt;br /&gt;
&lt;br /&gt;
e.g. specify at kernel commandline (in your bootloader)&lt;br /&gt;
 linux netconsole=4444@10.0.0.1/eth1,9353@10.0.0.2/12:34:56:78:9a:bc&lt;br /&gt;
to send messages from 10.0.0.1 port 4444 via eth1 to 10.0.0.2 port 9353 with the MAC 12:34:56:78:9a:bc&lt;br /&gt;
&lt;br /&gt;
or while loading the module e.g&lt;br /&gt;
 # insmod netconsole netconsole=@/,@10.0.0.2/&lt;br /&gt;
to send messages via broadcast to 10.0.0.2 port 6666&lt;br /&gt;
&lt;br /&gt;
On the other machine you can now simply fire up&lt;br /&gt;
 # netcat -u -l -p &amp;lt;port&amp;gt;&lt;br /&gt;
e.g.&lt;br /&gt;
 $ netcat -u -l -p 6666&lt;br /&gt;
and see the printk messages from your target dribbling in.&lt;br /&gt;
&lt;br /&gt;
If you don't see any messages you might have to set the console_loglevel to a&lt;br /&gt;
higher value (see above) or test the connection via telnet e.g. from the target type&lt;br /&gt;
 $ telnet 10.0.0.2 6666&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Netconsole resources ===&lt;br /&gt;
See&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/networking/netconsole.txt;hb=HEAD Documentation/networking/netconsole.txt]&lt;br /&gt;
for more details.&lt;br /&gt;
&lt;br /&gt;
See [http://sarah.thesharps.us/2009-02-22-09-00 Sarah Sharp's blog entry about using netconsole]&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
=== Dmesg / Clearing the buffer ===&lt;br /&gt;
 dmesg -c&lt;br /&gt;
clears the dmesg buffer.&lt;br /&gt;
Sometimes it is nice to start with a blank buffer, so you will only see new&lt;br /&gt;
messages when you invoke ''dmesg''&lt;br /&gt;
&lt;br /&gt;
=== Printk Timestamps ===&lt;br /&gt;
 CONFIG_PRINTK_TIMES&lt;br /&gt;
Setting this kernel config option prepends every printk statement with a&lt;br /&gt;
timestamp representing the time since boot. This is particularly useful to get&lt;br /&gt;
a general idea about the timings of your code.&lt;br /&gt;
&lt;br /&gt;
You can also specify an argument on the kernel command line to enable this, or&lt;br /&gt;
you can enable it any time at runtime by doing the following:&lt;br /&gt;
&lt;br /&gt;
  $echo 1 &amp;gt;/sys/module/printk/parameters/time&lt;br /&gt;
&lt;br /&gt;
Also, there are tools available to use the information to show relative times&lt;br /&gt;
between printks (scripts/show_delta) and create graphs of durations in the&lt;br /&gt;
kernel (scripts/bootgraph.pl)&lt;br /&gt;
&lt;br /&gt;
See [[Printk Times]] for more details&lt;br /&gt;
&lt;br /&gt;
=== Printing buffers as hex ===&lt;br /&gt;
If you want to print a buffer as hex within the kernel, don't reinvent the&lt;br /&gt;
wheel use ''printk_hex_dump_bytes()'' instead.&lt;br /&gt;
&lt;br /&gt;
 print_hex_dump_bytes(const char *prefix_str, int prefix_type, const void *buf, size_t len)&lt;br /&gt;
this function prints a buffer as hex values to the kernel log buffer (with level KERN_DEBUG)&lt;br /&gt;
Example:&lt;br /&gt;
 Kernel Code:&lt;br /&gt;
 char mybuf[] = &amp;quot;abcdef&amp;quot;;&lt;br /&gt;
 print_hex_dump_bytes(&amp;quot;&amp;quot;, DUMP_PREFIX_NONE, mybuf, ARRAY_SIZE(mybuf));&lt;br /&gt;
&lt;br /&gt;
 dmesg output:&lt;br /&gt;
 61 62 63 64 65 66 00                             abcdef.&lt;br /&gt;
&lt;br /&gt;
If you need something more sophisticated and flexible maybe have a look at&lt;br /&gt;
''print_hex_dump()'' and ''hex_dump_to_buffer()''&lt;br /&gt;
&lt;br /&gt;
=== Dynamic Debugging ===&lt;br /&gt;
It is also possible to enable/disable debug information at runtime using the&lt;br /&gt;
dynamic debug functionality of the kernel.&lt;br /&gt;
For this the ''CONFIG_DYNAMIC_DEBUG'' kernel config option must be set.&lt;br /&gt;
See&lt;br /&gt;
[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/dynamic-debug-howto.txt;hb=HEAD Documentation/dynamic-debug-howto.txt] for more information.&lt;br /&gt;
&lt;br /&gt;
== Disabling printk messages at compile time ==&lt;br /&gt;
There is a configuration option which allows you to turn off all the printk messages in the&lt;br /&gt;
whole kernel (''CONFIG_PRINTK'').  This reduces the size the kernel, usually by at least 100k, &lt;br /&gt;
since all message strings are not compiled into the kernel binary image.  &lt;br /&gt;
&lt;br /&gt;
However, it also means you get absolutely no output from the kernel while it is running.  Disabling kernel&lt;br /&gt;
printk messages is usually the last thing you do when you are tuning your kernel for size.&lt;br /&gt;
&lt;br /&gt;
== References and external links ==&lt;br /&gt;
* [[Linux Kernel Development - by Robert Love|Linux Kernel Development]], Robert Love, 3rd Edition, Chapter 18 Debugging&lt;br /&gt;
* [[Linux Device Drivers]], Corbet, Rubini and Kroah-Hartmann, 3rd Edition, Chapter 4 Section 2&lt;br /&gt;
* [[Essential Linux Device Drivers]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/printk-formats.txt;hb=HEAD Documentation/printk-formats.txt]&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/dynamic-debug-howto.txt;hb=HEAD Documentation/dynamic-debug-howto.txt]&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/networking/netconsole.txt;hb=HEAD Documentation/networking/netconsole.txt]&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=kernel/printk.c;hb=HEAD kernel/printk.c] Implementation of printk and others&lt;br /&gt;
* [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=include/linux/printk.h;hb=HEAD include/linux/printk.h] printk header file&lt;br /&gt;
* [http://www.embedded-bits.co.uk/2010/printk-format-specifiers/ Blog Entry about the different %p format specifiers]&lt;br /&gt;
* [http://lwn.net/Articles/487437/ LWN.net: The perils of pr_info()]&lt;br /&gt;
* [http://www.ibm.com/developerworks/linux/library/l-kernel-logging-apis/index.html Kernel logging: APIs and implementation, Tim Jones (for IBM)] (nice article)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some page related to printk:&lt;br /&gt;
* [[Printk Times]] - has information about how to turn on timestamps for each printk message&lt;br /&gt;
** [[Printk_Times_Sample_4| printk time stamps sample]]&lt;br /&gt;
* [[Printk_Size_Info|printk size information]]&lt;br /&gt;
* [[Do Printk]] - has information about a method of disabling printk messages on a per-module basis&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Reflist}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Development Tools]]&lt;br /&gt;
[[Category:Tips and Tricks]]&lt;br /&gt;
[[Category:Printk]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/ELC_2013_Presentations</id>
		<title>ELC 2013 Presentations</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/ELC_2013_Presentations"/>
				<updated>2013-03-09T00:00:56Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Videos */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Presenters, Demo-ers, Participants:&lt;br /&gt;
Thanks very much for your participation in Linux Foundation's [http://events.linuxfoundation.org/events/embedded-linux-conference Embedded Linux Conference 2013].&lt;br /&gt;
&lt;br /&gt;
This page is for collecting the presentations that were made at the conference. During and after the conference we will collect  materials from the presenters and place them here.&lt;br /&gt;
Please watch this page if you are interested in a particular presentation - and if it&lt;br /&gt;
doesn't show up, please [[Special:EmailUser/Wmat | send me and email]] and we'll try to track it down.&lt;br /&gt;
&lt;br /&gt;
== Videos ==&lt;br /&gt;
&lt;br /&gt;
Many videos for ELC2013 are available at: http://video.linux.com/categories/2013-embedded-linux-conference-1&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
In addition, Free Electrons has also provided video of Andoid builders Summit talks, and ELC talks:&lt;br /&gt;
&lt;br /&gt;
[http://free-electrons.com/blog/abs-2012-videos/ Android Builders Summit]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://free-electrons.com/blog/elc-2012-videos/ ELC]&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
'''Presenters:''' Please post your technical conference presentations on this page.&lt;br /&gt;
(See Instructions below the tables)&lt;br /&gt;
&lt;br /&gt;
= Table of Presentations =&lt;br /&gt;
&lt;br /&gt;
NOTE:  If you add a wikilink to your presentation and attempt to upload it via the link, it may fail.  If it does, use the [[Special:Upload]] page to upload your file.&lt;br /&gt;
&lt;br /&gt;
== Keynotes ==&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#c0e0e0&amp;quot;&lt;br /&gt;
|+ '''Keynotes'''&lt;br /&gt;
|- bgcolor=&amp;quot;#c0e0e0&amp;quot;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Presenter(s)'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Session Description'''                                  &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Presentation'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Transcript Status'''&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/jimzemlinthelinuxfoundation1?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no Jim Zemlin, Executive Director, The Linux Foundation]&amp;lt;br/&amp;gt;[http://embeddedlinuxconference2013.sched.org/speaker/georgegray?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no George Grey, CEO, Linaro]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/7d31bdc542e4688cfcb4f9e734ea578b?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no Working Together to Accelerate Linux Development]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/chatham1?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Andrew Chatham, Google]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/f933fea1a987fa84bbcd88f889e0dfd6?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Google's Self-Driving Cars: The Technology, Capabilities &amp;amp; Challenges]&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/david.c.stewart?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no Dave Stewart, Intel]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/c4dc74be6672f020d8e166d2db4655cf?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no Code Sweat: Embed with Nightmares]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/6ff46db8e2a8a39b51255473e312756e?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  SpaceX - Moore's Law to Mars]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/robertroserobertrosedirectorofsoftwareengineeringspacex?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Robert Rose, SpaceX]&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Presenters ==&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#c0e0e0&amp;quot;&lt;br /&gt;
|+ '''Presentations'''&lt;br /&gt;
|- bgcolor=&amp;quot;#c0e0e0&amp;quot;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Session Description'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Presenter(s)'''                                  &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Presentation'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Transcript Status'''&lt;br /&gt;
|-&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 1, 11:00am&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/e1565cda09533369d6c989f9890e4344?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no Anatomy of the arm-soc git tree]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/olof?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no Olof Johansson, Google]&lt;br /&gt;
| [[Media:Elc2013_Johansson.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/78bcf2b8e163ab68d6ba192c9b3e32dd?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Beaglebone: The Perfect Telemetry Platform?]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/mranostay?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Matt Ranostay, Ranostay Industries]&lt;br /&gt;
| [[Media:Beaglebone_Telemetry-_ELC_2013.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/c5161be9cee53ea9a0eb45d57ef0b194?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Using and Understanding the Real-Time Cyclictest Benchmark]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/frank.rowand?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Frank Rowand, Sony Network Entertainment]&lt;br /&gt;
| [[Media:Elc2013_rowand.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 1, 12:00pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/4d82f7065019b1c993fc6bc24b629abe?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Anatomy of an Embedded KMS Driver]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/laurent.pinchart?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Laurent Pinchart, Ideas on board SPRL]&lt;br /&gt;
| [[Media:Elc2013_Pinchart.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/725fe218e20e73b08ed6ba1f2930e37b?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Kernel Dynamic Memory Allocation Tracking and Reduction]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/elezegarcia?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Ezequiel Alfredo Garcia, VanguardiaSur]&lt;br /&gt;
| [[Media:Elc2013_Garcia.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/bcd61120abc0308cb2fede03c70a769b#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  The OpenEmbedded Project 2 Years After Adopting the Yocto Project]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/koen?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Koen Kooi, CurcuitCo Electronics]&lt;br /&gt;
| [[Media:elc2013_Koei.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 1, 2:00pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/4b59cb9405cf73cd63f21ed964edf370?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  How to Cook the LTSI Kernel with Yocto Recipe]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/hisao.munakata.vt?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Hisao Munakata, Renesas Electronics] &lt;br /&gt;
| [[Media:LTSIwithYocto.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/ff5ec20eb019b6adfe44a1e6f43ef0d6?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  PinControl and GPIO Update] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/linus.walleij?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Linus Walleij, ST-Ericsson]&lt;br /&gt;
| [[Media:Pincontrol-gpio-update.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/538a75dac6cc94621a6881e307e962e6?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Understanding PREEMPT_RT (The Real-Time Patch]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/rostedt?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Steven Rostedt, RedHat]&lt;br /&gt;
| [[Media:elc2013_Rostedt.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/4f34a2dbe0d8058330f7a63f11d2ad93?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Beaglebone Hands-On Tutorial Sessions 1 Sponsored by BeagleBoard.org and BeagleBoardToys.com]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/jayneil?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Jayneil Dalal, Texas Instruments]&lt;br /&gt;
| [[Media:Beaglebone - Hands on Tutorial.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 1, 3:00pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/ef01d4f45e400247273658a420b63fee?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Building a Custom Linux Distribution with the Yocto Project]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/sean_hudson1?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Sean Hudson, Mentor Graphics]&lt;br /&gt;
| [[Media:2013-ELC-Building-a-distro-with-YP.pdf|PDF]] &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/c0cc92e3b123d1cc83a43a0c89a0cc57?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Common Clock Framework: How to Use It]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/gclement?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Gregory Clement, Free Electrons]&lt;br /&gt;
| [[Media:elc2013_Clement.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/b5d3361ee252fc74bae36c7bab06dbd3?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  RFC: Obtaining Management Buy-in for Mainline Development]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/kev1?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Kevin Chalmers, Texas Instruments]&lt;br /&gt;
| [[Media:elc2013_Chalmers.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/c9dbc64a77607bfd16df7fdf4403fd78?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  BeagleBone Hands-on Tutorial Session 2 Sponsored by BeagleBoard.org and BeagleBoardToys.com]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/jayneil?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Jayneil Dalal, Texas Instruments]&lt;br /&gt;
| [[Media:Beaglebone - Hands on Tutorial.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 1, 4:00pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/77502d826977dcd027871c96d9689d59?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Atom for Embedded Linux Hackers and the DIY Community]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/scott.a.garman?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no Scott Garman, Intel Open Source Technology Center]&lt;br /&gt;
| [[Media:elc2013_Garman.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/0ed4ebc0a81490626dca075746b5979a?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Controlling Multi-Core Race Conditions on Linux/Android] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/mike94?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Mike Anderson, The PTR Group, Inc.]&lt;br /&gt;
| [[Media:elc2013_Anderson.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/45c141821f693cb24aa4ebc69aaf99c9?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Making Linux do Hard Real-Time] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/brent14?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Brent Roman, Monterey Bay Aquarium Research Institute]&lt;br /&gt;
| [[Media:elc2013_Roman.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/5c62f089dde99618c864dc340a537288?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  BeagleBone Hands-On Tutorial Session 3 Sponsored by BeagleBoard.org and BeagleBoardToys.com]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/jayneil?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Jayneil Dalal, Texas Instruments]&lt;br /&gt;
| [[Media:Beaglebone - Hands on Tutorial.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 1, 5:00pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/e82d3137553ba3e2ff1ce6e127f48fa9?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  How to Decide the Linux Kernel Version for the Embedded Products to Keep Maintaining Long Term]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/tsugikazushibata1?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Tzugikazu SHibata, NEC]&lt;br /&gt;
| [[Media:elc2013_Shibata.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/d1b56ab904b102807ec86764d4dffe71?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Optimizing GStreamer Video Plugins: A Case Study with Renesas SoC Platform]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/matsu2?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Katsuya Matsubara, IGEL Co., Ltd.]&lt;br /&gt;
| [[Media:elc2013_Matsubara.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/2bf9b7769bf51293b506be46425c861c?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Your New ARM SoC Linux Support Checklist!]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/tpetazzoni?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Thomas Petazzoni, Free Electrons]&lt;br /&gt;
| [[Media:elc2013_Petazzoni.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 2, 10:30am&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/ccda0ec3bf3f97011febdeb1b8ba54dc?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Kernel Testing Tools and Techniques]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/ohporter?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Matt Porter, Texas Instruments, Inc.]&lt;br /&gt;
| [[Media:elc2013_Porter.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/dfe1387ba3520d2a5037265cd54ee826?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Debugging on a Production System] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/tristan.lelong?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Tristan Lelong, Adeneo Embedded]&lt;br /&gt;
| [[Media:elc2013_Lelong.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/6e744648e4859372513239432adc3681?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  FIT Image Format Inspired by the Kernel Device Tree Interface]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/agnel.joel?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Joel Fernandes, Texas Instruments, Inc.]&lt;br /&gt;
| [[Media:elc2013_Fernandes.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/18494630c7fd39c398fde6f6054a2b37?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Pre-built Binary Toolchains in the Yocto Project]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/denix?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Denys Dmytriyenko, Texas Instruments, Inc.]&lt;br /&gt;
| [[Media:ExternalToolchainsInYocto.pdf|PDF]] &lt;br /&gt;
| &lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 2, 11:30am&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/33128ae78b4f1b46dfe4fec816b74e98?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Extending the swsusp Hibernation Framework to ARM]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/russ.dill?iframe=yes&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no  Russell Dill, Texas Instruments, Inc.]&lt;br /&gt;
| [[http://elinux.org/images/0/0c/Slides.pdf PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/a608109d374ac283e395f6028e5d868c?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  LLVMLinux: Compiling the Linux Kernel with LLVM] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/behanw  Behan Webster, Converse in Code, Inc.]&lt;br /&gt;
| [[Media:elc2013_Webster.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/569cd5cfa4f30a56c23215b1971db1f8?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Making Gadgets Really &amp;quot;cool&amp;quot;]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/noor.u.mubeen  Noor UI Mubeen, Intel Technology India Pvt Ltd]&lt;br /&gt;
| [[Media:elc2013_Mubeen.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/c58b06ecc659a01878f516b3075939ec?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Survey of Linux Kernel Debugging Techniques]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/kevin.dankwardt  Kevin Dankwardt, K Computing]&lt;br /&gt;
| [[Media:elc2013_Dankwardt.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 2, 1:45pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/1f828b765ec4df1528968306f0445240?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Application Diversity Demands Accelerated Linux Innovation]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/morvek  Mark Orvek, Linaro]&lt;br /&gt;
| [[Media:elc2013_Orvek.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/7640b599b9af1d2dbfebe1d8d39989ed?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Can You Market an Open Source Project?] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/tracey.m.erway  Tracey Erway, Intel Corporation&amp;lt;br/&amp;gt;Nithya Ruff, Synopsys]&lt;br /&gt;
| [[Media:elc2013_Ruff.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/53b201c7ad059284a2add9523a4492c3?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  The End of Embedded Linux (as we know it)] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/chris105  Chris Simmonds, 2net Limited]&lt;br /&gt;
| [[Media:elc2013_Simmonds.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/80d20d81826d8c252246140684534320?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Toybox: Writing a new Linux Command Line from Scratch]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/rob31  Rob Landley, Multicellular]&lt;br /&gt;
|[http://landley.net/talks/celf-2013.txt presentation outline (txt)]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 2, 2:45pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/af6c24c1ba26195243201aad0f947352?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Deadline Miss Detection with SCHED_DEADLINE]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/yoshitake.kobayashi  Yoshitake Kobayashi, TOSHIBA Corporation]&lt;br /&gt;
| [[Media:ELC2013-Kobayashi.pdf|PDF]], [https://github.com/ystk/sched-deadline/tree/dlmiss-detection-dev Source code]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/bedc505f903d6dacfc506eae5a361005?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Embedded Linux Takes on the Hard Problems of Automotive]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/alchaiken  Alison Chaiken, Mentor Embedded Software Division]&lt;br /&gt;
| [[Media:elc2013_Chaiken.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/a040837ca32db97783677fd9ed336a5f?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Open Graphics with the Yocto Project] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/burton1  Ross Burton, Intel]&lt;br /&gt;
| [[Media:elc2013_Burton.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/9777ed0644ec217470ea120547e6e6a1?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Using GStreamer for Seamless Off-Loading Audio Processing to a DSP]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/ruud.derwig  Ruud Derwig, Synopsys]&lt;br /&gt;
| [[Media:ELC2013-UsingGStreamer_for_seamless_audio_off-loading_final.pdf|PDF]] &lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 2, 4:00pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/d3840c72f34e224e1a594b7dbe86a60d?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Designing for Optimisation]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/mans.rullgard  Mans Rullgard, ARM/Linaro]&lt;br /&gt;
| [[Media:elc2013_Rullgard.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/3ef642b5a4ecd564b505625f8255b250?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Namespaces for Security] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/jake13  Jake Edge, LWN.net]&lt;br /&gt;
| [[Media:elc2013_Edge.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/58ed5c59d83225dd39a8071fe10d1576?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Yocto Project Overview and Update] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/sgw  Saul Wold, Intel]&lt;br /&gt;
| [[Media:elc2013_Wold.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 2, 5:00pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/d6e312a3d3159db95993483132dd7a83?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Board Bringup: You, Me, and I2C]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/danders.dev  David Anders, Texas Instruments]&lt;br /&gt;
| [[Media:Elce-danders.pdf|PDF]] - [[BoardBringUp-i2c|Resource Page]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/a78778ce69f44eb8c34de584cac9512e?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  System-wide Memory Management without Swap] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/hmcochran  Howard Cochran, Lexmark International]&lt;br /&gt;
| [[Media:Elc2013-embedded-memory-management.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/94e9835bf0b10444250bf923f962cdf6?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Target Communication Framework: One Link to Rule Them All]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/anna.dushistova  Anna Dushistova, Me, Myself, and I]&lt;br /&gt;
| [[Media:TCF-AnnaDushistova2013.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;3&amp;quot; | Day 3, 9:00am&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/d628d11e7d9310bb18e6536bac0d8d7f?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  EasyUI: No Nonsense Mobile Application Development with EFL]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/leandro2  Leandro Pereira, ProFUSION Embedded System]&lt;br /&gt;
| [[Media:elc2013_Pereira.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/845c23037d0d2e375fe96d3f676a648d?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  In Kernel Switcher: A Solution to Support ARM's New big.LITTLE implementation] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/mathieu.poirier  Mathieu Poirier, Linaro]&lt;br /&gt;
| [[Media:elc2013_Poirier.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/c0173ac5f2fde26462f4b36c07b0c413?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Yocto Meta-Virtualization Layer Project] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/michael.christofferson  Michael Christofferson, Enea]&lt;br /&gt;
| [[Media:elc2013_Christofferson.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/c0f74aade06500c4363b7e17edf07a4e?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Embedded Android Workshop]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/karimyaghmour3  Karim Yaghmour, Opersys]&lt;br /&gt;
| [[Media:elc2013_Yaghmour.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 3, 10:00am&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/db5e82d9ea3010390a31a34ea2b0212a?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  F2FS (Flash-Friendly File System)]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/jooyoung.hwang  Joo-Young Hwang, Samsung Electronics Co., Ltd.]&lt;br /&gt;
| [[Media:elc2013_Hwang.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/1849ad93f7bfd458bb962a171dad9ab1?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Lessons Learned in Designing a Self-Video, Self-Hovering Nano Copter] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/gregoire  Gregoire Gentil, Always Innovating]&lt;br /&gt;
| [[Media:elc2013_Gentil.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/4886db21ad2637a44ae26743b41af3f1?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Leveraging Linux - Code Coverage for Post-Silicon Validation]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/mehdik.  Mehdi K., UBC Integrated Systems Design Lab]&lt;br /&gt;
| [[Media:elc2013_Mehdi.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 3,11:15am&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/21d4fd0dc56868cf2220285eebb76a17?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Bringing kconfig to EGLIBC]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/raj.khem  Khem Raj, OpenEmbedded]&lt;br /&gt;
| [[Media:elc2013_Raj.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/1055e624212b01ba5a761e53dc3fc9eb?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Gentoo-Bionic: We Can Rebuild Him. Better. Stronger. Faster.] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/chrisfriedt  Christopher Friedt, Research In Motion]&lt;br /&gt;
| [[Media:2013_elc_gentoo_bionic.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/6886dddf386277f332c2e7cf742cb9bb?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Task Scheduling for Multicore Embedded Devices]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/funkygap  Gap-Joo Na, Electronics and Telecommunications Research Institute (ETRI)]&lt;br /&gt;
| [[Media:elc2013_Na.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 3, 12:15pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/74d3b5689c6663250c419c048fe2495f?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Adventures in (simulated) Assymmetric Scheduling]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/panto  Pantelis Antoniou, Antoniou Consulting]&lt;br /&gt;
| [[Media:Elc-pantelis-2013.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/896ba6b16e4d15e2c36a46d3315e3f7a?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  An Insight into the Advanced XIP Filesystem (AXFS)] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/aaditya.kumar.30  Aditya Kumar, Sony India Software Centre Pvt Ltd.]&lt;br /&gt;
| [[Media:elc2013_Kumar.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/f343dc3f9f47c051a260dd4064dc6b4b?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Tips of Malloc and Free] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/tetsu.koba  Tetsuyuki Kobayashi, Kiyoto Microcomputer]&lt;br /&gt;
| [[Media:elc2013_Kobayashi.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 3, 2:15pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/181850f27fe7f34f54ade470b3d25b3c?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  How to Build Your Own Digital Signage Solution with Yocto Project]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/nitin.a.kamble  Nitin Kamble, Intel Corporation]&lt;br /&gt;
| [[Media:elc2013_Kamble.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/6323851f04700f04a30899503710781b?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Leveraging SPDX with Yocto]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/mark.gisi  Mark Gisi, Wind River Systems]&amp;lt;br/&amp;gt;[http://embeddedlinuxconference2013.sched.org/speaker/markhatle  Mark Hatle, Wind River Systems]&lt;br /&gt;
| [[Media:elc2013_Hatle.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/907ac5bf9511f464a329047c5ca28e51?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  The 'Embedded' Problem as Experienced by Intel's Reference Phones] &lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/mark.gross  Mark Gross, Intel/MCG/PSI]&lt;br /&gt;
| [[Media:elc2013_Gross.pdf|PDF]]&lt;br /&gt;
| &lt;br /&gt;
|- bgcolor=&amp;quot;#a0c0c0&amp;quot;&lt;br /&gt;
| colspan=&amp;quot;4&amp;quot; | Day 3, 3:15pm&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/17dcacc6f4b333c5e7c2a0ffc8df2fcb?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  olibc: Another C Runtime Library for Embedded Linux]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/jserv  Jim Huang, 0xlab]&lt;br /&gt;
| [[Media:elc2013_Huang.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/a85c816419e15fe1c209a7a8a13375d4?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Security Best Practices for Embedded Systems]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/mehaf  John Mehaffey, MontaVista Software]&lt;br /&gt;
| [[Media:elc2013_Mehaffey.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/ff7ed4110d02595d5c75c012238b84bf?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  uCLinux for Custom Mobile Devices]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/hy2012  Hunyue Yau, HY Research LLC]&lt;br /&gt;
| [[Media:elc2013_Yau.pdf|PDF]]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Workshops ==&lt;br /&gt;
{|  border=&amp;quot;1&amp;quot; cellspacing=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
|- bgcolor=&amp;quot;#c0e0e0&amp;quot;&lt;br /&gt;
|+ '''Workshops'''&lt;br /&gt;
|- bgcolor=&amp;quot;#c0e0e0&amp;quot;&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Presenter(s)'''&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Session Description'''                                  &lt;br /&gt;
| align=&amp;quot;center&amp;quot; | '''Presentation'''&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/filipthoen  Filip Thoen, Synopsys]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/822e1a83294b6412d0c69fe5d940d414?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Getting Linux BSPs Developed Faster]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Yocto Project Developers&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/e5debbb7e088403c5d5d5575d99c13d5?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Tocto Project &amp;amp; OpenEmbedded BoF]&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/ohporter  Matt Porter, Texas Instruments]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/ccda0ec3bf3f97011febdeb1b8ba54dc?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Kernel Testing Tools and Techniques]&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/speaker/jesse.barker  Jesse Barker, Linaro]&lt;br /&gt;
| [http://embeddedlinuxconference2013.sched.org/event/4bca8fd9cf84d0426e53aadbe19eeaa9?iframe=no&amp;amp;w=900&amp;amp;sidebar=yes&amp;amp;bg=no#  Common Display Framework]&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instructions for Presenters ==&lt;br /&gt;
Please create a link in the table for your presentation, copying the style of other links.&lt;br /&gt;
(You may need to create an account in order to edit the wiki or upload files.)&lt;br /&gt;
&lt;br /&gt;
When you have created the link, click on it to upload the file containing your slides.&lt;br /&gt;
[[Category:ELC]]&lt;br /&gt;
[[Category:2013]]&lt;br /&gt;
[[Category:Events]]&lt;br /&gt;
[[Category:Presentations]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/File:Elc2013_Mehdi.pdf</id>
		<title>File:Elc2013 Mehdi.pdf</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/File:Elc2013_Mehdi.pdf"/>
				<updated>2013-03-08T23:59:41Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	<entry>
		<id>http://www.elinux.org/Japan_Technical_Jamboree_44</id>
		<title>Japan Technical Jamboree 44</title>
		<link rel="alternate" type="text/html" href="http://www.elinux.org/Japan_Technical_Jamboree_44"/>
				<updated>2013-03-08T00:40:00Z</updated>
		
		<summary type="html">&lt;p&gt;Tim Bird: /* Agenda */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;0&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;0&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:HeadTitle.gif]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;text-align:right&amp;quot; |&amp;lt;span style=&amp;quot;font-size:large&amp;quot;&amp;gt;Date: March 8th/ 日付: 3月8日（金）&amp;lt;/span&amp;gt;&lt;br /&gt;
* At Nakano Sunplaza / 於、中野サンプラザ&lt;br /&gt;
* Please join &amp;quot;celinux-dev&amp;quot; mailinglist to get the latest announcement.&lt;br /&gt;
* &amp;quot;celinux-dev&amp;quot; メーリングリストにこのイベント関係のアナウンスが流れます。ぜひ参加してください。&lt;br /&gt;
** [http://lists.celinuxforum.org/mailman/listinfo/celinux-dev How to join.]&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|[[Image:J_Jam_SessionProp.gif]]&lt;br /&gt;
|-&lt;br /&gt;
|style=&amp;quot;text-align:right&amp;quot; |[[Japan TJ Session Proposal|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Session proposal how-to. / 提案の方法&amp;lt;/span&amp;gt;]]&lt;br /&gt;
|}&lt;br /&gt;
= Introduction / はじめに =&lt;br /&gt;
* The Japan Technical Jamboree is a forum-wide technical meeting of the CE Workgroup of the Linux Foundation. This meeting will be located conveniently in Japan and use Japanese as the native language of the event. &lt;br /&gt;
* A general guidance page is available. / 初めての方はこちらもお読みください。&lt;br /&gt;
** [http://tree.celinuxforum.org/CelfPubWiki/JapanTechnicalJamboreeGuidance JapanTechnicalJamboreeGuidance] (Japanese/English)&lt;br /&gt;
== Special remarks for non Japanese speakers ==&lt;br /&gt;
* This page is Japanese/English bilingual.  Please allow some contents on this page are not translated into English because of this event is Japan regional one, though we try to place English translation.&lt;br /&gt;
* If you would like to perform your presentation in English, we also welcome you to join!  We hope you to speak slowly without any complicated expressions.  Most Japanese developers are capable to understand plain English.&lt;br /&gt;
== Previous Jamboree ==&lt;br /&gt;
* Please look into the wiki page. / 下記のWikiページをご覧ください。&lt;br /&gt;
** [[Japan Technical Jamboree 43]]&lt;br /&gt;
&lt;br /&gt;
= Date and venue... / 日付・場所... =&lt;br /&gt;
{|&lt;br /&gt;
|+&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top&amp;quot; |&lt;br /&gt;
[[Image:NakanoSunplaza2.jpg]]&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; width=90% |&lt;br /&gt;
* Date '''March 8th, 2013'''&lt;br /&gt;
** '''Starting at 10 am'''&lt;br /&gt;
* At '''''Nakano Sunplaza / 8F Training Room 2''''' / 会場 '''''中野サンプラザ / 8階・研修室２'''''&lt;br /&gt;
** Nakano Sunplaza is located just close to '''Nakano''' station (JR/Tokyo Metoro ).&lt;br /&gt;
** http://www.sunplaza.jp/ (Japanese)&lt;br /&gt;
* Admission: '''''Free of charge''''' / 参加費用: '''''無料'''''&lt;br /&gt;
* Not limited for CELF members. / CELF会員以外も参加・セッション持ち込み共に可能&lt;br /&gt;
* Coordinators / 世話役 (Your inquiries in English welcome)&lt;br /&gt;
** Hisao Munakata / 宗像尚郎 (hisao_dot_munakata_dot_vt(a)renesas_dot_com) &lt;br /&gt;
** Satoru Ueda / 上田理 (Satoru_dot_Ueda(a)jp_dot_sony_dot_com)&lt;br /&gt;
|}&lt;br /&gt;
== Registration / 参加登録 ==&lt;br /&gt;
* No registration required / 参加登録は要りません。&lt;br /&gt;
&lt;br /&gt;
= Main Topics =&lt;br /&gt;
* It is just after the Kernel Summit and final Jamboree before ELC Europe.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Agenda / 進行 =&lt;br /&gt;
== Agenda ==&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|+&lt;br /&gt;
! style=&amp;quot;text-align:left; background-color:#B0FFB0; width:50&amp;quot; | Time&lt;br /&gt;
! style=&amp;quot;text-align:left; background-color:#B0FFB0; width:70%&amp;quot; | Title and presenter&lt;br /&gt;
! style=&amp;quot;text-align:left; background-color:#B0FFB0&amp;quot; | Notes&lt;br /&gt;
Presentation Materials&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 10:00..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
* Opening / 連絡事項&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
&amp;lt;!--* [[File:SelfIntro40.ppt]]--&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 10:15am..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
'''Embedded Linux status update'''&lt;br /&gt;
* '''Tim Bird''' (Connect from USA)&lt;br /&gt;
** Latest Community topics update - quick update.&lt;br /&gt;
** Latest CE WG project updates&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
(In English / 英語のセッションです)&lt;br /&gt;
* [[Media:Status-of-Embedded-Linux-2013-03-JJ44.pdf]]&lt;br /&gt;
* [[Media:Status-of-Embedded-Linux-2013-030JJ44.pptx]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#B0B0FF&amp;quot; | 11:30..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#B0B0FF&amp;quot; | Lunch&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#B0B0FF&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 12:30pm..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
'''Evalution of Linux Container (LXC) on Embedded Linux'''&lt;br /&gt;
* '''Yuki Machida, FUJITSU COMPUTER TECHNOLOGIES LIMITED'''&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 1:30pm..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
'''barebox''' with GUI and the up comming Application support&lt;br /&gt;
* '''Jean-Christophe PLAGNIOL-VILLARD'''&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
(In English / 英語のセッションです)&lt;br /&gt;
* Connecting from Hong Kong&lt;br /&gt;
* http://www.jcrosoft.com/&lt;br /&gt;
* [[Media:barebox.pdf]]&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 2:00pm..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
'''The latest status of LTSI project'''&lt;br /&gt;
* '''Hisao Munakata'''&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 2:30pm..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
'''Tips of Malloc &amp;amp; Free'''&lt;br /&gt;
* '''Tetsuyuki Kobayashi'''&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
http://d.hatena.ne.jp/embedded/20130226/p1&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 3:30pm..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
'''Applying the Linux Cgroups Mechanism to AV appliances'''&lt;br /&gt;
* '''Yukinori Endo / Mitsubishi Electric Corp.'''&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 4:00pm..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
'''Android Builders Summit 2013 / Embedded Linux Conference 2013 Report'''&lt;br /&gt;
* '''Kazuomi Kato, Panasonic'''&lt;br /&gt;
* '''Shinsuke Kato, Panasonic'''&lt;br /&gt;
** ABSとELCの参加レポートを予定しています。セッションは終わりの方でOKです。個別の話題を前に追記下さい。&lt;br /&gt;
* Togetter&lt;br /&gt;
** Android Builders Summit 2013 #abs2013 http://togetter.com/li/458582&lt;br /&gt;
** Yocto Project Developer Day #yocto http://togetter.com/li/459273&lt;br /&gt;
** Embedded Linux Conference 2013 #lfelc http://togetter.com/li/459672&lt;br /&gt;
* Links&lt;br /&gt;
** ABS https://events.linuxfoundation.org/events/android-builders-summit&lt;br /&gt;
** ELC https://events.linuxfoundation.org/events/embedded-linux-conference&lt;br /&gt;
* Links after archived&lt;br /&gt;
** ABS https://events.linuxfoundation.org/archive/2013/android-builders-summit&lt;br /&gt;
** ELC https://events.linuxfoundation.org/archive/2013/embedded-linux-conference&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; | 4:40pm..&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
* '''''Calling for your session proposals'''''&lt;br /&gt;
| style=&amp;quot;vertical-align:top; background-color:#F0F0F0&amp;quot; |&lt;br /&gt;
* [[Japan TJ Session Proposal|&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;Session proposal how-to. / 提案の方法&amp;lt;/span&amp;gt;]]&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Please be noted above time table is just a guideline and may be shifted. / 上記の時間割は目安です。かなり前後する可能性がありますので、あらかじめご承知おきください。&lt;br /&gt;
&lt;br /&gt;
== Special Remarks ==&lt;br /&gt;
* Please place some detail descriptions about each presentation topics.&lt;br /&gt;
: こちらに各プレゼンテーションの詳細などを記載してください。&lt;br /&gt;
&lt;br /&gt;
* togetter&lt;br /&gt;
&lt;br /&gt;
= Ask for your help / お願い =&lt;br /&gt;
== Presentation Materials ==&lt;br /&gt;
* We wish you to prepare the materials in English. / 出来るだけプレゼンテーション資料は英語で表記してください。絶対ではありませんが、日本語が理解できない方に対しての配慮が出来ればと思います。&lt;br /&gt;
* Please leave your material in this wiki site after the event. / ジャンボリー終了後、プレゼンテーション資料はこのWikiに残してください。&lt;br /&gt;
== English Translation Volunteer ==&lt;br /&gt;
* If you can help the translation volunteer from Japanese to English, we would be very much appreciated! / 日本語を英訳していただくボランティアを大歓迎します！&lt;br /&gt;
&lt;br /&gt;
[[Category:Japan Technical Jamboree]]&lt;br /&gt;
[[Category:Events]]&lt;/div&gt;</summary>
		<author><name>Tim Bird</name></author>	</entry>

	</feed>