[U-Boot] [PATCH v3 01/17] arm: socfpga: Enable ubi and ubifs support

When QSPI and NAND is enabled, the ubi and ubifs support will be enabled too.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- Changes for v2 - move CONFIG_SPI_FLASH_USE_4K_SECTORS to Kconfig --- include/configs/socfpga_common.h | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h index f7c0eb5..dfc3ed5 100644 --- a/include/configs/socfpga_common.h +++ b/include/configs/socfpga_common.h @@ -300,6 +300,14 @@ unsigned int cm_get_qspi_controller_clk_hz(void); "-@1536k(UBI)\0" #endif
+/* UBI and UBIFS support */ +#if defined(CONFIG_CMD_SF) || defined(CONFIG_CMD_NAND) +#define CONFIG_CMD_UBI +#define CONFIG_CMD_UBIFS +#define CONFIG_RBTREE +#define CONFIG_LZO +#endif + /* * SPL *

Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS for UBI and UBIFS support on serial NOR flash
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- configs/socfpga_cyclone5_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/socfpga_cyclone5_defconfig b/configs/socfpga_cyclone5_defconfig index 864358c..4216b55 100644 --- a/configs/socfpga_cyclone5_defconfig +++ b/configs/socfpga_cyclone5_defconfig @@ -23,3 +23,4 @@ CONFIG_DESIGNWARE_SPI=y CONFIG_DM_MMC=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_SPI_FLASH_USE_4K_SECTORS=n

Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS for UBI and UBIFS support on serial NOR flash
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- configs/socfpga_arria5_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/socfpga_arria5_defconfig b/configs/socfpga_arria5_defconfig index 10eb91d..add15b0 100644 --- a/configs/socfpga_arria5_defconfig +++ b/configs/socfpga_arria5_defconfig @@ -23,3 +23,4 @@ CONFIG_DESIGNWARE_SPI=y CONFIG_DM_MMC=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_SPI_FLASH_USE_4K_SECTORS=n

Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS for UBI and UBIFS support on serial NOR flash
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- configs/socfpga_sockit_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig index b4f41a9..dc32fe8 100644 --- a/configs/socfpga_sockit_defconfig +++ b/configs/socfpga_sockit_defconfig @@ -25,3 +25,4 @@ CONFIG_DESIGNWARE_SPI=y CONFIG_DM_MMC=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_SPI_FLASH_USE_4K_SECTORS=n

On Tuesday, December 22, 2015 at 08:32:29 AM, Chin Liang See wrote:
Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS for UBI and UBIFS support on serial NOR flash
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de
configs/socfpga_sockit_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig index b4f41a9..dc32fe8 100644 --- a/configs/socfpga_sockit_defconfig +++ b/configs/socfpga_sockit_defconfig @@ -25,3 +25,4 @@ CONFIG_DESIGNWARE_SPI=y CONFIG_DM_MMC=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_SPI_FLASH_USE_4K_SECTORS=n
Chin, would it be difficult to build your patchset before you submit it? This one builds with an obvious warning :'-(
There's buildman for doing such bulk builds, let me know if you need help setting it up.
I will drop this patch and fix the remaining three during application, since I want to get this set out of the door, but please do some better testing next time.
Best regards, Marek Vasut

