Skip to contentSkip to conversation

configs: stm32mp1: enable fastboot support of eMMC boot partition

PATCH New Patrick Delaunay 2 participants 12 messages Sep 9, 2020 – Feb 9, 2021 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/4 configs: stm32mp1: enable fastboot support of eMMC boot partition

From: Jean-Philippe ROMAIN <[email protected]>

Activate fastboot support on boot partition for eMMC, mmc1 device on STMicroelectronics board (EV1).

---

 configs/stm32mp15_basic_defconfig   | 5 +++++
 configs/stm32mp15_trusted_defconfig | 5 +++++
 2 files changed, 10 insertions(+)
configs/stm32mp15_basic_defconfig +5 -0
index a8c4112dbe..fc3d2cc4fb 100644
@@ -80,6 +80,11 @@ CONFIG_FASTBOOT_USB_DEV=1
 CONFIG_FASTBOOT_FLASH=y
 CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_GPIO_HOG=y
+CONFIG_FASTBOOT_MMC_BOOT_SUPPORT=y
+CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc1boot0"
+CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
+CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
+CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
configs/stm32mp15_trusted_defconfig +5 -0
index 0792884a9d..bfe9e6b06c 100644
@@ -60,6 +60,11 @@ CONFIG_FASTBOOT_USB_DEV=1
 CONFIG_FASTBOOT_FLASH=y
 CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_GPIO_HOG=y
+CONFIG_FASTBOOT_MMC_BOOT_SUPPORT=y
+CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc1boot0"
+CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
+CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
+CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/4 configs: stm32mp1: enable fastboot support of eMMC boot partition

Hi,

Quoted 8 lines

From: Patrick DELAUNAY <[email protected]>
Sent: mercredi 9 septembre 2020 15:25

From: Jean-Philippe ROMAIN <[email protected]>

Activate fastboot support on boot partition for eMMC, mmc1 device on STMicroelectronics board (EV1).

Quoted 8 lines

---

 configs/stm32mp15_basic_defconfig   | 5 +++++
 configs/stm32mp15_trusted_defconfig | 5 +++++
 2 files changed, 10 insertions(+)

Applied to u-boot-stm/master, thanks!

Regards

Patrick

#2 lore raw

PATCH 2/4 configs: stm32mp1: enable the fastboot oem command format

In reply to Patrick Delaunay

From: Jean-Philippe ROMAIN <[email protected]>

Enable the fastboot oem command format and set the variable "partitions" with default eMMC partitions list.

---

 configs/stm32mp15_basic_defconfig   |  1 +
 configs/stm32mp15_trusted_defconfig |  1 +
 include/configs/stm32mp1.h          | 14 ++++++++++++++
 3 files changed, 16 insertions(+)
configs/stm32mp15_basic_defconfig +1 -0
index fc3d2cc4fb..0f705eccb2 100644
@@ -85,6 +85,7 @@ CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc1boot0"
 CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
 CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
configs/stm32mp15_trusted_defconfig +1 -0
index bfe9e6b06c..3e9cca6a1e 100644
@@ -65,6 +65,7 @@ CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc1boot0"
 CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
 CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
include/configs/stm32mp1.h +14 -0
index b937233797..e3cbca9713 100644
@@ -140,6 +140,19 @@
 		"run distro_bootcmd;" \
 	"fi;\0"
 
