imx8qm_arm2: Add xen boot commands
authorLeonard Crestez <leonard.crestez@nxp.com>
Wed, 29 Nov 2017 12:56:54 +0000 (14:56 +0200)
committerLeonard Crestez <leonard.crestez@nxp.com>
Fri, 15 Dec 2017 13:11:59 +0000 (15:11 +0200)
These commands try to be as generic as possible and avoid duplicating
argument values used for regular boot.

The fdt_file parameter still needs to be set to a .dtb for dom0. Booting
xen with stock dtb would require more hacks, for example lpuart
interrupt-parent = <&wu> needs to be removed.

Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
include/configs/imx8qm_arm2.h

index 827cc3c..d679c73 100644 (file)
        "initrd_high=0xffffffff\0" \
        "bootcmd_mfg=run mfgtool_args;booti ${loadaddr} ${initrd_addr} ${fdt_addr};\0" \
 
+#define XEN_BOOT_ENV \
+            "xenhyper_bootargs=console=dtuart dtuart=/serial@5a060000 dom0_mem=1024M\0" \
+            "xenlinux_bootargs=clk_ignore_unused\0" \
+            "xenlinux_console=hvc0 earlycon=xen\0" \
+            "xenboot_common=" \
+                "${get_cmd} ${loadaddr} xen;" \
+                "${get_cmd} ${fdt_addr} ${fdt_file};" \
+                "${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" \
+
 /* Initial environment variables */
 #define CONFIG_EXTRA_ENV_SETTINGS              \
        CONFIG_MFG_ENV_SETTINGS \
+       XEN_BOOT_ENV \
        M4_BOOT_ENV \
        "script=boot.scr\0" \
        "image=Image\0" \