U-Boot Configurations - Select Boot Device

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

U-Boot Configurations - Select Boot Device

1,753 Views
PaulDeMetrotion
Senior Contributor I

I have multiple u-boot configurations for a custom MX6DL device. I am trying to build two different versions of u-boot.imx based on different boot devices, an SD or SPINOR device. Is there any way to differentiate the two u-boot.imx files. Each configuration produces the same u-boot-imx6dlc420-2104.04-r0.imx binary.In the manufacturing tool file directory, the Freescale devices have different u-boot file names according to the boot device. Is this something done automatically or do I create these files using the u-boot file created?

I have added the following two options in my boards.cfg file - mx6dlc420 and mx6dlc420_spinor:

Active  arm         armv7          mx6         freescale       mx6dlc420           mx6dlc420

mx6dlc420:IMX_CONFIG=board/freescale/mx6dlc420/mx6dl.cfg,MX6DL,DEFAULT_FDT_FILE="imx6dl-c420.dtb",DDR_MB=1024

Active  arm         armv7          mx6         freescale       mx6dlc420           mx6dlc420_spinor

mx6dlc420:IMX_CONFIG=board/freescale/mx6dlc420/mx6dl.cfg,MX6DL,DEFAULT_FDT_FILE="imx6dl-c420.dtb",DDR_MB=1024,SYS_BOOT_SPINOR

In my machine file, I have the following options:

UBOOT_CONFIG ??= "sd"

UBOOT_CONFIG[sd] = "mx6dlc420_config,sdcard"

UBOOT_CONFIG[spinor] = "mx6dlc420_spinor_config"

UBOOT_CONFIG[mfgtool] = "mx6dlc420_config"

I have built with the following selections which both work and build a u-boot file with the same name.

UBOOT_CONFIG ??= "sd"

UBOOT_CONFIG ??= "spinor"

The following selections did not build because of an error stating only one configuration is allowed.

UBOOT_CONFIG ??= "spinor sd"

UBOOT_CONFIG ??= "sd spinor"

How do I get the builds to produce different output files???

0 Kudos
1 Reply

771 Views
alejandrolozan1
NXP Employee
NXP Employee

Hi,

I do not know if that is possible in Yocto. As I see it you have to change it manually or if you are compiling U-boot with cross-compiler and not using bitbake, you can create shell scritpt that uses as parameter the configuration you need.

Your script may look like the below one:

#!/bin/bash

export ARCH=arm

export CROSS_COMPILE=/opt/poky/1.7/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-

make distclean;

make $1

make

mv u-boot.imx u-boot-$1.imx

And you have to call the srcipt with the configuration name as parameter.

Best Regards,

Alejandro

0 Kudos