ARM: vexpress_*: Enable CMD_UBI support
PATCH 1/1 ARM: vexpress_*: 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
---
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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 (512 * 1024)/* 512 KiB */ #define SCTL_BASE V2M_SYSCTL#define VEXPRESS_FLASHPROG_FLVPPEN (1 << 0)
Signature · 1 line
2.19.1
PATCH 1/1 ARM: vexpress_*: Enable CMD_UBI support
Hi Otavio,
Quoted 138 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_DEVICEmust be enabled, otherwise we get missing symbols during the buildFollowing configs were change:
-
vexpress_aemv8a_dram_defconfig
-vexpress_aemv8a_juno_defconfig
-vexpress_aemv8a_semi_defconfig
-vexpress_ca15_tc2_defconfig
-vexpress_ca5x2_defconfig
-vexpress_ca9x4_defconfigSigned-off-by Otavio Salvador <[email protected]>---
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@@ -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=yconfigs/vexpress_aemv8a_juno_defconfig +2
-0@@ -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=yconfigs/vexpress_aemv8a_semi_defconfig +2
-0@@ -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=yconfigs/vexpress_ca15_tc2_defconfig +2
-0@@ -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=yconfigs/vexpress_ca5x2_defconfig +2
-0@@ -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=yconfigs/vexpress_ca9x4_defconfig +2
-0@@ -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=yinclude/configs/vexpress_common.h +0
-0
include/configs/vexpress_common.h line 123
Quoted 5 lines
include/configs/vexpress_common.h +1
-1@@ -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 (512 * 1024)/* 512 KiB */
I don't have much to say about the enabling of the UBI for some platforms that I have my doubts that QEMU emulates them correctly, but I guess it should be harmless. What I have issues here is you saying in the commit message "The malloc must be *at least* 512 KiB" but here you make it *exactly* 512KiB, ignoring the CONFIG_ENV_SIZE. Would it not be better to keep the CONFIG_SYS_MALLOC_LEN to be (CONFIG_ENV_SIZE + 512 * 1024)?
Best regards,
Liviu
Quoted 6 lines
include/configs/vexpress_common.h +0
-0#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! /
---------------
¯\_(ツ)_/¯PATCH 1/1 ARM: vexpress_*: Enable CMD_UBI support
Quoted 7 lines · Liviu Dudau
Quoted 6 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.
...
Quoted 6 lines
I don't have much to say about the enabling of the UBI for some platforms that I have my doubts that QEMU emulates them correctly, but I guess it should be harmless. What I have issues here is you saying in the commit message "The malloc must be *at least* 512 KiB" but here you make it *exactly* 512KiB, ignoring the
CONFIG_ENV_SIZE. Would it not be better to keep theCONFIG_SYS_MALLOC_LENto be (CONFIG_ENV_SIZE+ 512 * 1024)?
Absolutely; I just sent a v2 doing that.
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9 9981-7854 Mobile: +1 (347) 903-9750