linux-mtd.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: JH <jupiter.hce@gmail.com>
To: Quentin Schulz <quentin.schulz@streamunlimited.com>
Cc: Andy Pont <andy.pont@sdcsystems.com>,
	Yocto discussion list <yocto@yoctoproject.org>,
	Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>,
	Pelle Windestam <Pelle.Windestam@tagmaster.com>,
	linux-mtd <linux-mtd@lists.infradead.org>,
	Meta Freescale <meta-freescale@yoctoproject.org>
Subject: Re: [OE-core] [yocto] Support UBI u-boot
Date: Sat, 8 Feb 2020 00:01:17 +1100	[thread overview]
Message-ID: <CAA=hcWR8F_jP5mascw02RnLRi2NkAb2juFhNmEoaeuY5G74HFw@mail.gmail.com> (raw)
In-Reply-To: <20200207115521.i7flzwf6e24obq5r@qschulz>

Hi Quentin,

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

On 2/7/20, Quentin Schulz <quentin.schulz@streamunlimited.com> 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/

      reply	other threads:[~2020-02-07 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAA=hcWSCZROrpDBWV5ZAA+LV6j0cjRSKxyjonOfWS4mCZAtdHg@mail.gmail.com>
     [not found] ` <em86bbcd60-f004-4acb-b508-4471dac5c7c1@andys-imac.leeshillfarm.local>
     [not found]   ` <CAA=hcWQsP1N58iqrxEggZBdSksgHk+gfuG7yz0+C3G7o0=DzOw@mail.gmail.com>
     [not found]     ` <c159fe1d7cc14f5c80878fe81a957bb4@tagmaster.com>
2020-02-07  8:52       ` [yocto] Support UBI u-boot JH
2020-02-07 11:55         ` [OE-core] " Quentin Schulz
2020-02-07 13:01           ` JH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAA=hcWR8F_jP5mascw02RnLRi2NkAb2juFhNmEoaeuY5G74HFw@mail.gmail.com' \
    --to=jupiter.hce@gmail.com \
    --cc=Pelle.Windestam@tagmaster.com \
    --cc=andy.pont@sdcsystems.com \
    --cc=linux-mtd@lists.infradead.org \
    --cc=meta-freescale@yoctoproject.org \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=quentin.schulz@streamunlimited.com \
    --cc=yocto@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).