[U-Boot] Booting linux zImage on vexpress-a15

Andre Wagner andre.wagner at richard-wolf.com
Tue Feb 5 18:05:55 UTC 2019


Hi @all,

I'm trying to build a linux kernel as zImage and boot it with u-boot on 
a qemu vexpress-a15 machine. The host machine is a Ubuntu 18.04.

What I tried until now:

1. Get Linux from git, export ARCH=arm and 
CROSS_COMPILE=arm-linux-gnueabihf-

2. Make Defconfig: make vexpress_defconfig

3. Enable 'Early Printk' with make menuconfig

4. Make Kernel: make

5. Get U-Boot from git, export ARCH=arm and 
CROSS_COMPILE=arm-linux-gnueabihf-

6. Make Defconfig: make vexpress_ca15_tc2_defconfig

7. Make U-Boot: make

8. Generate empty image file and mount it: truncate -s 100M image; 
mkfs.ext4 image; mount -o loop image /mnt

9. Copy zImage and DTB to image: cp arch/arm/boot/zImage /mnt ; cp 
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dtb /mnt

10. Unmount Image: umount /mnt

11. Start u-boot in qemu: qemu-system-arm -m 1024M -M vexpress-a15 -cpu 
cortex-a15 -kernel u-boot -serial stdio -sd image => U-Boot comes up and 
I can hit a key to stop automount, ok so far

12. In u-boot, checking filesystem on image: ext4ls mmc 0:0 => I can see 
my zImage and my DTB file, ok so far

13. In u-boot, loading kernel: ext4load mmc 0:0 82008000 zImage => XXXX 
bytes read is shown, ok so far

14. In u-boot, loading DTB: ext4load mmc 0:0 85000000 
vexpress-v2p-ca15_a7.dtb => YYYY bytes read, ok so far

15. In u-boot, boot: bootz 82008000 - 85000000 => 'Starting kernel ....' 
and 'Uncompressing kernel done' is shown and then nothing at all...


Cross-checks I have done right now:

- Booting kernel and DTB directly from qemu with 'qemu-system-arm -m 
1024M -M vexpress-a15 -cpu cortex-a15 -kernel arch/arm/boot/zImage  -dtb 
arch/arm/boot/dts/vexpress-v2p-ca15-tc1.dtb -serial stdio' works, normal 
boot output is shown. Also the standard console device ttyAMA0 is 
available after mounting devtmpfs.

- Same setup with vexpress-a9  (uboot with vexpress_ca9x4_defconfig, 
linux with vexpress_defconfig and DTB vexpress-v2p-ca9.dtb. The kernel 
was loaded to 62008000 and the DTB to 65000000) worked, Normal boot 
output was shown.


What I don't understand right now is:

- Am I using the corrected DTB? vexpress-v2p-ca15-tc1.dtb or 
vexpress-v2p-ca15_a7.dtb ? Which is the right one?

- What are the addresses I need to load kernel and the DTB? In the 
working vexpress-a9 sample the kernel was loaded with a offset of 
2008000h and the DTB with a offset of 5000000h to start of RAM at 
60000000h. So I decided use the same offsets with the alternate start of 
RAM address of 8000000h of vexpress-a15, i.e. kernel at 82008000 and DTB 
at 85000000. Is this assumption correct?

- 'Starting kernel...' is a last message from u-boot and 'Uncompressing 
kernel done' the first from the kernels self extractor?

- Where in RAM is the zImage decompressed by u-boot bootz? Between start 
of RAM at 80000000h and kernels loadaddr at 82008000h?

- What are the differences between loading kernel and DTB by qemu 
directly and loading kernel and DTB indirectly via u-boot?


Thank you very very much for your replies in advance.


Greetings,

André


+++
Richard Wolf GmbH, Pforzheimer Strasse 32, 75438 Knittlingen
Managing Directors: Juergen Pfab, Juergen Steinbeck. Trade Register: Mannheim HRB 510031 
+++
Richard Wolf GmbH routinely monitors the content of e-mail sent and received via its network for the purposes of ensuring compliance with its policies and procedures. Richard Wolf GmbH is not responsible for any changes made to the message after it has been sent. Where opinions are expressed, they are not necessarily those of Richard Wolf GmbH. This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to which they are addressed. If you are not the intended addressee, or the person responsible for delivering it to them, you may not copy, forward, disclose, or otherwise use it or any part of it in any way. To do so may be unlawful. If you receive this e-mail by mistake, please advise the sender immediately.
+++


More information about the U-Boot mailing list