On Tue, 2015-12-22 at 21:28 +0100, Marek Vasut wrote:
On Tuesday, December 22, 2015 at 08:32:29 AM, Chin Liang See wrote:
Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS for UBI and UBIFS support on serial NOR flash
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de
configs/socfpga_sockit_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig index b4f41a9..dc32fe8 100644 --- a/configs/socfpga_sockit_defconfig +++ b/configs/socfpga_sockit_defconfig @@ -25,3 +25,4 @@ CONFIG_DESIGNWARE_SPI=y CONFIG_DM_MMC=y CONFIG_USB=y CONFIG_DM_USB=y +CONFIG_SPI_FLASH_USE_4K_SECTORS=n
Chin, would it be difficult to build your patchset before you submit it? This one builds with an obvious warning :'-(
That really strange as I built cyclone5, arria5, sockit, sr1500 and even mcvevk in case it break (as mcvevk dun have qspi). Wonder what is the build error you got?
FYI, here is my build info which indicate success build bash-3.2$ export CROSS_COMPILE=arm-altera-eabi-; make mrproper; make socfpga_sockit_defconfig; make [..] CFG spl/u-boot-spl.cfg FDTGREP spl/u-boot-spl.dtb CAT spl/u-boot-spl-dtb.bin MKIMAGE spl/u-boot-spl-dtb.sfp make[1]: warning: Clock skew detected. Your build may be incomplete. MKIMAGE u-boot.img COPY u-boot.dtb CAT u-boot-dtb.bin MKIMAGE u-boot-dtb.img bash-3.2$ bash-3.2$ git log -20 --pretty=oneline 32d38cdf1211544f26cbcf81bdf90c2358fee9e6 arm: socfpga: sr1500: Update qspiboot to use UBIFS aa66a23109f2c1f0038dbd495fdbfc7e768935d6 arm: socfpga: sockit: Update qspiboot to use UBIFS 8d1d779e348f5b81614e4b4b58966bc828b769c3 arm: socfpga: arria5_socdk: Update qspiboot to use UBIFS 72bd3790884fd95d496ef39106fd6dbcbefbc364 arm: socfpga: cyclone5_socdk: Update qspiboot to use UBIFS 0695327d3895a8ea018b69002c57a0cbdd92c801 arm: socfpga: sr1500: Enable qspiload console command 3b8137edb764042c2c66f74f8778fd4ca615ee75 arm: socfpga: sockit: Enable qspiload console command d855cecf6441f1c0f8cb54fb824e5192f857cdc2 arm: socfpga: arria5_socdk: Enable qspiload console command d32087cc5cdb44b7279d8d4cc2318fcf82b0390e arm: socfpga: cyclone5_socdk: Enable qspiload console command b576fdeb24d045a5efc9eefa745dfeae20ef7663 arm: socfpga: sr1500: Enable ubiload console command f693537d6fa42f19f537557b0e6f2cea00449958 arm: socfpga: sockit: Enable ubiload console command 3acc42460689bf92a06d85c9cfa6901ffdf6bc15 arm: socfpga: arria5_socdk: Enable ubiload console command b275951fa08e3321767a12ba2c79b841e05e27c9 arm: socfpga: cyclone5_socdk: Enable ubiload console command 0e9ba6d2aa50555a5d358de4aa129e6899f60bbc arm: socfpga: sr1500: Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS 577d38e36d694e15d9363e6f351aae7b1de59854 arm: socfpga: sockit: Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS fea05b3eae5928b0df20e6ae1a3252dbae9215ab arm: socfpga: arria5: Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS bc882c4539925c1cb8294638d2d2e7e28e91941e arm: socfpga: cyclone5: Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS 9b15c22ac90ffa12bc1d015d7aef703e07c67fc4 arm: socfpga: Enable ubi and ubifs support 55639073aaf33306df7fe24d4cef22d8eb53e2d8 arm: socfpga: Enabling MTD default partitions 58398c6bc59ee23a05c83bbff168fa6a7b337e14 arm: socfpga: socrates: Consolidate SDMMC environment 780fa75bf6aa79cf78a76d17a03c91d8a5928f5e arm: socfpga: sockit: Consolidate SDMMC environment bash-3.2$ bash-3.2$ arm-altera-eabi-gcc --version arm-altera-eabi-gcc (Sourcery CodeBench Lite 2015.11-45) 5.2.0 Copyright (C) 2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
There's buildman for doing such bulk builds, let me know if you need help setting it up.
That's sound good to me instead i invoke it manually every time. Let me take a look. A quick link would be much appreciated.
I will drop this patch and fix the remaining three during application, since I want to get this set out of the door, but please do some better testing next time.
Do share you build error so I can simulate the build error.
Thanks Chin Liang
Best regards, Marek Vasut

