Device Tree Overview

Xen-Tools

Uboot + Xen + Linux Kernel + BusyBox Build from Source

Build Rootfs + Xen Toolstack

Libvmi

YOCTO Xen + Tools + Libvmi

Drakvuf-on-ARM

FreeRTOS-Xen


Modern ARM Linux kernels can be built for one or more SoCs, and the kernel is booted with a Device Tree blob to describe the board in use.

You haven’t provided any details to indicate if the kernel you have is sufficient to boot your “ARM device”.

The problem now is what memory location do I tell U-boot to boot up the vmlinuz linux kernel?

ARM Linux should boot using a zImage file, not a vmlinuz file.

What is the start address of physical RAM on your device?

The convention is that the ARM Linux kernel will execute at the base of physical RAM plus an offset of 0x8000 (32K). See this answer for more details.

The zImage file is self-extracting, and can be loaded (by U-Boot from your SD card) to any suitable memory address above the kernel’s load/execute address (while leaving room for the DT blob and not clobber U-Boot).

Or pointing out some resources would be great as well.

Try Russel King’s Booting ARM Linux and Vincent Sanders’ Booting ARM Linux.

https://stackoverflow.com/questions/54273759/memory-location-for-linux-kernel-for-u-boot


TUTORIAL

printf "%x\n" `stat -c "%s" vmlinuz-lts`
# 0x80dc38
 
printf "%x\n" `stat -c "%s" dom0-kernel.bin`
# 0xe9fa00
 
printf "%x\n" `stat -c "%s" xen`
# 0xd0550
 
printf "%x\n" `stat -c "%s" dom0-rootfs.cpio.gz`
# 0x283d616
 
printf "%x\n" `stat -c "%s" rootfs.cpio.gz`
# 0x11af01
 
printf "%x\n" `stat -c "%s" virt-gicv3.dtb`
# 0x1efa
 
---------------------------------------------------------
 
DOM0-ROOTFS  = 0x417C29EA ---------- 0x44000000
DEVICE-TREE  = 0x44000000 ---------- 0x44001EFA
DOM0-KERNEL  = 0x47000000 ---------- 0x47E9FA00
XEN-KERNEL   = 0x49000000 ---------- 0x490D0550
DOMU-KERNEL  = 0x53000000 ---------- 0x5380DC38
DOMU-ROOTFS  = 0x58000000 ---------- 0x5811AF01
 
---------------------------------------------------------
 
qemu-system-aarch64 -D ./qemu-log.txt -machine virt,gic_version=3 -machine virtualization=true -cpu cortex-a57 -machine type=virt -m 4096 -smp 4 -bios u-boot.bin -device loader,file=xen,force-raw=on,addr=0x49000000 -device loader,file=dom0-kernel.bin,addr=0x47000000 -device loader,file=vmlinuz-lts,addr=0x53000000 -device loader,file=virt-gicv3.dtb,addr=0x44000000 -device loader,file=dom0-rootfs.cpio.gz,addr=0x417c29ea -device loader,file=rootfs.cpio.gz,addr=0x58000000 -nographic -no-reboot -chardev socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet -mon qemu-monitor,mode=readline
 
 
Xen version 4.12.2 (xen-4.12+gitAUTOINC+a5fcafbfbe-r0@poky) (aarch64-poky-linux-gcc (GCC) 9.3.0) debug=n  2020-01-14
 
---------------------------------------------------------
 
fdt addr 0x44000000
 
fdt resize
 
fdt set /chosen \#address-cells <1>
fdt set /chosen \#size-cells <1>
 
fdt mknod /chosen module@0
 
fdt set /chosen/module@0 compatible "xen,linux-zimage" "xen,multiboot-module"
fdt set /chosen/module@0 reg <0x47000000 0xe9fa00>
fdt set /chosen/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init   earlyprintk=serial,ttyAMA0 console=hvc0 earlycon=xenboot"
 
fdt resize
 
fdt mknod /chosen module@1
 
fdt set /chosen/module@1 compatible "xen,linux-initrd" "xen,multiboot-module"
fdt set /chosen/module@1 reg <0x417c29ea 0x283d616>
 
fdt mknod /chosen domU1
 
fdt set /chosen/domU1 compatible "xen,domain"
fdt set /chosen/domU1 \#address-cells <1>
fdt set /chosen/domU1 \#size-cells <1>
fdt set /chosen/domU1 \cpus <1>
fdt set /chosen/domU1 \memory <0 548576>
fdt set /chosen/domU1 vpl011
 
fdt mknod /chosen/domU1 module@0
 
fdt set /chosen/domU1/module@0 compatible "multiboot,kernel" "multiboot,module"
fdt set /chosen/domU1/module@0 reg <0x53000000 0x80dc38>
fdt set /chosen/domU1/module@0 bootargs "rw root=/dev/ram rdinit=/sbin/init console=ttyAMA0"
 
fdt mknod /chosen/domU1 module@1
 
fdt set /chosen/domU1/module@1 compatible "multiboot,ramdisk" "multiboot,module"
fdt set /chosen/domU1/module@1 reg <0x58000000 0x11af01>
 
booti 0x49000000 - 0x44000000

🌱 Back to Garden

8 items under this folder.