2 # SPDX-License-Identifier: MIT
4 # Copyright (c) 2020, MERA
6 # Author: Leonid Lazarev
10 # https://www.raspberrypi.org/documentation/configuration/device-tree.md
11 # We do not set fdt_addr, because device tree initially is loaded by raspberry pi firmware loader and the particular
12 # modification are performed. The prepared DTS is propagated to u-boot and this prepared device tree has to be reused.
14 setenv kernel_addr_r 0x00480000 # 16M
15 setenv xen_addr_r 0x00200000 # 2M
17 # Load xen to ${xen_addr_r}.
18 fatload mmc 0:1 ${xen_addr_r} /xen-@@MACHINE@@
23 #read prepared bootargs, rapsberry pi prepared initial list of the parameters for loading
24 fdt get value bootargs /chosen bootargs
27 # add device type for raspberry
28 fdt set pcie0 device_type "pci"
31 fdt set /chosen \#address-cells <1>
32 fdt set /chosen \#size-cells <1>
34 # Load Linux Image to ${kernel_addr_r}
35 fatload mmc 0:1 ${kernel_addr_r} /@@KERNEL_IMAGETYPE@@
37 # we load dom0 with 1512 MB of memory
38 fdt mknod /chosen dom0
39 fdt set /chosen xen,xen-bootargs "console=dtuart dtuart=/soc/serial@7e215040 sync_console dom0_mem=1512M bootscrub=0"
40 fdt set /chosen xen,dom0-bootargs "${bootargs}"
42 fdt set /chosen/dom0 compatible "xen,linux-zimage", "xen,multiboot-module"
43 fdt set /chosen/dom0 reg <${kernel_addr_r} 0x${filesize} >
45 @@KERNEL_BOOTCMD@@ ${xen_addr_r} - ${fdt_addr}