On Wednesday, December 23, 2015 at 01:21:31 AM, Chin Liang See wrote:
On Tue, 2015-12-22 at 21:28 +0100, Marek Vasut wrote:
On Tuesday, December 22, 2015 at 08:32:29 AM, Chin Liang See wrote:
Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS for UBI and UBIFS support on serial NOR flash
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de
configs/socfpga_sockit_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/socfpga_sockit_defconfig b/configs/socfpga_sockit_defconfig index b4f41a9..dc32fe8 100644 --- a/configs/socfpga_sockit_defconfig +++ b/configs/socfpga_sockit_defconfig @@ -25,3 +25,4 @@ CONFIG_DESIGNWARE_SPI=y
CONFIG_DM_MMC=y CONFIG_USB=y CONFIG_DM_USB=y
+CONFIG_SPI_FLASH_USE_4K_SECTORS=n
Chin, would it be difficult to build your patchset before you submit it? This one builds with an obvious warning :'-(
That really strange as I built cyclone5, arria5, sockit, sr1500 and even mcvevk in case it break (as mcvevk dun have qspi). Wonder what is the build error you got?
FYI, here is my build info which indicate success build bash-3.2$ export CROSS_COMPILE=arm-altera-eabi-; make mrproper; make socfpga_sockit_defconfig; make
I fixed it in u-boot-socfpga/master, so it will compile fine, but you should see a warning with the original patch, see at the end of this mail.
[..] CFG spl/u-boot-spl.cfg FDTGREP spl/u-boot-spl.dtb CAT spl/u-boot-spl-dtb.bin MKIMAGE spl/u-boot-spl-dtb.sfp make[1]: warning: Clock skew detected. Your build may be incomplete.
This is a bit weird, isn't it ;-)
MKIMAGE u-boot.img COPY u-boot.dtb CAT u-boot-dtb.bin MKIMAGE u-boot-dtb.img
[...]
There's buildman for doing such bulk builds, let me know if you need help setting it up.
That's sound good to me instead i invoke it manually every time. Let me take a look. A quick link would be much appreciated.
Thomas did a good concise writeup on setting up buildman:
http://www.mail-archive.com/u-boot@lists.denx.de/msg191914.html
I will drop this patch and fix the remaining three during application, since I want to get this set out of the door, but please do some better testing next time.
Do share you build error so I can simulate the build error.
CONFIG_SPI_FLASH_USE_4K_SECTORS was used twice in the config file sockit config file (configs/socfpga_sockit) .

On Wed, 2015-12-23 at 01:47 +0100, Marek Vasut wrote:
On Wednesday, December 23, 2015 at 01:21:31 AM, Chin Liang See wrote:
On Tue, 2015-12-22 at 21:28 +0100, Marek Vasut wrote:
On Tuesday, December 22, 2015 at 08:32:29 AM, Chin Liang See wrote:
[..]
CFG spl/u-boot-spl.cfg FDTGREP spl/u-boot-spl.dtb CAT spl/u-boot-spl-dtb.bin MKIMAGE spl/u-boot-spl-dtb.sfp make[1]: warning: Clock skew detected. Your build may be incomplete.
This is a bit weird, isn't it ;-)
Yah, this is something need be hammered
MKIMAGE u-boot.img COPY u-boot.dtb CAT u-boot-dtb.bin MKIMAGE u-boot-dtb.img
[...]
There's buildman for doing such bulk builds, let me know if you need help setting it up.
That's sound good to me instead i invoke it manually every time. Let me take a look. A quick link would be much appreciated.
Thomas did a good concise writeup on setting up buildman:
http://www.mail-archive.com/u-boot@lists.denx.de/msg191914.html
Yah, I saw the conversation. Cool, let me set it up.
I will drop this patch and fix the remaining three during application, since I want to get this set out of the door, but please do some better testing next time.
Do share you build error so I can simulate the build error.
CONFIG_SPI_FLASH_USE_4K_SECTORS was used twice in the config file sockit config file (configs/socfpga_sockit) .
Oh I believe its commented out.
bash-3.2$ git grep --color CONFIG_SPI_FLASH_USE_4K_SECTORS configs/socfpga_arria5_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n configs/socfpga_cyclone5_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n configs/socfpga_sockit_defconfig:# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set configs/socfpga_sockit_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n configs/socfpga_sr1500_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n drivers/mtd/spi/sf_internal.h:#ifdef CONFIG_SPI_FLASH_USE_4K_SECTORS
Thanks Chin Liang

