Skip to contentSkip to conversation

ARM: vexpress_*_defconfig: Enable CMD_UBI support

PATCH New Otavio Salvador 3 participants 4 messages Nov 20, 2018 – Nov 27, 2018 Arm/versatile express platform

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 ARM: vexpress_*_defconfig: Enable CMD_UBI support

This allow for convenient use of QEMU machine to test loading of UBI filesystem. There are a couple of changes made together of this which are required:

1) The malloc must be at least 512 KiB to allow the use of UBI filesystem. We are going to enable it in a next patch.

2) MTD_DEVICE must be enabled, otherwise we get missing symbols during the build

Following configs were change:

- vexpress_aemv8a_dram_defconfig
- vexpress_aemv8a_juno_defconfig
- vexpress_aemv8a_semi_defconfig
- vexpress_ca15_tc2_defconfig
- vexpress_ca5x2_defconfig
- vexpress_ca9x4_defconfig

---

Changes in v2:
- Add env size to the malloc size (Liviu Dudau)

 configs/vexpress_aemv8a_dram_defconfig | 2 ++
 configs/vexpress_aemv8a_juno_defconfig | 2 ++
 configs/vexpress_aemv8a_semi_defconfig | 2 ++
 configs/vexpress_ca15_tc2_defconfig    | 2 ++
 configs/vexpress_ca5x2_defconfig       | 2 ++
 configs/vexpress_ca9x4_defconfig       | 2 ++
 include/configs/vexpress_common.h      | 2 +-
 7 files changed, 13 insertions(+), 1 deletion(-)
configs/vexpress_aemv8a_dram_defconfig +2 -0
index 9848f96293..0f0f138303 100644
@@ -23,12 +23,14 @@ CONFIG_CMD_ARMFLASH=y
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_CACHE=y
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_DM=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_aemv8a_juno_defconfig +2 -0
index ef38915955..ed611fea7c 100644
@@ -23,12 +23,14 @@ CONFIG_CMD_ARMFLASH=y
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_CACHE=y
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_DM=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_aemv8a_semi_defconfig +2 -0
index a4d1233cd5..0b3bb65ee6 100644
@@ -23,12 +23,14 @@ CONFIG_CMD_ARMFLASH=y
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_CACHE=y
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_DM=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_ca15_tc2_defconfig +2 -0
index f4d555be48..cabc0c4577 100644
@@ -18,8 +18,10 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_ca5x2_defconfig +2 -0
index bdacc60c2c..dc4411d6f5 100644
@@ -17,8 +17,10 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_ca9x4_defconfig +2 -0
index 7a90831918..9390cf61d1 100644
@@ -17,8 +17,10 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
include/configs/vexpress_common.h +1 -1
index 267b230fda..47ea89df66 100644
@@ -120,7 +120,7 @@
 #define CONFIG_INITRD_TAG		1
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 512 * 1024) /* >= 512 KiB */
 
 #define SCTL_BASE			V2M_SYSCTL
 #define VEXPRESS_FLASHPROG_FLVPPEN	(1 << 0)
Signature · 1 line
2.19.1
#1 lore raw

PATCH v2 1/1 ARM: vexpress_*_defconfig: Enable CMD_UBI support

Quoted 12 lines · Otavio Salvador

This allow for convenient use of QEMU machine to test loading of UBI filesystem. There are a couple of changes made together of this which are required:

1) The malloc must be at least 512 KiB to allow the use of UBI filesystem. We are going to enable it in a next patch.

2) MTD_DEVICE must be enabled, otherwise we get missing symbols during the build

Following configs were change:

Quoted 8 lines

- vexpress_aemv8a_dram_defconfig
- vexpress_aemv8a_juno_defconfig
- vexpress_aemv8a_semi_defconfig
- vexpress_ca15_tc2_defconfig
- vexpress_ca5x2_defconfig
- vexpress_ca9x4_defconfig

I don't have a git tree to send pull requests from, usually Linaro (Linus?) handled these, so I need to know if you're OK with getting this patch merged into U-Boot mainline.

Best regards,
Liviu

Quoted 132 lines

---

Changes in v2:
- Add env size to the malloc size (Liviu Dudau)

 configs/vexpress_aemv8a_dram_defconfig | 2 ++
 configs/vexpress_aemv8a_juno_defconfig | 2 ++
 configs/vexpress_aemv8a_semi_defconfig | 2 ++
 configs/vexpress_ca15_tc2_defconfig    | 2 ++
 configs/vexpress_ca5x2_defconfig       | 2 ++
 configs/vexpress_ca9x4_defconfig       | 2 ++
 include/configs/vexpress_common.h      | 2 +-
 7 files changed, 13 insertions(+), 1 deletion(-)