+#ifdef CONFIG_FASTBOOT_CMD_OEM_FORMAT
+/* eMMC default partitions for fastboot command: oem format */
+#define PARTS_DEFAULT \
+	"partitions=" \
+	"name=ssbl,size=2M;" \
+	"name=bootfs,size=64MB,bootable;" \
+	"name=vendorfs,size=16M;" \
+	"name=rootfs,size=746M;" \
+	"name=userfs,size=-\0"
+#else
+#define PARTS_DEFAULT
+#endif
+
 #include <config_distro_bootcmd.h>
 
 /*
@@ -158,6 +171,7 @@
 	"altbootcmd=run bootcmd\0" \
 	"env_check=if env info -p -d -q; then env save; fi\0" \
 	STM32MP_BOOTCMD \
+	PARTS_DEFAULT \
 	BOOTENV \
 	"boot_net_usb_start=true\0"
 
Signature · 1 line
2.17.1
#3 lore raw

PATCH 2/4 configs: stm32mp1: enable the fastboot oem command format

Hi Patrick

Quoted 63 lines · Patrick Delaunay

From: Jean-Philippe ROMAIN <[email protected]>

Enable the fastboot oem command format and set the variable "partitions" with default eMMC partitions list.

---

 configs/stm32mp15_basic_defconfig   |  1 +
 configs/stm32mp15_trusted_defconfig |  1 +
 include/configs/stm32mp1.h          | 14 ++++++++++++++
 3 files changed, 16 insertions(+)
configs/stm32mp15_basic_defconfig +1 -0
index fc3d2cc4fb..0f705eccb2 100644
@@ -85,6 +85,7 @@ CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc1boot0"
 CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
 CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
configs/stm32mp15_trusted_defconfig +1 -0
index bfe9e6b06c..3e9cca6a1e 100644
@@ -65,6 +65,7 @@ CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc1boot0"
 CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
 CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
include/configs/stm32mp1.h +13 -0
index b937233797..e3cbca9713 100644
@@ -140,6 +140,19 @@
 		"run distro_bootcmd;" \
 	"fi;\0"
 
+#ifdef CONFIG_FASTBOOT_CMD_OEM_FORMAT
+/* eMMC default partitions for fastboot command: oem format */
+#define PARTS_DEFAULT \
+	"partitions=" \
+	"name=ssbl,size=2M;" \
+	"name=bootfs,size=64MB,bootable;" \
+	"name=vendorfs,size=16M;" \
+	"name=rootfs,size=746M;" \
+	"name=userfs,size=-\0"
+#else
+#define PARTS_DEFAULT
+#endif
+
 #include <config_distro_bootcmd.h>
 
 /*

include/configs/stm32mp1.h line 177

Quoted 7 lines
include/configs/stm32mp1.h +1 -0
@@ -158,6 +171,7 @@
 	"altbootcmd=run bootcmd\0" \
 	"env_check=if env info -p -d -q; then env save; fi\0" \
 	STM32MP_BOOTCMD \
+	PARTS_DEFAULT \
 	BOOTENV \
 	"boot_net_usb_start=true\0"
 

Thanks

#4 lore raw

PATCH 2/4 configs: stm32mp1: enable the fastboot oem command format

In reply to Patrick Delaunay

Hi,

Quoted 8 lines

From: Patrick DELAUNAY <[email protected]>
Sent: mercredi 9 septembre 2020 15:25

From: Jean-Philippe ROMAIN <[email protected]>

Enable the fastboot oem command format and set the variable "partitions" with default eMMC partitions list.

Quoted 9 lines

---

 configs/stm32mp15_basic_defconfig   |  1 +
 configs/stm32mp15_trusted_defconfig |  1 +
 include/configs/stm32mp1.h          | 14 ++++++++++++++
 3 files changed, 16 insertions(+)

Applied to u-boot-stm/master, thanks!

Regards

Patrick

#5 lore raw

PATCH 3/4 configs: stm32mp1: enable the fastboot oem command partconf

In reply to Patrick Delaunay

Enable the fastboot oem command partconf, used to select the correct eMMC boot partition, with same format than 'mmc partconf' with parameter: boot_ack boot_partition
On stm32mp1 family:
- boot_ack = 1 (Boot Acknowledge is needed by ROM code)
- boot_partition = 1 or 2 (Boot partition 1 / 2 enabled for boot)

So on EV1 board the expected commands to select boot partition 1 or 2 $> fastboot oem partconf:1 1
$> fastboot oem partconf:1 2

---

 configs/stm32mp15_basic_defconfig   | 1 +
 configs/stm32mp15_trusted_defconfig | 1 +
 2 files changed, 2 insertions(+)
configs/stm32mp15_basic_defconfig +1 -0
index 0f705eccb2..6cbfbe5274 100644
@@ -86,6 +86,7 @@ CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
 CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
+CONFIG_FASTBOOT_CMD_OEM_PARTCONF=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
configs/stm32mp15_trusted_defconfig +1 -0
index 3e9cca6a1e..cc114896df 100644
@@ -66,6 +66,7 @@ CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
 CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
+CONFIG_FASTBOOT_CMD_OEM_PARTCONF=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
Signature · 1 line
2.17.1
#6 lore raw

PATCH 3/4 configs: stm32mp1: enable the fastboot oem command partconf

Hi Patrick

Quoted 35 lines · Patrick Delaunay

Enable the fastboot oem command partconf, used to select the correct eMMC boot partition, with same format than 'mmc partconf' with parameter: boot_ack boot_partition
On stm32mp1 family:
- boot_ack = 1 (Boot Acknowledge is needed by ROM code)
- boot_partition = 1 or 2 (Boot partition 1 / 2 enabled for boot)

So on EV1 board the expected commands to select boot partition 1 or 2 $> fastboot oem partconf:1 1
$> fastboot oem partconf:1 2

---

 configs/stm32mp15_basic_defconfig   | 1 +
 configs/stm32mp15_trusted_defconfig | 1 +
 2 files changed, 2 insertions(+)
configs/stm32mp15_basic_defconfig +1 -0
index 0f705eccb2..6cbfbe5274 100644
@@ -86,6 +86,7 @@ CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
 CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
+CONFIG_FASTBOOT_CMD_OEM_PARTCONF=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
configs/stm32mp15_trusted_defconfig +0 -0
index 3e9cca6a1e..cc114896df 100644

configs/stm32mp15_trusted_defconfig CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1" · line 72

Quoted 7 lines
configs/stm32mp15_trusted_defconfig +1 -0
@@ -66,6 +66,7 @@ CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
 CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
+CONFIG_FASTBOOT_CMD_OEM_PARTCONF=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y

Thanks

#7 lore raw

PATCH 3/4 configs: stm32mp1: enable the fastboot oem command partconf

In reply to Patrick Delaunay

Hi,

Quoted 13 lines

From: Patrick DELAUNAY <[email protected]>
Sent: mercredi 9 septembre 2020 15:25

Enable the fastboot oem command partconf, used to select the correct eMMC boot partition, with same format than 'mmc partconf'
with parameter: boot_ack boot_partition
On stm32mp1 family:
- boot_ack = 1 (Boot Acknowledge is needed by ROM code)
- boot_partition = 1 or 2 (Boot partition 1 / 2 enabled for boot)

So on EV1 board the expected commands to select boot partition 1 or 2 $> fastboot oem partconf:1 1 $> fastboot oem partconf:1 2

Quoted 7 lines

---

 configs/stm32mp15_basic_defconfig   | 1 +
 configs/stm32mp15_trusted_defconfig | 1 +
 2 files changed, 2 insertions(+)

Applied to u-boot-stm/master, thanks!

Regards

Patrick

#8 lore raw

PATCH 1/4 configs: stm32mp1: enable fastboot support of eMMC boot partition

In reply to Patrick Delaunay

Hi Patrick

Quoted 35 lines · Patrick Delaunay

From: Jean-Philippe ROMAIN <[email protected]>

Activate fastboot support on boot partition for eMMC, mmc1 device on STMicroelectronics board (EV1).

---

 configs/stm32mp15_basic_defconfig   | 5 +++++
 configs/stm32mp15_trusted_defconfig | 5 +++++
 2 files changed, 10 insertions(+)
configs/stm32mp15_basic_defconfig +5 -0
index a8c4112dbe..fc3d2cc4fb 100644
@@ -80,6 +80,11 @@ CONFIG_FASTBOOT_USB_DEV=1
 CONFIG_FASTBOOT_FLASH=y
 CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_GPIO_HOG=y
+CONFIG_FASTBOOT_MMC_BOOT_SUPPORT=y
+CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc1boot0"
+CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
+CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
+CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
configs/stm32mp15_trusted_defconfig +0 -0
index 0792884a9d..bfe9e6b06c 100644
@@ -60,6 +60,11 @@ CONFIG_FASTBOOT_USB_DEV=1
 CONFIG_FASTBOOT_FLASH=y

configs/stm32mp15_trusted_defconfig CONFIG_FASTBOOT_USB_DEV=1 · line 70

Quoted 10 lines
configs/stm32mp15_trusted_defconfig +5 -0
 CONFIG_FASTBOOT_FLASH_MMC_DEV=1
 CONFIG_GPIO_HOG=y
+CONFIG_FASTBOOT_MMC_BOOT_SUPPORT=y
+CONFIG_FASTBOOT_MMC_BOOT1_NAME="mmc1boot0"
+CONFIG_FASTBOOT_MMC_BOOT2_NAME="mmc1boot1"
+CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
+CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y

Thanks

#9 lore raw

PATCH 4/4 configs: stm32mp1: enable the fastboot oem command bootbus

In reply to Patrick Delaunay

Enable the fastboot oem command bootbus, used to configure the eMMC boot behavior, with same format than 'mmc bootbus'
and with parameter: boot_bus_width reset_boot_bus_width boot_mode

On stm32mp1 boards the expected command is
$> fastboot oem partconf:0 0 0

---

 configs/stm32mp15_basic_defconfig   | 1 +
 configs/stm32mp15_trusted_defconfig | 1 +
 2 files changed, 2 insertions(+)
configs/stm32mp15_basic_defconfig +1 -0
index 6cbfbe5274..0115c9b891 100644
@@ -87,6 +87,7 @@ CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FASTBOOT_CMD_OEM_PARTCONF=y
+CONFIG_FASTBOOT_CMD_OEM_BOOTBUS=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
configs/stm32mp15_trusted_defconfig +1 -0
index cc114896df..470a2f4c35 100644
@@ -67,6 +67,7 @@ CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FASTBOOT_CMD_OEM_PARTCONF=y
+CONFIG_FASTBOOT_CMD_OEM_BOOTBUS=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
Signature · 1 line
2.17.1
#10 lore raw

PATCH 4/4 configs: stm32mp1: enable the fastboot oem command bootbus

Hi Patrick

Quoted 31 lines · Patrick Delaunay

Enable the fastboot oem command bootbus, used to configure the eMMC boot behavior, with same format than 'mmc bootbus'
and with parameter: boot_bus_width reset_boot_bus_width boot_mode

On stm32mp1 boards the expected command is
$> fastboot oem partconf:0 0 0

---

 configs/stm32mp15_basic_defconfig   | 1 +
 configs/stm32mp15_trusted_defconfig | 1 +
 2 files changed, 2 insertions(+)
configs/stm32mp15_basic_defconfig +1 -0
index 6cbfbe5274..0115c9b891 100644
@@ -87,6 +87,7 @@ CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FASTBOOT_CMD_OEM_PARTCONF=y
+CONFIG_FASTBOOT_CMD_OEM_BOOTBUS=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y
configs/stm32mp15_trusted_defconfig +0 -0
index cc114896df..470a2f4c35 100644

configs/stm32mp15_trusted_defconfig CONFIG_FASTBOOT_MMC_USER_SUPPORT=y · line 73

Quoted 7 lines
configs/stm32mp15_trusted_defconfig +1 -0
@@ -67,6 +67,7 @@ CONFIG_FASTBOOT_MMC_USER_SUPPORT=y
 CONFIG_FASTBOOT_MMC_USER_NAME="mmc1"
 CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FASTBOOT_CMD_OEM_PARTCONF=y
+CONFIG_FASTBOOT_CMD_OEM_BOOTBUS=y
 CONFIG_DM_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_STM32=y
 CONFIG_DM_I2C=y

Thanks

#11 lore raw

PATCH 4/4 configs: stm32mp1: enable the fastboot oem command bootbus

In reply to Patrick Delaunay

Hi,

Quoted 7 lines

From: Patrick DELAUNAY <[email protected]>
Sent: mercredi 9 septembre 2020 15:25

Enable the fastboot oem command bootbus, used to configure the eMMC boot behavior, with same format than 'mmc bootbus'
and with parameter: boot_bus_width reset_boot_bus_width boot_mode

Quoted 9 lines

On stm32mp1 boards the expected command is $> fastboot oem partconf:0 0 0

---

 configs/stm32mp15_basic_defconfig   | 1 +
 configs/stm32mp15_trusted_defconfig | 1 +
 2 files changed, 2 insertions(+)

Applied to u-boot-stm/master, thanks!

Regards

Patrick