On Wednesday, December 23, 2015 at 02:36:13 AM, Chin Liang See wrote:
On Wed, 2015-12-23 at 01:47 +0100, Marek Vasut wrote:
On Wednesday, December 23, 2015 at 01:21:31 AM, Chin Liang See wrote:
On Tue, 2015-12-22 at 21:28 +0100, Marek Vasut wrote:
On Tuesday, December 22, 2015 at 08:32:29 AM, Chin Liang See
wrote:
[..]
CFG spl/u-boot-spl.cfg FDTGREP spl/u-boot-spl.dtb CAT spl/u-boot-spl-dtb.bin MKIMAGE spl/u-boot-spl-dtb.sfp
make[1]: warning: Clock skew detected. Your build may be incomplete.
This is a bit weird, isn't it ;-)
Yah, this is something need be hammered
MKIMAGE u-boot.img COPY u-boot.dtb CAT u-boot-dtb.bin MKIMAGE u-boot-dtb.img
[...]
There's buildman for doing such bulk builds, let me know if you need help setting it up.
That's sound good to me instead i invoke it manually every time. Let me take a look. A quick link would be much appreciated.
Thomas did a good concise writeup on setting up buildman:
http://www.mail-archive.com/u-boot@lists.denx.de/msg191914.html
Yah, I saw the conversation. Cool, let me set it up.
I will drop this patch and fix the remaining three during application, since I want to get this set out of the door, but please do some better testing next time.
Do share you build error so I can simulate the build error.
CONFIG_SPI_FLASH_USE_4K_SECTORS was used twice in the config file sockit config file (configs/socfpga_sockit) .
Oh I believe its commented out.
bash-3.2$ git grep --color CONFIG_SPI_FLASH_USE_4K_SECTORS configs/socfpga_arria5_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n configs/socfpga_cyclone5_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n configs/socfpga_sockit_defconfig:# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set configs/socfpga_sockit_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n
But it's twice in there. Also, =n is not valid construct, to disable config option you should comment it out the way it's done above.
configs/socfpga_sr1500_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n drivers/mtd/spi/sf_internal.h:#ifdef CONFIG_SPI_FLASH_USE_4K_SECTORS
Thanks Chin Liang
Best regards, Marek Vasut

On Wed, 2015-12-23 at 02:47 +0100, Marek Vasut wrote:
On Wednesday, December 23, 2015 at 02:36:13 AM, Chin Liang See wrote:
On Wed, 2015-12-23 at 01:47 +0100, Marek Vasut wrote:
On Wednesday, December 23, 2015 at 01:21:31 AM, Chin Liang See wrote:
On Tue, 2015-12-22 at 21:28 +0100, Marek Vasut wrote:
On Tuesday, December 22, 2015 at 08:32:29 AM, Chin Liang See
wrote:
[..]
I will drop this patch and fix the remaining three during application, since I want to get this set out of the door, but please do some better testing next time.
Do share you build error so I can simulate the build error.
CONFIG_SPI_FLASH_USE_4K_SECTORS was used twice in the config file sockit config file (configs/socfpga_sockit) .
Oh I believe its commented out.
bash-3.2$ git grep --color CONFIG_SPI_FLASH_USE_4K_SECTORS configs/socfpga_arria5_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n configs/socfpga_cyclone5_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS= n configs/socfpga_sockit_defconfig:# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set configs/socfpga_sockit_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n
But it's twice in there. Also, =n is not valid construct, to disable config option you should comment it out the way it's done above.
Oh unaware the =n is invalid. Thanks for the fix.
Chin Liang
configs/socfpga_sr1500_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n drivers/mtd/spi/sf_internal.h:#ifdef CONFIG_SPI_FLASH_USE_4K_SECTORS
Thanks Chin Liang
Best regards, Marek Vasut

