* [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target
@ 2016-08-26 0:07 Fabio Estevam
2016-08-26 0:07 ` [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location Fabio Estevam
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Fabio Estevam @ 2016-08-26 0:07 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@nxp.com>
NXP kernel expects to boot in secure mode, so introduce
warp7_secure_defconfig target which selects CONFIG_ARMV7_BOOT_SEC_DEFAULT.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- None
configs/warp7_secure_defconfig | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 configs/warp7_secure_defconfig
diff --git a/configs/warp7_secure_defconfig b/configs/warp7_secure_defconfig
new file mode 100644
index 0000000..34fcdea
--- /dev/null
+++ b/configs/warp7_secure_defconfig
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location
2016-08-26 0:07 [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target Fabio Estevam
@ 2016-08-26 0:07 ` Fabio Estevam
2016-09-02 20:35 ` Fabio Estevam
2016-09-06 8:09 ` Stefano Babic
2016-08-26 0:07 ` [U-Boot] [PATCH v2 3/3] warp7: Print secure/non-secure mode info Fabio Estevam
2016-09-06 8:09 ` [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target Stefano Babic
2 siblings, 2 replies; 10+ messages in thread
From: Fabio Estevam @ 2016-08-26 0:07 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@nxp.com>
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.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- Use UUID method
include/configs/warp7.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/configs/warp7.h b/include/configs/warp7.h
index 91009a8..a695507 100644
--- a/include/configs/warp7.h
+++ b/include/configs/warp7.h
@@ -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
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location
2016-08-26 0:07 ` [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location Fabio Estevam
@ 2016-09-02 20:35 ` Fabio Estevam
2016-09-03 9:36 ` Stefano Babic
2016-09-06 8:09 ` Stefano Babic
1 sibling, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2016-09-02 20:35 UTC (permalink / raw)
To: u-boot
Hi Stefano,
On Thu, Aug 25, 2016 at 9:07 PM, Fabio Estevam <festevam@gmail.com> wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Are you happy with this series? Could it go to 2016.09?
Thanks
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location
2016-09-02 20:35 ` Fabio Estevam
@ 2016-09-03 9:36 ` Stefano Babic
0 siblings, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2016-09-03 9:36 UTC (permalink / raw)
To: u-boot
Hi Fabio,
On 02/09/2016 22:35, Fabio Estevam wrote:
> Hi Stefano,
>
> On Thu, Aug 25, 2016 at 9:07 PM, Fabio Estevam <festevam@gmail.com> wrote:
>> From: Fabio Estevam <fabio.estevam@nxp.com>
>>
>> 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.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>
> Are you happy with this series?
Yes.
> Could it go to 2016.09?
I'll merge it.
Regards,
Stefano
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location
2016-08-26 0:07 ` [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location Fabio Estevam
2016-09-02 20:35 ` Fabio Estevam
@ 2016-09-06 8:09 ` Stefano Babic
1 sibling, 0 replies; 10+ messages in thread
From: Stefano Babic @ 2016-09-06 8:09 UTC (permalink / raw)
To: u-boot
On 26/08/2016 02:07, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> 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.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 3/3] warp7: Print secure/non-secure mode info
2016-08-26 0:07 [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target Fabio Estevam
2016-08-26 0:07 ` [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location Fabio Estevam
@ 2016-08-26 0:07 ` Fabio Estevam
2016-09-06 8:09 ` [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target Stefano Babic
2 siblings, 0 replies; 10+ messages in thread
From: Fabio Estevam @ 2016-08-26 0:07 UTC (permalink / raw)
To: u-boot
From: Fabio Estevam <fabio.estevam@nxp.com>
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.
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
Changes since v1:
- None
board/warp7/warp7.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c
index 27e31f3..d3d2a0e 100644
--- a/board/warp7/warp7.c
+++ b/board/warp7/warp7.c
@@ -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;
}
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target
2016-08-26 0:07 [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target Fabio Estevam
2016-08-26 0:07 ` [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location Fabio Estevam
2016-08-26 0:07 ` [U-Boot] [PATCH v2 3/3] warp7: Print secure/non-secure mode info Fabio Estevam
@ 2016-09-06 8:09 ` Stefano Babic
2016-09-06 10:58 ` Fabio Estevam
2 siblings, 1 reply; 10+ messages in thread
From: Stefano Babic @ 2016-09-06 8:09 UTC (permalink / raw)
To: u-boot
On 26/08/2016 02:07, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
>
> NXP kernel expects to boot in secure mode, so introduce
> warp7_secure_defconfig target which selects CONFIG_ARMV7_BOOT_SEC_DEFAULT.
>
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> ---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target
2016-09-06 8:09 ` [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target Stefano Babic
@ 2016-09-06 10:58 ` Fabio Estevam
2016-09-06 11:08 ` Stefano Babic
0 siblings, 1 reply; 10+ messages in thread
From: Fabio Estevam @ 2016-09-06 10:58 UTC (permalink / raw)
To: u-boot
Hi Stefano,
On Tue, Sep 6, 2016 at 5:09 AM, Stefano Babic <sbabic@denx.de> wrote:
> On 26/08/2016 02:07, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@nxp.com>
>>
>> NXP kernel expects to boot in secure mode, so introduce
>> warp7_secure_defconfig target which selects CONFIG_ARMV7_BOOT_SEC_DEFAULT.
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>> ---
>
> 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
^ permalink raw reply [flat|nested] 10+ messages in thread
* [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target
2016-09-06 10:58 ` Fabio Estevam
@ 2016-09-06 11:08 ` Stefano Babic
2016-09-06 14:44 ` Fabio Estevam
0 siblings, 1 reply; 10+ messages in thread
From: Stefano Babic @ 2016-09-06 11:08 UTC (permalink / raw)
To: u-boot
On 06/09/2016 12:58, Fabio Estevam wrote:
> Hi Stefano,
>
> On Tue, Sep 6, 2016 at 5:09 AM, Stefano Babic <sbabic@denx.de> wrote:
>> On 26/08/2016 02:07, Fabio Estevam wrote:
>>> From: Fabio Estevam <fabio.estevam@nxp.com>
>>>
>>> NXP kernel expects to boot in secure mode, so introduce
>>> warp7_secure_defconfig target which selects CONFIG_ARMV7_BOOT_SEC_DEFAULT.
>>>
>>> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>>> ---
>>
>> 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?
You're right, strange, something went wrong. Now they are on the server.
Thanks for checking !
Stefano
--
=====================================================================
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
=====================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2016-09-06 14:44 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-26 0:07 [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target Fabio Estevam
2016-08-26 0:07 ` [U-Boot] [PATCH v2 2/3] warp7: Use PARTUUID to specify the rootfs location Fabio Estevam
2016-09-02 20:35 ` Fabio Estevam
2016-09-03 9:36 ` Stefano Babic
2016-09-06 8:09 ` Stefano Babic
2016-08-26 0:07 ` [U-Boot] [PATCH v2 3/3] warp7: Print secure/non-secure mode info Fabio Estevam
2016-09-06 8:09 ` [U-Boot] [PATCH v2 1/3] warp7: Add a secure mode target Stefano Babic
2016-09-06 10:58 ` Fabio Estevam
2016-09-06 11:08 ` Stefano Babic
2016-09-06 14:44 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox