MLK-17786: imx8qm: add xen boot script
authorPeng Fan <peng.fan@nxp.com>
Tue, 13 Mar 2018 01:46:39 +0000 (09:46 +0800)
committerYe Li <ye.li@nxp.com>
Thu, 29 Apr 2021 07:56:21 +0000 (00:56 -0700)
Add XEN boot script to ease booting.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2fd813fcfcb82f28f353fbdc727765d6e848bfd7)
(cherry picked from commit 28caf1e050765a040b1290c210b40563b30cca3c)
(cherry picked from commit 9a50c211a07975cc36646a4188d1774260274429)
(cherry picked from commit 5637d852810c6de23f6acab2d3b4d1857c1ac1a5)

include/configs/imx8qm_mek.h

index 795e863..b0ee593 100644 (file)
 #define AHAB_ENV "sec_boot=no\0"
 #endif
 
+
+#define XEN_BOOT_ENV \
+            "xenhyper_bootargs=console=dtuart dtuart=/serial@5a060000 dom0_mem=2048M dom0_max_vcpus=2 dom0_vcpus_pin=true hmp-unsafe=true\0" \
+            "xenlinux_bootargs= \0" \
+            "xenlinux_console=hvc0 earlycon=xen\0" \
+            "xenboot_common=" \
+                "${get_cmd} ${loadaddr} xen;" \
+                "${get_cmd} ${fdt_addr} fsl-imx8qm-mek-dom0.dtb;" \
+                "${get_cmd} ${initrd_addr} ${image};" \
+                "fdt addr ${fdt_addr};" \
+                "fdt resize 256;" \
+                "fdt set /chosen/module@0 reg <0x00000000 ${initrd_addr} 0x00000000 0x${filesize}>; " \
+                "fdt set /chosen/module@0 bootargs \"${bootargs} ${xenlinux_bootargs}\"; " \
+                "setenv bootargs ${xenhyper_bootargs};" \
+                "booti ${loadaddr} - ${fdt_addr};" \
+            "\0" \
+            "xennetboot=" \
+                "setenv get_cmd dhcp;" \
+                "setenv console ${xenlinux_console};" \
+                "run netargs;" \
+                "run xenboot_common;" \
+            "\0" \
+            "xenmmcboot=" \
+                "setenv get_cmd \"fatload mmc ${mmcdev}:${mmcpart}\";" \
+                "setenv console ${xenlinux_console};" \
+                "run mmcargs;" \
+                "run xenboot_common;" \
+            "\0" \
 /* Boot M4 */
 #define M4_BOOT_ENV \
        "m4_0_image=m4_0.bin\0" \
 #define CONFIG_EXTRA_ENV_SETTINGS              \
        CONFIG_MFG_ENV_SETTINGS \
        M4_BOOT_ENV \
+       XEN_BOOT_ENV \
        AHAB_ENV \
        "script=boot.scr\0" \
        "image=Image\0" \