On Wednesday, December 23, 2015 at 03:57:21 AM, Chin Liang See wrote:
On Wed, 2015-12-23 at 02:47 +0100, Marek Vasut wrote:
On Wednesday, December 23, 2015 at 02:36:13 AM, Chin Liang See wrote:
On Wed, 2015-12-23 at 01:47 +0100, Marek Vasut wrote:
On Wednesday, December 23, 2015 at 01:21:31 AM, Chin Liang See
wrote:
On Tue, 2015-12-22 at 21:28 +0100, Marek Vasut wrote:
On Tuesday, December 22, 2015 at 08:32:29 AM, Chin Liang See
wrote:
[..]
I will drop this patch and fix the remaining three during application, since I want to get this set out of the door, but please do some better testing next time.
Do share you build error so I can simulate the build error.
CONFIG_SPI_FLASH_USE_4K_SECTORS was used twice in the config file sockit config file (configs/socfpga_sockit) .
Oh I believe its commented out.
bash-3.2$ git grep --color CONFIG_SPI_FLASH_USE_4K_SECTORS configs/socfpga_arria5_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n configs/socfpga_cyclone5_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS= n configs/socfpga_sockit_defconfig:# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set configs/socfpga_sockit_defconfig:CONFIG_SPI_FLASH_USE_4K_SECTORS=n
But it's twice in there. Also, =n is not valid construct, to disable config option you should comment it out the way it's done above.
Oh unaware the =n is invalid. Thanks for the fix.
NP
Best regards, Marek Vasut

Undefine CONFIG_SPI_FLASH_USE_4K_SECTORS for UBI and UBIFS support on serial NOR flash
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- configs/socfpga_sr1500_defconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/configs/socfpga_sr1500_defconfig b/configs/socfpga_sr1500_defconfig index 2c75bda..8ffa400 100644 --- a/configs/socfpga_sr1500_defconfig +++ b/configs/socfpga_sr1500_defconfig @@ -17,3 +17,4 @@ CONFIG_DM_ETH=y CONFIG_ETH_DESIGNWARE=y CONFIG_SYS_NS16550=y CONFIG_DM_MMC=y +CONFIG_SPI_FLASH_USE_4K_SECTORS=n

Enabling ubiload command to load kernel image and device tree from mtd part labeled "UBI". ubiload command will search the file from directory /boot.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_cyclone5_socdk.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/configs/socfpga_cyclone5_socdk.h b/include/configs/socfpga_cyclone5_socdk.h index 3c2e2ae..72a3cef 100644 --- a/include/configs/socfpga_cyclone5_socdk.h +++ b/include/configs/socfpga_cyclone5_socdk.h @@ -74,7 +74,10 @@ "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ - "bootm ${loadaddr} - ${fdt_addr}\0" + "bootm ${loadaddr} - ${fdt_addr}\0" \ + "ubiload=ubi part UBI && ubifsmount ubi0 && " \ + "ubifsload ${loadaddr} /boot/${bootimage} && " \ + "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>

Enabling ubiload command to load kernel image and device tree from mtd part labeled "UBI". ubiload command will search the file from directory /boot.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_arria5_socdk.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h index af0f87f..5c21aec 100644 --- a/include/configs/socfpga_arria5_socdk.h +++ b/include/configs/socfpga_arria5_socdk.h @@ -74,7 +74,10 @@ "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ - "bootm ${loadaddr} - ${fdt_addr}\0" + "bootm ${loadaddr} - ${fdt_addr}\0" \ + "ubiload=ubi part UBI && ubifsmount ubi0 && " \ + "ubifsload ${loadaddr} /boot/${bootimage} && " \ + "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>

Enabling ubiload command to load kernel image and device tree from mtd part labeled "UBI". ubiload command will search the file from directory /boot.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_sockit.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h index 2356c74..c60dca4 100644 --- a/include/configs/socfpga_sockit.h +++ b/include/configs/socfpga_sockit.h @@ -66,6 +66,9 @@ "mmcload=mmc rescan;" \ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ + "ubiload=ubi part UBI && ubifsmount ubi0 && " \ + "ubifsload ${loadaddr} /boot/${bootimage} && " \ + "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
/* The rest of the configuration is shared */ #include <configs/socfpga_common.h>

