[U-Boot] Building u-boot.imx and SPL simultaneously

Petr Kulhavy brain at jikos.cz
Fri Sep 2 20:57:24 CEST 2016


Hi,

you have already brought it to the point - it needs two defconfigs.
This means double the files in U-boot and second and more important, how 
does it integrate into a tool like Buildroot?
In other words I'm trying to do it with just one defconfig.

Alltogether I want to build 3 files:
* SPL which is started by the RBL
* u-boot.img which is loaded by the SPL from the flash after typing 'c' 
or similar on the terminal
* u-boot.imx for an initial load of the board via USB if there is no BL 
at all
All these images plus rootfs and kernel should be an outcome of one 
build in Buildroot.

Since the u-boot.imx is in fact u-boot.img with an extra header I don't 
see a reason why it shouldn't be possible to compile with the same make 
command.
And the interdependency of SPL and u-boot.imx, that only one can be 
built at a time, isn't obvious to me either. After all SPL is a 
completely different binary.

...or am I touching some skeleton in a cupboard?

Thanks
Petr

On 02/09/16 20:18, Stefano Babic wrote:
> Hi,
>
> On 02/09/2016 18:46, Petr Kulhavy wrote:
>> Hi,
>>
>> I'm facing a problem that the iMX Makefile does not allow to build
>> u-boot.imx and the SPL binary simultaneously.
> ...I am missing why you need to build them at the same time. Can you
> start with a detailed description of the problem ? Why is it not enough
> to build them in sequence ?
>
>> This would be useful for
>> generating images for flash and for a serial loading.
>> The reason is that each target needs a different config file, but there
>> is only one IMX_CONFIG variable.
> I do not get the point. Yes, you have two defconfig. And yes, you cannot
> built it at the same time. But you define the IMX_CONFIG in each of the
> two defconfig, making use of two different IMX_CONFIG, if this is what
> you want.
>
>> I have tried to create a dedicated IMX_CONFIG_SPL for the SPL, which
>> seems to work and I almost prepared a patch for submit.
>> Unfortunatelly there is some problem with the dependencies if both
>> u-boot.imx and SPL are put in ALL-y. The make with single job runs but
>> it fails in multi-job execution.
>>
>> Could you please help me and throw some light into the dependencies. I
>> think this patch could be useful also for others, see below.
>>
>>
> Best regards,
> Stefano Babic
>
>



More information about the U-Boot mailing list