Commit 2fd813fcfcb82f28f353fbdc727765d6e848bfd7

Authored by Peng Fan
1 parent a690fe2f3c

MLK-17786: imx8qm: add xen boot script

Add XEN boot script to ease booting.

Signed-off-by: Peng Fan <peng.fan@nxp.com>

Showing 1 changed file with 29 additions and 1 deletions Side-by-side Diff

include/configs/imx8qm_mek.h
... ... @@ -90,6 +90,34 @@
90 90 #define CONFIG_LIB_RAND
91 91 #define CONFIG_NET_RANDOM_ETHADDR
92 92  
  93 +
  94 +#define XEN_BOOT_ENV \
  95 + "xenhyper_bootargs=console=dtuart dtuart=/serial@5a060000 dom0_mem=2048M dom0_max_vcpus=2 dom0_vcpus_pin=true hmp-unsafe=true\0" \
  96 + "xenlinux_bootargs= \0" \
  97 + "xenlinux_console=hvc0 earlycon=xen\0" \
  98 + "xenboot_common=" \
  99 + "${get_cmd} ${loadaddr} xen;" \
  100 + "${get_cmd} ${fdt_addr} fsl-imx8qm-mek-dom0.dtb;" \
  101 + "${get_cmd} ${initrd_addr} ${image};" \
  102 + "fdt addr ${fdt_addr};" \
  103 + "fdt resize 256;" \
  104 + "fdt set /chosen/module@0 reg <0x00000000 ${initrd_addr} 0x00000000 0x${filesize}>; " \
  105 + "fdt set /chosen/module@0 bootargs \"${bootargs} ${xenlinux_bootargs}\"; " \
  106 + "setenv bootargs ${xenhyper_bootargs};" \
  107 + "booti ${loadaddr} - ${fdt_addr};" \
  108 + "\0" \
  109 + "xennetboot=" \
  110 + "setenv get_cmd dhcp;" \
  111 + "setenv console ${xenlinux_console};" \
  112 + "run netargs;" \
  113 + "run xenboot_common;" \
  114 + "\0" \
  115 + "xenmmcboot=" \
  116 + "setenv get_cmd \"fatload mmc ${mmcdev}:${mmcpart}\";" \
  117 + "setenv console ${xenlinux_console};" \
  118 + "run mmcargs;" \
  119 + "run xenboot_common;" \
  120 + "\0" \
93 121 /* Boot M4 */
94 122 #define M4_BOOT_ENV \
95 123 "m4_0_image=m4_0.bin\0" \
... ... @@ -123,6 +151,7 @@
123 151 #define CONFIG_EXTRA_ENV_SETTINGS \
124 152 CONFIG_MFG_ENV_SETTINGS \
125 153 M4_BOOT_ENV \
  154 + XEN_BOOT_ENV \
126 155 "script=boot.scr\0" \
127 156 "image=Image\0" \
128 157 "panel=NULL\0" \
... ... @@ -310,6 +339,5 @@
310 339 #define CONFIG_OF_SYSTEM_SETUP
311 340 #define BOOTAUX_RESERVED_MEM_BASE 0x88000000
312 341 #define BOOTAUX_RESERVED_MEM_SIZE 0x08000000 /* Reserve from second 128MB */
313   -
314 342 #endif /* __IMX8QM_MEK_H */