Enabling ubiload command to load kernel image and device tree from mtd part labeled "UBI". ubiload command will search the file from directory /boot.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_sr1500.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/configs/socfpga_sr1500.h b/include/configs/socfpga_sr1500.h index 5bd2956..f37d005 100644 --- a/include/configs/socfpga_sr1500.h +++ b/include/configs/socfpga_sr1500.h @@ -74,7 +74,10 @@ "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ - "bootm ${loadaddr} - ${fdt_addr}\0" + "bootm ${loadaddr} - ${fdt_addr}\0" \ + "ubiload=ubi part UBI && ubifsmount ubi0 && " \ + "ubifsload ${loadaddr} /boot/${bootimage} && " \ + "ubifsload ${fdt_addr} /boot/${fdtimage}\0"
/* Environment */ #define CONFIG_ENV_IS_IN_SPI_FLASH

Enabling qspiload command which will load the kernel image and dtb from UBIFS within MTD partition labeled UBI.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_cyclone5_socdk.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/socfpga_cyclone5_socdk.h b/include/configs/socfpga_cyclone5_socdk.h index 72a3cef..0ed7f42 100644 --- a/include/configs/socfpga_cyclone5_socdk.h +++ b/include/configs/socfpga_cyclone5_socdk.h @@ -70,6 +70,7 @@ "mmcload=mmc rescan;" \ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ + "qspiload=sf probe && mtdparts default && run ubiload\0" \ "qspiroot=/dev/mtdblock0\0" \ "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \

Enabling qspiload command which will load the kernel image and dtb from UBIFS within MTD partition labeled UBI.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_arria5_socdk.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h index 5c21aec..d3009a4 100644 --- a/include/configs/socfpga_arria5_socdk.h +++ b/include/configs/socfpga_arria5_socdk.h @@ -70,6 +70,7 @@ "mmcload=mmc rescan;" \ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ + "qspiload=sf probe && mtdparts default && run ubiload\0" \ "qspiroot=/dev/mtdblock0\0" \ "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \

Enabling qspiload command which will load the kernel image and dtb from UBIFS within MTD partition labeled UBI.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_sockit.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h index c60dca4..39f0b09 100644 --- a/include/configs/socfpga_sockit.h +++ b/include/configs/socfpga_sockit.h @@ -66,6 +66,7 @@ "mmcload=mmc rescan;" \ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ + "qspiload=sf probe && mtdparts default && run ubiload\0" \ "ubiload=ubi part UBI && ubifsmount ubi0 && " \ "ubifsload ${loadaddr} /boot/${bootimage} && " \ "ubifsload ${fdt_addr} /boot/${fdtimage}\0"

Enabling qspiload command which will load the kernel image and dtb from UBIFS within MTD partition labeled UBI.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_sr1500.h | 1 + 1 file changed, 1 insertion(+)
diff --git a/include/configs/socfpga_sr1500.h b/include/configs/socfpga_sr1500.h index f37d005..0ebea13 100644 --- a/include/configs/socfpga_sr1500.h +++ b/include/configs/socfpga_sr1500.h @@ -70,6 +70,7 @@ "mmcload=mmc rescan;" \ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ + "qspiload=sf probe && mtdparts default && run ubiload\0" \ "qspiroot=/dev/mtdblock0\0" \ "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \

Update the qspiboot console command to use UBIFS instead of old jffs2 file system.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_cyclone5_socdk.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/configs/socfpga_cyclone5_socdk.h b/include/configs/socfpga_cyclone5_socdk.h index 0ed7f42..c4c4ecb 100644 --- a/include/configs/socfpga_cyclone5_socdk.h +++ b/include/configs/socfpga_cyclone5_socdk.h @@ -71,11 +71,9 @@ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ "qspiload=sf probe && mtdparts default && run ubiload\0" \ - "qspiroot=/dev/mtdblock0\0" \ - "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ - "bootm ${loadaddr} - ${fdt_addr}\0" \ + " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ + "bootz ${loadaddr} - ${fdt_addr}\0" \ "ubiload=ubi part UBI && ubifsmount ubi0 && " \ "ubifsload ${loadaddr} /boot/${bootimage} && " \ "ubifsload ${fdt_addr} /boot/${fdtimage}\0"

