Problems with building u-boot when using UBOOT_CONFIG

347 views
Skip to first unread message

Shawn Stevenson

unread,
Jun 27, 2018, 5:21:57 PM6/27/18
to Mender List mender.io
Hi.

I am integrating Mender into my build for a custom made board using the NXP imx6ull.  I am having problems when defining u-boot configurations using UBOOT_CONFIG in my machine .conf file. I am using the Rocko release of the fsl-community-bsp, and version 1.5 of Mender.

I have two different builds. One is a development build that is run off an SD card, and one is a production build for which the image is stored on eMMC. I use UBOOT_CONFIG to define two different u-boot configurations:

UBOOT_CONFIG ??= "sd"
UBOOT_CONFIG[sd] = "mx6ull_pcb0109_defconfig,sdcard"
UBOOT_CONFIG[emmc] = "mx6ull_pcb0109_emmc_defconfig"

The problem is that when UBOOT_MACHINE is derived from UBOOT_CONFIG, there is a leading space added in front of the name. Then, when do_mender_uboot_auto_configure() calls uboot_auto_configure.sh the "--config" argument looks like this:

--config= mx6ull_pcb0109_emmc_defconfig

The uboot_auto_configure.sh script then fails, because it parses the argument with the assumption that there is no space between the "=" and the defconfig string.

Has anyone else run into this problem?

I have a (poor) workaround in which I edit one of the classes in the poky layer (poky/meta/classes/uboot-config.bbclass). I change this line:

d.appendVar('UBOOT_MACHINE', ' ' + items[0])

to this:

d.appendVar('UBOOT_MACHINE', items[0])

Is there some way to fix the uboot_auto_configure.sh script instead?

Thanks,
Shawn

Kristian Amlie

unread,
Jun 28, 2018, 2:57:39 AM6/28/18
to men...@lists.mender.io, Shawn Stevenson
Which branch are you on? Rocko? Check out this PR:
https://github.com/mendersoftware/meta-mender/pull/537

--
Kristian

signature.asc

Shawn Stevenson

unread,
Jun 28, 2018, 2:32:34 PM6/28/18
to Mender List mender.io, shawn.e....@gmail.com
Thanks for your quick reply Kristian. I am on Rocko and the PR you provided fixed my problem.

Thanks,
Shawn
Reply all
Reply to author
Forward
0 new messages