This is the best place to start optimization because it has the greatest potential for wasted space. Starting from zero also forces you to think through the addition of each new component and understand why you’re adding it to the system. In the starting-from-zero approach, you also see that what was once done as a shell script becomes part of the application, to avoid the overhead of the shell executable and script.
Start from Zero
This includes references to several different distribution building tools like OpenEmbedded and Buildroot. These are great tools for creating a Linux distribution, but they don’t create a minimal Linux distribution. The best way to make a small distribution is to start with nothing and work upward from zero rather than try to whittle down an existing root file system and hope nothing breaks. You can create the minimal contents for a root file system by doing the following:
The application resides in the root of the file system and must continue running or the system will halt, because at least one process must kept running in a Linux system. This root file system can be built as an initramFS and therefore assembled with the kernel and included in the kernel image file deployed on the device.The application is placed in the root directory of the target machine and is statically linked, so it doesn’t require any additional files. This root file system adds about 3KB on top of the application, meaning the flash drive of a few megabytes looks like a huge amount of space by comparison.
Applications operating at this level are usually quite simple; they may read a value from a measurement or wait for the user to scan a bar code and perform a query. Whatever the application, it’s small enough that is can easily fit into the remaining few MB of space in flash.
When you use this approach, the kernel’s init= parameter must be set to the application or the application must be named linuxrc so that it’s run when the system starts; remember, the init program can be anything the kernel can execute This system is so small, in fact, that as a side effect it also boots very quickly, assuming the application code is reasonably efficient. As a rule, systems that have been built up from zero boot quickly because the drive to be small reduces the system to the essentials, jettisoning even a shell for scripting. This minimal file system usually prompts people to say things like, “I thought I needed….” Table below clears up many of those questions and explains why a certain component is missing.
Linux Embedded systems Related Tutorials
Linux Embedded systems Related Interview Questions
|Linux Embedded systems Interview Questions||Red Hat Linux Essentials Interview Questions|
|Red Hat Linux System Administration Interview Questions||Ubuntu Certified Professional Interview Questions|
|IBM AIX Interview Questions||Solaris Interview Questions|
|HP-ux 11iv3 system administration Interview Questions||Red Hat cluster Interview Questions|
|Embedded C Interview Questions||Unix/Linux Interview Questions|
|Unix Shell Scripting Interview Questions||Solaris Administrator Interview Questions|
Linux Embedded systems Related Practice Tests
|Linux Embedded systems Practice Tests||Red Hat Linux Essentials Practice Tests|
|Red Hat Linux System Administration Practice Tests||Ubuntu Certified Professional Practice Tests|
|IBM AIX Practice Tests||Solaris Practice Tests|
|HP-ux 11iv3 system administration Practice Tests|
Linux Embedded Systems Tutorial
About Embedded Linux
Configuring The Software Environment
Target Emulation And Virtual Machines
Starting Your Project
Getting Linux For Your Board
Creating A Linux Distribution From Scratch
Booting The Board
Configuring The Application Development Environment
Kernel Configuration And Development
Using Open Source Software Projects
Handling Field Updates
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.