Update the qspiboot console command to use UBIFS instead of old jffs2 file system.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_arria5_socdk.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/configs/socfpga_arria5_socdk.h b/include/configs/socfpga_arria5_socdk.h index d3009a4..a0161bc 100644 --- a/include/configs/socfpga_arria5_socdk.h +++ b/include/configs/socfpga_arria5_socdk.h @@ -71,11 +71,9 @@ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ "qspiload=sf probe && mtdparts default && run ubiload\0" \ - "qspiroot=/dev/mtdblock0\0" \ - "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ - "bootm ${loadaddr} - ${fdt_addr}\0" \ + " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ + "bootz ${loadaddr} - ${fdt_addr}\0" \ "ubiload=ubi part UBI && ubifsmount ubi0 && " \ "ubifsload ${loadaddr} /boot/${bootimage} && " \ "ubifsload ${fdt_addr} /boot/${fdtimage}\0"

Update the qspiboot console command to use UBIFS instead of old jffs2 file system.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_sockit.h | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/include/configs/socfpga_sockit.h b/include/configs/socfpga_sockit.h index 39f0b09..95e7ba6 100644 --- a/include/configs/socfpga_sockit.h +++ b/include/configs/socfpga_sockit.h @@ -67,6 +67,9 @@ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ "qspiload=sf probe && mtdparts default && run ubiload\0" \ + "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ + " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ + "bootz ${loadaddr} - ${fdt_addr}\0" \ "ubiload=ubi part UBI && ubifsmount ubi0 && " \ "ubifsload ${loadaddr} /boot/${bootimage} && " \ "ubifsload ${fdt_addr} /boot/${fdtimage}\0"

Update the qspiboot console command to use UBIFS instead of old jffs2 file system.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de --- include/configs/socfpga_sr1500.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/include/configs/socfpga_sr1500.h b/include/configs/socfpga_sr1500.h index 0ebea13..fdf67ca 100644 --- a/include/configs/socfpga_sr1500.h +++ b/include/configs/socfpga_sr1500.h @@ -71,11 +71,9 @@ "load mmc 0:1 ${loadaddr} ${bootimage};" \ "load mmc 0:1 ${fdt_addr} ${fdtimage}\0" \ "qspiload=sf probe && mtdparts default && run ubiload\0" \ - "qspiroot=/dev/mtdblock0\0" \ - "qspirootfstype=jffs2\0" \ "qspiboot=setenv bootargs " CONFIG_BOOTARGS \ - " root=${qspiroot} rw rootfstype=${qspirootfstype};"\ - "bootm ${loadaddr} - ${fdt_addr}\0" \ + " ubi.mtd=1,64 root=ubi0:rootfs rw rootfstype=ubifs;"\ + "bootz ${loadaddr} - ${fdt_addr}\0" \ "ubiload=ubi part UBI && ubifsmount ubi0 && " \ "ubifsload ${loadaddr} /boot/${bootimage} && " \ "ubifsload ${fdt_addr} /boot/${fdtimage}\0"

On Tuesday, December 22, 2015 at 08:32:26 AM, Chin Liang See wrote:
When QSPI and NAND is enabled, the ubi and ubifs support will be enabled too.
Signed-off-by: Chin Liang See clsee@altera.com Cc: Dinh Nguyen dinguyen@opensource.altera.com Cc: Dinh Nguyen dinh.linux@gmail.com Cc: Pavel Machek pavel@denx.de Cc: Marek Vasut marex@denx.de Cc: Stefan Roese sr@denx.de
Applied all, thanks.
Best regards, Marek Vasut
participants (2)
-
Chin Liang See
-
Marek Vasut