Build initramfs/initrd for A10/A20

Initramfs can be used to speed up booting time of your device, also it can be used to preload kernel modules and use them to boot from

Login to your device via ssh and do everything from there.

apt-get install -y u-boot-tools initramfs-tools
mount /dev/mmcblk0p1 /boot
cp /proc/config.gz /tmp
gzip -df /tmp/config.gz
cp /tmp/config /boot/config-`uname -r`
update-initramfs -c -k `uname -r`
mkimage -A arm -T ramdisk -C none -n “uInitrd” -d /boot/initrd.img-`uname -r` /boot/uInitrd
rm -f /boot/initrd* /boot/config-*
umount /boot

then boot this ramdisk with this boot.cmd
setenv bootm_boot_mode sec
setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait panic=10 hdmi.audio=EDID:0 disp.screen0_output_mode=EDID:1280x720p50 rootfstype=ext4 rootflags=discard
fatload mmc 0 0x43000000 script.bin
fatload mmc 0 0x41000000 uImage
fatload mmc 0 0x50000000 uInitrd
bootm 0x41000000 0x50000000

don’t forget to convert boot.cmd to boot.scr
mkimage -C none -A arm -T script -d boot.cmd boot.scr

Build initramfs/initrd for A10/A20

Leave a comment