Convert to new override syntax
[AGL/meta-agl.git] / meta-agl-bsp / meta-raspberrypi / recipes-bsp / rpi-u-boot-scr / files / boot_xen.cmd
1 #
2 # SPDX-License-Identifier: MIT
3 #
4 # Copyright (c) 2020, MERA
5 #
6 # Author: Leonid Lazarev
7 #
8 # Xen Boot Script
9 #
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.
13
14 setenv kernel_addr_r  0x00480000  # 16M
15 setenv xen_addr_r     0x00200000 # 2M
16
17 # Load xen to ${xen_addr_r}.
18 fatload mmc 0:1 ${xen_addr_r} /xen-@@MACHINE@@
19
20 #configure dom0
21 fdt addr ${fdt_addr}
22
23 #read prepared bootargs, rapsberry pi prepared initial list of the parameters for loading
24 fdt get value bootargs /chosen bootargs
25 fdt resize 8192
26
27 # add device type for raspberry
28 fdt set pcie0 device_type "pci"
29
30 fdt chosen
31 fdt set /chosen \#address-cells <1>
32 fdt set /chosen \#size-cells <1>
33
34 # Load Linux Image to ${kernel_addr_r}
35 fatload mmc 0:1 ${kernel_addr_r} /@@KERNEL_IMAGETYPE@@
36
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}"
41
42 fdt set /chosen/dom0 compatible "xen,linux-zimage", "xen,multiboot-module"
43 fdt set /chosen/dom0 reg <${kernel_addr_r} 0x${filesize} >
44
45 @@KERNEL_BOOTCMD@@ ${xen_addr_r} - ${fdt_addr}