configs/vexpress_aemv8a_dram_defconfig +2 -0
index 9848f96293..0f0f138303 100644
@@ -23,12 +23,14 @@ CONFIG_CMD_ARMFLASH=y
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_CACHE=y
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_DM=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_aemv8a_juno_defconfig +2 -0
index ef38915955..ed611fea7c 100644
@@ -23,12 +23,14 @@ CONFIG_CMD_ARMFLASH=y
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_CACHE=y
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_DM=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_aemv8a_semi_defconfig +2 -0
index a4d1233cd5..0b3bb65ee6 100644
@@ -23,12 +23,14 @@ CONFIG_CMD_ARMFLASH=y
 # CONFIG_CMD_NFS is not set
 CONFIG_CMD_CACHE=y
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 # CONFIG_ISO_PARTITION is not set
 # CONFIG_EFI_PARTITION is not set
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_DM=y
 # CONFIG_MMC is not set
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_ca15_tc2_defconfig +2 -0
index f4d555be48..cabc0c4577 100644
@@ -18,8 +18,10 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_ca5x2_defconfig +2 -0
index bdacc60c2c..dc4411d6f5 100644
@@ -17,8 +17,10 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
configs/vexpress_ca9x4_defconfig +2 -0
index 7a90831918..9390cf61d1 100644
@@ -17,8 +17,10 @@ CONFIG_CMD_MMC=y
 # CONFIG_CMD_SETEXPR is not set
 # CONFIG_CMD_NFS is not set
 # CONFIG_CMD_MISC is not set
+CONFIG_CMD_UBI=y
 CONFIG_ENV_IS_IN_FLASH=y
 CONFIG_MTD_NOR_FLASH=y
+CONFIG_MTD_DEVICE=y
 CONFIG_FLASH_CFI_DRIVER=y
 CONFIG_SYS_FLASH_USE_BUFFER_WRITE=y
 CONFIG_SYS_FLASH_PROTECTION=y
include/configs/vexpress_common.h +1 -1
index 267b230fda..47ea89df66 100644
@@ -120,7 +120,7 @@
 #define CONFIG_INITRD_TAG		1
 
 /* Size of malloc() pool */
-#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 128 * 1024)
+#define CONFIG_SYS_MALLOC_LEN		(CONFIG_ENV_SIZE + 512 * 1024) /* >= 512 KiB */
 
 #define SCTL_BASE			V2M_SYSCTL
 #define VEXPRESS_FLASHPROG_FLVPPEN	(1 << 0)
Signature · 1 line
2.19.1
Signature · 8 lines
====================
| I would like to |
| fix the world,  |
| but they're not |
| giving me the   |
 \ source code!  /
  ---------------
    ¯\_(ツ)_/¯
#2 lore raw

PATCH v2 1/1 ARM: vexpress_*_defconfig: Enable CMD_UBI support

Quoted 20 lines · Liviu Dudau
Quoted 19 lines · Otavio Salvador

This allow for convenient use of QEMU machine to test loading of UBI filesystem. There are a couple of changes made together of this which are required:

1) The malloc must be at least 512 KiB to allow the use of UBI filesystem. We are going to enable it in a next patch.

2) MTD_DEVICE must be enabled, otherwise we get missing symbols during the build

Following configs were change:

- vexpress_aemv8a_dram_defconfig
- vexpress_aemv8a_juno_defconfig
- vexpress_aemv8a_semi_defconfig
- vexpress_ca15_tc2_defconfig
- vexpress_ca5x2_defconfig
- vexpress_ca9x4_defconfig

Quoted 7 lines
Quoted 1 line

I don't have a git tree to send pull requests from, usually Linaro (Linus?) handled these, so I need to know if you're OK with getting this patch merged into U-Boot mainline.

I'll pick it up soon then, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181126/157c8d91/attachment.sig>
#3 lore raw

PATCH v2 1/1 ARM: vexpress_*_defconfig: Enable CMD_UBI support

In reply to Otavio Salvador
Quoted 19 lines · Otavio Salvador

This allow for convenient use of QEMU machine to test loading of UBI filesystem. There are a couple of changes made together of this which are required:

1) The malloc must be at least 512 KiB to allow the use of UBI filesystem. We are going to enable it in a next patch.

2) MTD_DEVICE must be enabled, otherwise we get missing symbols during the build

Following configs were change:

- vexpress_aemv8a_dram_defconfig
- vexpress_aemv8a_juno_defconfig
- vexpress_aemv8a_semi_defconfig
- vexpress_ca15_tc2_defconfig
- vexpress_ca5x2_defconfig
- vexpress_ca9x4_defconfig

Quoted 2 lines

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20181127/110458f8/attachment.sig>