eLinux.org - Embedded Linux Wiki

Szwg Spec Initrd

From eLinux.org

Jump to: navigation, search

Contents

Introduction

  • This technique can be used for FS ROM size reduction.
  • Initrd is a Kernel feature that allows root file system to be in RAM disk. Use this feature and use compress (gzip) feature to save ROM area where original root file system is stored.
  • Root file system image is compressed and stored in ROM/Flash. Boot loader (or Kernel) copies the compressed image to RAM and decompress it to RAM (RAM disk). The kernel mount the root file system image as file system.

Rationale

  • The original file system image should be stored in ROM/Flash. Instead of saving image as is, compressed (gzip) file system saves the ROM usage.

Specifications

  • Kernel SHOULD support initrd to mount root file system in RAM disk.
  • Kernel SHOULD support gunzip.

Notes(informational and non-normative)

Pros and Cons:

  • ROM size is reduced by 50% - 65% (or 1.36Mbyte to 2.3Mbyte).
  • It requires full size of FS image on RAM.
  • As side effect, the bootup time becomes slower by 15%.
  • The FS can be accessed as Read and Write, however, need to be very careful as initrd itself doesn't have the feature to write it back to Flash.
Actual data is shown in Appendix  ( [wiki:Appendix A_R2])

References

    • This feature is implemented in CELF 1.0 as well as master Linux (2.4 kernel at least)

Remaining Issues

    • Some data on the platform are still missing.
Personal tools