warp7: Add a secure mode target
PATCH v2 1/3 warp7: Add a secure mode target
From: Fabio Estevam <[email protected]>
NXP kernel expects to boot in secure mode, so introduce warp7_secure_defconfig target which selects CONFIG_ARMV7_BOOT_SEC_DEFAULT.
---
Changes since v1:
- None
configs/warp7_secure_defconfig | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 configs/warp7_secure_defconfig
configs/warp7_secure_defconfig new file +36 -0
@@ -0,0 +1,36 @@ +CONFIG_ARM=y +CONFIG_ARCH_MX7=y +CONFIG_TARGET_WARP7=y +# CONFIG_ARMV7_VIRT is not set +CONFIG_IMX_RDC=y +CONFIG_IMX_BOOTAUX=y +CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/warp7/imximage.cfg" +CONFIG_HUSH_PARSER=y +# CONFIG_CMD_BOOTD is not set +CONFIG_CMD_BOOTZ=y +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_IMLS is not set +# CONFIG_CMD_XIMG is not set +CONFIG_CMD_MEMTEST=y +CONFIG_CMD_MMC=y +CONFIG_CMD_USB=y +CONFIG_CMD_DFU=y +CONFIG_CMD_USB_MASS_STORAGE=y +CONFIG_CMD_GPIO=y +# CONFIG_CMD_SETEXPR is not set +CONFIG_CMD_CACHE=y +CONFIG_CMD_EXT2=y +CONFIG_CMD_EXT4=y +CONFIG_CMD_EXT4_WRITE=y +CONFIG_CMD_FAT=y +CONFIG_USB=y +CONFIG_USB_GADGET=y +CONFIG_CI_UDC=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_G_DNL_MANUFACTURER="FSL" +CONFIG_G_DNL_VENDOR_NUM=0x0525 +CONFIG_G_DNL_PRODUCT_NUM=0xa4a5 +CONFIG_USB_EHCI_HCD=y +CONFIG_MXC_USB_OTG_HACTIVE=y +CONFIG_OF_LIBFDT=y +CONFIG_ARMV7_BOOT_SEC_DEFAULT=y
Signature · 1 line
1.9.1
PATCH v2 2/3 warp7: Use PARTUUID to specify the rootfs location
From: Fabio Estevam <[email protected]>
warp7 can run different kernel versions, such as NXP 4.1 or mainline.
Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.
In order to avoid such issue, use UUID method to specify the rootfs location.
Succesfully tested booting a NXP 4.1 and also a mainline kernel.
---
Changes since v1:
- Use UUID method
include/configs/warp7.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
include/configs/warp7.h +6 -3
@@ -29,6 +29,9 @@#define CONFIG_SYS_FSL_ESDHC_HAS_DDR_MODE #define CONFIG_SYS_MMC_IMG_LOAD_PART 1 +#define CONFIG_PARTITION_UUIDS +#define CONFIG_CMD_PART +#define CONFIG_DFU_ENV_SETTINGS \ "dfu_alt_info=boot raw 0x2 0x400 mmcpart 1\0" \
@@ -45,9 +48,9 @@"ip_dyn=yes\0" \ "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \ "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \ -"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \ +"finduuid=part uuid mmc 0:2 uuid\0" \"mmcargs=setenv bootargs console=${console},${baudrate} " \ -"root=${mmcroot}\0" \ +"root=PARTUUID=${uuid} rootwait rw\0" \"loadbootscript=" \"fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \"bootscript=echo Running bootscript from mmc ...; " \
@@ -55,6 +58,7 @@"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \"mmcboot=echo Booting from mmc ...; " \ +"run finduuid; " \"run mmcargs; " \"if test ${boot_fdt} = yes || test ${boot_fdt} = try; then " \"if run loadfdt; then " \
@@ -113,7 +117,6 @@#define CONFIG_SYS_MMC_ENV_DEV 0#define CONFIG_SYS_MMC_ENV_PART 0 -#define CONFIG_MMCROOT "/dev/mmcblk2p2"/* USB Configs */ #define CONFIG_USB_STORAGE
Signature · 1 line
1.9.1
PATCH v2 2/3 warp7: Use PARTUUID to specify the rootfs location
Hi Stefano,
Quoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
warp7 can run different kernel versions, such as NXP 4.1 or mainline.
Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.
Quoted 6 lines
In order to avoid such issue, use UUID method to specify the rootfs location.
Succesfully tested booting a NXP 4.1 and also a mainline kernel.
Signed-off-by Fabio Estevam <[email protected]>
Are you happy with this series? Could it go to 2016.09?
Thanks
PATCH v2 2/3 warp7: Use PARTUUID to specify the rootfs location
Hi Fabio,
Quoted 11 lines · Fabio Estevam
Hi Stefano,
Quoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
warp7 can run different kernel versions, such as NXP 4.1 or mainline.
Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.
Quoted 8 lines
Quoted 6 lines
In order to avoid such issue, use UUID method to specify the rootfs location.
Succesfully tested booting a NXP 4.1 and also a mainline kernel.
Signed-off-by Fabio Estevam <[email protected]>Are you happy with this series?
Yes.
Quoted 1 line
Could it go to 2016.09?
I'll merge it.
Regards,
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 2/3 warp7: Use PARTUUID to specify the rootfs location
In reply to Fabio EstevamQuoted 8 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
warp7 can run different kernel versions, such as NXP 4.1 or mainline.
Currently the rootfs location is passed via mmcblk number and the problem with this approach is that the mmcblk number for the eMMC changes depending on the kernel version.
Quoted 7 lines
In order to avoid such issue, use UUID method to specify the rootfs location.
Succesfully tested booting a NXP 4.1 and also a mainline kernel.
Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 3/3 warp7: Print secure/non-secure mode info
In reply to Fabio EstevamFrom: Fabio Estevam <[email protected]>
warp7 has two targets:
- warp7_defconfig: boots in non-secure mode
- warp7_secure_defconfig: boots in secure mode
Print the mode that is being used to help users to easily identify which target is running on the board.
---
Changes since v1:
- None
board/warp7/warp7.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
board/warp7/warp7.c +8 -1
@@ -95,7 +95,14 @@ int board_init(void)int checkboard (void ) { -puts ("Board: WARP7\n" ); +char *mode; + +if (IS_ENABLED (CONFIG_ARMV7_BOOT_SEC_DEFAULT )) + mode ="secure" ; +else + mode ="non-secure" ; + +printf ("Board: WARP7 in %s mode\n" , mode);return 0 ; }
Signature · 1 line
1.9.1
PATCH v2 1/3 warp7: Add a secure mode target
In reply to Fabio EstevamQuoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
NXP kernel expects to boot in secure mode, so introduce
warp7_secure_defconfigtarget which selectsCONFIG_ARMV7_BOOT_SEC_DEFAULT.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 1/3 warp7: Add a secure mode target
Hi Stefano,
Quoted 10 lines · Stefano Babic
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
NXP kernel expects to boot in secure mode, so introduce
warp7_secure_defconfigtarget which selectsCONFIG_ARMV7_BOOT_SEC_DEFAULT.Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks !
I don't see this series applied in
http://git.denx.de/?p=u-boot/u-boot-imx.git;a=shortlog
Are they missing?
Thanks
PATCH v2 1/3 warp7: Add a secure mode target
Quoted 12 lines · Fabio Estevam
Hi Stefano,
Quoted 9 lines · Stefano Babic
Quoted 7 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
NXP kernel expects to boot in secure mode, so introduce
warp7_secure_defconfigtarget which selectsCONFIG_ARMV7_BOOT_SEC_DEFAULT.Signed-off-by Fabio Estevam <[email protected]>---
Quoted 6 lines
Quoted 1 line
Applied to u-boot-imx, thanks !
I don't see this series applied in
http://git.denx.de/?p=u-boot/u-boot-imx.git;a=shortlogAre they missing?
You're right, strange, something went wrong. Now they are on the server.
Thanks for checking !
Stefano
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================
PATCH v2 1/3 warp7: Add a secure mode target
Quoted 1 line · Stefano Babic
You're right, strange, something went wrong. Now they are on the server.
Ok, great. As these three patches didn't make into your pull request to Tom: will you submit another pull request which includes them?
Thanks