I am using U-Boot on a Cubieboard 2, sun7i AllWinner A20 board to boot into ArchLinux ARM. The kernel version that I have is the sun7i latest, which is 3.4.103-5-ARCH so, in kernel terms, it's a bit behind the times but it is the most recent from the repos.I am learning about U-Boot and would like to see if I can boot using a zImage. I already have a uImage that works. This is an exercise to understand its operation.One reason for doing this is that the boot.txt shipped with ArchLinuxARM contains code to boot with an initramfs-linux.img but only if a zImage is used (the shipped code doesn't cater for an initramfs with a uImage).I am not asking how to boot an initrams with a uImage - I know how to do that. I am asking how to use a zImage with U-Boot.My uImage has this header:# mkimage -l uImage Image Name:   Linux-3.4.103-5-ARCHCreated:      Fri Jan 16 13:34:10 2015Image Type:   ARM Linux Kernel Image (uncompressed)Data Size:    3327616 Bytes = 3249.62 kB = 3.17 MBLoad Address: 40008000Entry Point:  40008000I can boot it manually with the following command sequence:mmc dev 0load mmc 0:1 0x48000000 /boot/uImageload mmc 0:1 0x43000000 /boot/script.binsetenv bootargs console=${console} root=/dev/sda6 rw rootwaitsetenv bootm_boot_mode sec bootm 0x48000000I extract the zImage from the uImage like this:$ tail -c+65 < uImage > zImageI check it looks ok$ file zImagezImage: Linux kernel ARM boot executable zImage (little-endian)I then try booting itmmc dev 0load mmc 0:1 0x42000000 /boot/zImagesetenv bootargs console=${console} root=/dev/sda6 rw rootwaitbootz 0x42000000But it doesn't work. All I see is Kernel image @ 0x42000000 [ 0x000000 - 0x32c680 ]Starting kernel ...I presume it's something to do with the script.bin that I load prior to bootm. If tried loading it prior to bootz but it made no difference. I also read abot a FDT file but I don't think the Arch Linix kernel package provides one. Nonetheless, bootm didn't need one so I would expect that bootz doesn't either (given the kernel image is the same).To be sure my zimage was ok, I made a new uImage from it and it booted fine.I derived the above commands and addresses from the boot.txt shipped with ArchLinuxARM.My U-boot version is:U-Boot 2015.01-1 (Jan 22 2015 - 16:37:34) Arch Linux ARMgcc (GCC) 4.9.2 20141224 (prerelease)GNU ld (GNU Binutils) 2.25
Can a zImage be used with U-Boot and ArchLinuxARM?
linux;linux kernel;u boot