From ca087a4d77acd0752ff5447d4c8156e8761ee528 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Mon, 22 Nov 2021 11:47:18 +0100 Subject: u-boot-toradex: colibri-imx7: boot linux kernel in non-secure/secure mode While NXP i.MX 7 downstream requires the Linux kernel to boot in secure mode mainline/upstream requires non-secure mode instead, as it properly uses PSCI to control further cores. Mainline boots in non-secure mode by default. Add the appropriate environment variable if building a downstream kernel. Related-to: ELB-4090 Signed-off-by: Max Krummenacher --- ...bri_imx7-boot-linux-kernel-in-secure-mode.patch | 31 ++++++++++++++++++++++ recipes-bsp/u-boot/u-boot_%.bbappend | 6 +++++ 2 files changed, 37 insertions(+) create mode 100644 recipes-bsp/u-boot/u-boot/0001-colibri_imx7-boot-linux-kernel-in-secure-mode.patch diff --git a/recipes-bsp/u-boot/u-boot/0001-colibri_imx7-boot-linux-kernel-in-secure-mode.patch b/recipes-bsp/u-boot/u-boot/0001-colibri_imx7-boot-linux-kernel-in-secure-mode.patch new file mode 100644 index 0000000..4a19cd0 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/0001-colibri_imx7-boot-linux-kernel-in-secure-mode.patch @@ -0,0 +1,31 @@ +From 645496d7a35ce78f4057f5668ed210204c7acef0 Mon Sep 17 00:00:00 2001 +From: Marcel Ziswiler +Date: Wed, 30 Sep 2020 16:37:54 +0200 +Subject: [PATCH] colibri_imx7: boot linux kernel in secure mode + +While NXP i.MX 7 downstream requires the Linux kernel to boot in secure +mode mainline/upstream requires non-secure mode instead, as it properly +uses PSCI to control further cores. + +Signed-off-by: Marcel Ziswiler +Reworked for mainline U-Boot. +Signed-off-by: Max Krummenacher +--- + include/configs/colibri_imx7.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h +index ac188ee3ac..82b3ff9323 100644 +--- a/include/configs/colibri_imx7.h ++++ b/include/configs/colibri_imx7.h +@@ -142,6 +142,7 @@ + MODULE_EXTRA_ENV_SETTINGS \ + UBOOT_UPDATE \ + "boot_file=zImage\0" \ ++ "bootm_boot_mode=sec\0" \ + "bootubipart=ubi\0" \ + "console=ttymxc0\0" \ + "defargs=\0" \ +-- +2.20.1 + diff --git a/recipes-bsp/u-boot/u-boot_%.bbappend b/recipes-bsp/u-boot/u-boot_%.bbappend index dd62328..c8ac4db 100644 --- a/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/recipes-bsp/u-boot/u-boot_%.bbappend @@ -1,5 +1,11 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + SRCREV:use-head-next = "${AUTOREV}" +SRC_URI:append:use-nxp-bsp = " \ + file://0001-colibri_imx7-boot-linux-kernel-in-secure-mode.patch \ +" + PADDING_DIR = "${B}" nand_padding () { # pad the end of U-Boot with 0x00 up to the the end of the CSF area -- cgit v1.2.3