[OE-core] what must i supply WRT UBOOT_CONFIG/UBOOT_MACHINE when u-boot isn't in BSP?

Max Krummenacher max.oss.09 at gmail.com
Sat Aug 6 20:21:57 UTC 2016


Am Samstag, den 06.08.2016, 07:26 -0400 schrieb Robert P. J. Day:
> On Fri, 5 Aug 2016, Khem Raj wrote:
> 
> > On 16-08-05 17:11:34, Robert P. J. Day wrote:
> > > On Fri, 5 Aug 2016, Khem Raj wrote:
> > > 
> > > > 
> > > > > On Aug 5, 2016, at 11:52 AM, Robert P. J. Day <
> > > > > rpjday at crashcourse.ca> wrote:
> > > > > 
> > > > > 
> > > > >  i'm in the situation where i want to add the u-boot-fw-utils
> > > > > package
> > > > > to my image, but the corresponding u-boot source for the
> > > > > target is not
> > > > > part of the BSP layer; in fact, it's not part of a layer at
> > > > > all (built
> > > > > manually elsewhere), so it's unsurprising that, if i add that
> > > > > recipe
> > > > > to the image, i get:
> > > > > 
> > > > > ERROR: u-boot-fw-utils was skipped: Either UBOOT_MACHINE or
> > > > > UBOOT_CONFIG must be set in the ... machine configuration.
> > > > > ERROR: u-boot-fw-utils was skipped: Either UBOOT_MACHINE or
> > > > > UBOOT_CONFIG must be set in the ... machine configuration.
> > > > > 
> > > > > is there a short doc that explains what i minimally need to
> > > > > supply to
> > > > > build that package? i've never been in the situation where u
> > > > > -boot
> > > > > wasn't part of the BSP.
> > > > 
> > > > perhaps you need to set UBOOT_MACHINE = "config"
> > > 
> > >   i apologize, but i have no idea what that means. does that mean
> > > i
> > > want to build that package, and it will consult
> > > /etc/fw_env.config
> > > when the executables are run?
> > 
> > well, the errors you reported above are issued when OE is trying to
> > build the u-boot-fw-utils recipe and BSP does not define the
> > UBOOT_MACHINE, I was merely pointing to a possible solution. I do
> > not know your usecase.
> 
>   i'm trying to add the u-boot-fw-utils package to an image for which
> i don't have a u-boot recipe available for the target board, so i
> can't just set UBOOT_MACHINE. i just want to know what i have to
> provide to the u-boot-fw-utils recipe in terms of u-boot config info
> manually to get a build.
> 
>   i have the relevant info for the /etc/fw_env.config file that
> fw_printenv and fw_setenv need to run, i just don't know how to add
> that to the build process.
Hi

The fw-utils are built by

- Getting the U-Boot sources
- Setting CROSS_COMPILE
- Configure U-Boot by: make <one of the filenames in config>
- Compiling: make env

So you must provide the config name you want to be used.
In the absence of a specific U-Boot recipe the one from oe-core
will be taken. This uses the sources from git.denx.de v2016.03.
So take your pick of one of the available machines. Try chose
one which is close to what you actually have, e.g. 
mx6dlsabresd_defconfig should you use an i.MX6 based SOC.
http://git.denx.de/?p=u-boot.git;a=tree;f=configs;h=c386b9a5e747dfc2d00
6265a294890a47647afd6;hb=df61a74e6845ec9bdcdd48d2aff5e9c2c6debeaa
and then as Khem suggested set in local.conf:
UBOOT_MACHINE = "mx6dlsabresd_defconfig"

Note that the default U-Boot environment is compiled into your
fw_getenv, fw_setenv binaries. So if fw_getenv, fw_setenv are not
able to read a valid environment from the location you configure in
fw_env.config then the defaults of your substituted U-Boot machine
will be used.
e.g. 'fw_setenv foo bar' will write the 'wrong' default environment
amended with foo=bar.

Likely a source of surprises.

Regards
Max

> 
> rday
> 
> -- 
> 
> =====================================================================
> ===
> Robert P. J. Day                                 Ottawa, Ontario,
> CANADA
>                         http://crashcourse.ca
> 
> Twitter:                                       
> http://twitter.com/rpjday
> LinkedIn:                               
> http://ca.linkedin.com/in/rpjday
> =====================================================================
> ===
> 



More information about the Openembedded-core mailing list