background preloader

Initrd, initrfs

Facebook Twitter

Initrd (linux)

(Saving...) Rom flashing - How to unpack and edit boot.img for ROM porting? The method I present here relies on CyanogenMod's Android source code.

rom flashing - How to unpack and edit boot.img for ROM porting?

While Google's AOSP only provides the tool to build the boot.img file, CyanogenMod also adds the unpackbootimg tool allowing you to unpack it. This tool does not seem specifically designed for CyanogenMod in any way, so most chances are that it will work for other ROMs as well. There are, however, a relatively large number of alternatives to unpack the boot.img file which all work more-or-less the same.

Basically, such unpack tool will extract the content of the boot.img file and display a set of parameters you will have to pass to Google's mkbootimg tool to build a file whose configuration (mainly kernel parameters and memory addresses) will match the original one. Here are a few examples, I did not test them personally so cannot recommend any and I present them only for reference purposes: Some manufacturers produce ROMs which are more or less far from AOSP standard (unusual addresses, headers, file format, etc.).

Now: Opening and modifying the initrd - Alex on Linux. Table of contents IntroductionBACK TO TOC Ever wondered what’s inside of the initrd file?

Opening and modifying the initrd - Alex on Linux

This article tells you how to look into the initrd and even modify it. Few words about initrdBACK TO TOC Linux uses the initrd or initial ram-disk during the boot process. It would be impossible to create a single kernel binary image that would suit all the hardware configurations out there. BIOS routines that read the actual kernel from the disk into RAM, do the same job with initrd. See how handy this is. initrd itself requires no drivers whatsoever, because BIOS handles all the work of loading it into memory. After loading initrd into RAM, the kernel runs a script named init that resides in initrd‘s root directory.

Few words about historyBACK TO TOC Content of the initrd file and its format has significantly changed over last couple of years. To look into it, you had to open it up with gzip and then mount using loopback device (mount -o loop). Today things are totally different. Have fun! Build and Modify a Rootfs - Xilinx Wiki - Confluence. This how-to describes the process to build a RAM disk or init.rd image.

Build and Modify a Rootfs - Xilinx Wiki - Confluence

This is a part of the Xilinx design flow described in Getting Started. Task Dependencies (Pre-requisites) Build U-Boot (mkimage utility) Tools Required None Input Files Required ramdisk.image.gz (required for Zynq AP SoC)initramfs.cpio.gz (required for MicroBlaze and PowerPC) Output Files Produced uramdisk.image.gz Task Description There are two types of formats being used for root filesystems. Prebuilt images Prebuilt images can be found here: arm_ramdisk.image.gz for Zynq AP SoC (ARM) systems. Microblaze-le_minimal.cpio.gz for AXI (Little Endian) MicroBlaze systems.

Microblaze_minimal.cpio.gzfor PLB (Big Endian) MicroBlaze systems. Microblaze_complete.cpio.gzfor PLB (Big Endian) MicroBlaze systems. Modifying the root filesystem Initrd To modify an initial ramdisk: 1. 3. To create an initrd from scratch, tools such as Buildroot or Yocto may be used to populate the filesystem (with BusyBox, tools, etc.). Initramfs 2. Build Steps. Making an initramfs for a custom kernel. #!

making an initramfs for a custom kernel

/bin/sh set -e # grub-mkconfig helper script. . # Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc. Root file system (Linux)