Support UBI u-boot


JH
 

Hi,

Sorry for cross-posting, I have been asking for helping solving the
issue many days ago, but could not get those work.

(1) UBI support

I added NAND and UBIFS support to my Yocto layer machine config file:

UBOOT_CONFIG = "nand"
UBOOT_CONFIG[nand] += "mx6ull_14x14_evk_config"
UBOOT_CONFIG[nand] += "mx6ull_14x14_evk_nand_config"
UBOOT_CONFIG[nand] += "ubi"
UBOOT_CONFIG[nand] += "ubifs"

But my u-boot.imx-nand still could not support ubi:

=> ubi part rootfs
Unknown command 'ubi' - try 'help'

What I could be missing here?


(2) Patch u-boot parameters

I am not clear how you do to change u-boot parameters, it seems to me
I have to create my own u-boot-imx_2017.03.bbappend and patch files to
mx6ullevk.h, to change u-boot parameters of mtdparts, NAND_ROOT_UBI,
bootcmd, etc based on my configuration.

But Yocto won't allow the patch running unless that the patch is
committed to the git repository in
https://source.codeaurora.org/external/imx/uboot-imx.git.

Ideally, I thought all u-boot parameters can be changed in a bbappend
file, could you advise if it is possible to do that way or not? If so,
how to do it?

If not, what is the policy for making parches and commit to the git
repository https://source.codeaurora.org/external/imx/uboot-imx.git?

Thank you.

Kind regards,

- jh


JH
 

Hi Andy,

On 2/6/20, Andy Pont <andy.pont@...> wrote:
JH wrote...


I added NAND and UBIFS support to my Yocto layer machine config file:

UBOOT_CONFIG = "nand"
UBOOT_CONFIG[nand] += "mx6ull_14x14_evk_config"
UBOOT_CONFIG[nand] += "mx6ull_14x14_evk_nand_config"
UBOOT_CONFIG[nand] += "ubi"
UBOOT_CONFIG[nand] += "ubifs"

But my u-boot.imx-nand still could not support ubi:

=> ubi part rootfs
Unknown command 'ubi' - try ‘help’
You need to start to read through the various sources to figure out for
yourself what is going on!

Starting from the bottom, in U-Boot 2017.03 all of the command sources
are in the “cmd” directory. The “ubi …” command are all in ubi.c.
Reading cmd/Makefile shows that file gets added into the build if
CONFIG_CMD_UBI is enabled.
You are right, that CONFIG_CMD_UBI is not enabled, but I could not
find any conf or bb files I could change or enable CONFIG_CMD_UBI in
meta-freescale layer.

Desperately, I hacked to run "make menuconfig" at U-Boot 2017.03 build
directory, selected and enabled CONFIG_CMD_UBI and saved to .config
file in that build directory, but then to run bitbake to build u-boot
again, the .config was removed and replaced by an old one disabled
CONFIG_CMD_UBI again.

Other people recommended to build u-boot in a standalone environment
out of OE / Yocto build system. Since I have set up everything in OE /
Yocto environment, I thought it could be easier if I could modify one
line of u-boot config file in a recipe.

Any idea where is the recipe in meta-freescale to allow me to change /
enable CONFIG_CMD_UBI?

Am I the only one unable to change u-boot config file in OE / Yoctu
build? That makes me very sad :-(.


The next place to look is whether or not that is set in your defconfig
for U-Boot or overwritten somewhere in a recipe in your Yocto build
environment.
Yeah, I'll been searched all day, could not find a recipe Yocto build
environment, I was told OE / Yocto does not have that stack and
mechanism to set and change u-boot config, is it true?

Thank you very much.

Kind regards,

- jh