MLK-19011-1 configs: imx8qxp_mek: add jailhouse boot env
authorPeng Fan <peng.fan@nxp.com>
Mon, 23 Jul 2018 07:29:07 +0000 (15:29 +0800)
committerYe Li <ye.li@nxp.com>
Fri, 24 May 2019 09:36:37 +0000 (02:36 -0700)
Add jailhouse boot env. Use `run jh_netboot` or `jh_mmcboot`
to boot Linux.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8a575a160b8e4f8cfdd79177a8f9551106395cf9)
(cherry picked from commit 864c2f9cb3463bfa715cbfd1d7ca16d8bd323003)

include/configs/imx8qxp_mek.h

index 4a4a610..abdb741 100644 (file)
        "loadm4image_0=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${m4_0_image}\0" \
        "m4boot_0=run loadm4image_0; dcache flush; bootaux ${loadaddr} 0\0" \
 
+#define JAILHOUSE_ENV \
+       "jh_mmcboot=" \
+               "setenv fdt_file fsl-imx8qxp-mek-root.dtb;"\
+               "setenv boot_os 'scu_rm dtb ${fdt_addr}; booti ${loadaddr} - ${fdt_addr};'; " \
+               "run mmcboot; \0" \
+       "jh_netboot=" \
+               "setenv fdt_file fsl-imx8qxp-mek-root.dtb;"\
+               "setenv boot_os 'scu_rm dtb ${fdt_addr}; booti ${loadaddr} - ${fdt_addr};'; " \
+               "run netboot; \0"
+
 #define XEN_BOOT_ENV \
             "xenhyper_bootargs=console=dtuart dtuart=/serial@5a060000 dom0_mem=1024M dom0_max_vcpus=2 dom0_vcpus_pin=true\0" \
             "xenlinux_bootargs= \0" \
 #define CONFIG_EXTRA_ENV_SETTINGS              \
        M4_BOOT_ENV \
        XEN_BOOT_ENV \
+       JAILHOUSE_ENV\
        AHAB_ENV \
        "script=boot.scr\0" \
        "image=Image\0" \
        "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
        "loadcntr=fatload mmc ${mmcdev}:${mmcpart} ${cntr_addr} ${cntr_file}\0" \
        "auth_os=auth_cntr ${cntr_addr}\0" \
+       "boot_os=booti ${loadaddr} - ${fdt_addr};\0" \
        "mmcboot=echo Booting from mmc ...; " \
                "run mmcargs; " \
                "if test ${sec_boot} = yes; then " \
                        "if run auth_os; then " \
-                               "booti ${loadaddr} - ${fdt_addr}; " \
+                               "run boot_os; " \
                        "else " \
                                "echo ERR: failed to authenticate; " \
                        "fi; " \
                "else " \
                        "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
                                "if run loadfdt; then " \
-                                       "booti ${loadaddr} - ${fdt_addr}; " \
+                                       "run boot_os; " \
                                "else " \
                                        "echo WARN: Cannot load the DT; " \
                                "fi; " \
                "if test ${sec_boot} = yes; then " \
                        "${get_cmd} ${cntr_addr} ${cntr_file}; " \
                        "if run auth_os; then " \
-                               "booti ${loadaddr} - ${fdt_addr}; " \
+                               "run boot_os; " \
                        "else " \
                                "echo ERR: failed to authenticate; " \
                        "fi; " \
                        "${get_cmd} ${loadaddr} ${image}; " \
                        "if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \
                                "if ${get_cmd} ${fdt_addr} ${fdt_file}; then " \
-                                       "booti ${loadaddr} - ${fdt_addr}; " \
+                                       "run boot_os; " \
                                "else " \
                                        "echo WARN: Cannot load the DT; " \
                                "fi; " \