From 9a50c211a07975cc36646a4188d1774260274429 Mon Sep 17 00:00:00 2001 From: Peng Fan Date: Tue, 13 Mar 2018 09:46:39 +0800 Subject: [PATCH] MLK-17786: imx8qm: add xen boot script Add XEN boot script to ease booting. Signed-off-by: Peng Fan (cherry picked from commit 2fd813fcfcb82f28f353fbdc727765d6e848bfd7) (cherry picked from commit 28caf1e050765a040b1290c210b40563b30cca3c) --- include/configs/imx8qm_mek.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/include/configs/imx8qm_mek.h b/include/configs/imx8qm_mek.h index 76574cbb84..f1d94b14ac 100644 --- a/include/configs/imx8qm_mek.h +++ b/include/configs/imx8qm_mek.h @@ -101,6 +101,34 @@ #define CONFIG_LIB_RAND #define CONFIG_NET_RANDOM_ETHADDR + +#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" \ @@ -119,6 +147,7 @@ /* Initial environment variables */ #define CONFIG_EXTRA_ENV_SETTINGS \ M4_BOOT_ENV \ + XEN_BOOT_ENV \ "script=boot.scr\0" \ "image=Image\0" \ "panel=NULL\0" \ -- 2.17.1