From 4c671ef548e2b7f352be184215306766ebc1cc45 Mon Sep 17 00:00:00 2001 From: Leonard Crestez Date: Wed, 29 Nov 2017 14:56:54 +0200 Subject: [PATCH] imx8qm_arm2: Add xen boot commands 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 --- include/configs/imx8qm_arm2.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/include/configs/imx8qm_arm2.h b/include/configs/imx8qm_arm2.h index 827cc3c1e5..d679c73677 100644 --- a/include/configs/imx8qm_arm2.h +++ b/include/configs/imx8qm_arm2.h @@ -126,9 +126,38 @@ "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" \ -- 2.17.1