Re: [OE-core] [yocto] Support UBI u-boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Quentin,

Thanks for your response, so glad you help me here again :-).

On 2/7/20, Quentin Schulz <quentin.schulz@xxxxxxxxxxxxxxxxxxx> wrote:
>> /build/Installer/sa_platform_build/Source/Yocto/build/tmp-glibc/work/solar-oe-linux-gnueabi/u-boot-imx/2017.03-r0/git/cmd/ubi.c:448:
>> undefined reference to `mtdparts_init'
>
> This function is not defined. So you look it up in the sources, find
> where it's defined.

That is a function call in cmd/ubi.c:

int ubi_detach(void)
{
    if (mtdparts_init() != 0) {
        printf("Error initializing mtdparts!\n");
        return 1;
    }
.....

That function is in cmd/mtdparts.c:
int mtdparts_init(void) {
.......
}

It is in the same source directory, I'll have to look it deep, why it
does not compile cmd/mtdparts.c?


> Is it in a file which is compiled/included somewhere?
> Is it surrounded by #ifdef? And by surrounded, I mean the #ifdef can
> be several thousands of lines above the function definition.

Actually, there is no macros to surround that function.


> In that case, I couldn't find the sources of u-boot-imx (didn't take the
> time) but from upstream:
> https://elixir.bootlin.com/u-boot/v2017.03/source/cmd/nand.c#L35

The meta-freescale downloaded the u-boot source from
https://source.codeaurora.org/external/imx/uboot-imx.git

> It's surrounded by #if defined(CONFIG_CMD_MTDPARTS) so you need
> CMD_MTDPARTS to be enabled. Do the same for all the other calls. There's
> no magic thing, you thus have to look it up yourself most of the time.
> Even though arguably, that's a mistake from upstream (there should be a
> dependency on MTDPARTS in Kconfig, anyway...).

You are right, the CONFIG_CMD_MTDPARTS is defined in many defconfig
except it is not in my mx6ull_14x14_evk_defconfig, there are lots of
definitions are defined in other defconfig, but missing in
mx6ull_14x14_evk_defconfig. When I run make menuconfig, I enabled all
MTD, NAND and UBI parts except UBI Fastmap (Experimental feature) in
menuconfig, but I still could not find CONFIG_CMD_MTDPARTS and other
definitions. Need to look it carefully.

I suspect that to run make menuconfig might not be right command, I
tried bitbake -c menuconfig u-boot:

ERROR: Task do_menuconfig does not exist for target u-boot
(./meta-freescale/recipes-bsp/u-boot/u-boot-imx_2017.03.bb:do_menuconfig).
Close matches:
  do_configure

To run kernel menuconfig, I can add KERNEL_CONFIG_COMMAND =
"oe_runmake_call -C ${S} O=${B} imx_v6_v7_defconfig" to a bbappend
file to run bitbake -c menuconfig kernel. Is there an equivelent
UBOOT_CONFIG_COMMAND to run oe_runmake?

Thank you.

- jh

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux