Hi JH,

On Fri, Feb 07, 2020 at 07:52:35PM +1100, JH wrote:
> Hi Pelle,
> 
> Aplogize for cross posting.
> 
> On 2/7/20, Pelle Windestam <pelle.windes...@tagmaster.com> wrote:
> > In my case u-boot uses a default config called imx8qxp_var_som_defconfig
> > stored under the configs directory in u-boot (not sure if its in the
> > official repositories, I use a vendor supplied u-boot repo, but the
> > procedure should be the same either way), then I have created a
> > .bbappend-file for the u-boot recipe, and added a patch that modifies the
> > defconfig file to include the options I want to enable. Then as u-boot is
> > built, it will use the patched defconfig with the appropriate options
> > enabled. In the meta-freescale layer the u-boot recipes are under
> > meta-freescale/recipes-bsp/u-boot.
> 
> Thanks for the tip, that is quite helpful. I created bbappend file,
> run the make menuconfig to enable NAND and CONFIG_CMD_UBI, but then
> failed in build, missing all MTD, NAND, UBI references, the MTD, NAND,
> UBI are all selected, what I could be missing?
> 
> /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.

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.

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

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...).

Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#48296): https://lists.yoctoproject.org/g/yocto/message/48296
Mute This Topic: https://lists.yoctoproject.org/mt/71050300/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to