Skip to content
ozaki-r edited this page Nov 1, 2012 · 3 revisions

Memos for myself in the future...

Compile a kernel

For Ubuntu 12.04

apt-get install gcc-arm-linux-gnueabi
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-

(Re)build a initramfs

mkdir initramfs ; cd initramfs
lzop -dc /some/where/initramfs.cpio.lzo | sudo cpio -i
# modify files
sudo find . | sudo cpio --quiet -H newc -o > /some/where/initramfs.cpio
lzop -c -9 /some/where/initramfs.cpio > /some/where/initramfs.cpio.lzo

Update DTB

If you updated initramfs (and its file size has been changed), you have to update DTB as well because DTB includes a kernel cmdline which specifies iniramfs size. This is example of a DTS file:

chosen {
        bootargs = "rw root=/dev/ram0 console=ttyAMA0 earlyprintk initrd=0x00800000,135433";
};

The number appearing the last of bootargs is initramfs size. After changed it, run dtc command to generate a DTB file from the DTS file:

dtc vexpress-armjs.dts -O dtb -o vexpress-armjs.dtb

dtc command is included in device-tree-compiler for Ubuntu 12.04.

Clone this wiki locally