-
Notifications
You must be signed in to change notification settings - Fork 48
HowTo
ozaki-r edited this page Nov 1, 2012
·
3 revisions
Memos for myself in the future...
For Ubuntu 12.04
apt-get install gcc-arm-linux-gnueabi
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
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
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.