diff mbox

u-boot: u-boot SPL is usually under ./spl/

Message ID 1362329351-7738-1-git-send-email-carlo.caione@gmail.com
State Rejected
Headers show

Commit Message

Carlo Caione March 3, 2013, 4:49 p.m. UTC
Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
---
 boot/uboot/uboot.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Petazzoni March 3, 2013, 6:28 p.m. UTC | #1
Dear Carlo Caione,

On Sun,  3 Mar 2013 17:49:11 +0100, Carlo Caione wrote:
> Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
> ---
>  boot/uboot/uboot.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
> index ea77259..3dfcca3 100644
> --- a/boot/uboot/uboot.mk
> +++ b/boot/uboot/uboot.mk
> @@ -103,7 +103,7 @@ endef
>  define UBOOT_INSTALL_IMAGES_CMDS
>  	cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/
>  	$(if $(BR2_TARGET_UBOOT_SPL),
> -		cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
> +		cp -dpf $(@D)/spl/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)

In the case of OMAP, the SPL gets generated in the main source
directory. For which configuration do you see that it is installed only
in the spl/ sub-directory?

Best regards,

Thomas
Carlo Caione March 3, 2013, 6:55 p.m. UTC | #2
On Sun, Mar 3, 2013 at 7:28 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Carlo Caione,
>
> On Sun,  3 Mar 2013 17:49:11 +0100, Carlo Caione wrote:
>> Signed-off-by: Carlo Caione <carlo.caione@gmail.com>
>> ---
>>  boot/uboot/uboot.mk | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
>> index ea77259..3dfcca3 100644
>> --- a/boot/uboot/uboot.mk
>> +++ b/boot/uboot/uboot.mk
>> @@ -103,7 +103,7 @@ endef
>>  define UBOOT_INSTALL_IMAGES_CMDS
>>       cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/
>>       $(if $(BR2_TARGET_UBOOT_SPL),
>> -             cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
>> +             cp -dpf $(@D)/spl/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
>
> In the case of OMAP, the SPL gets generated in the main source
> directory. For which configuration do you see that it is installed only
> in the spl/ sub-directory?

I'm trying to use buildroot to create an image for a cubieboard
(http://cubieboard.org/).
In this case I have to use u-boot-sunxi and SPL gets generated only in spl/

Best,

--
Carlo Caione
Thomas Petazzoni March 3, 2013, 7:52 p.m. UTC | #3
Dear Carlo Caione,

On Sun, 3 Mar 2013 19:55:48 +0100, Carlo Caione wrote:

> > In the case of OMAP, the SPL gets generated in the main source
> > directory. For which configuration do you see that it is installed only
> > in the spl/ sub-directory?
> 
> I'm trying to use buildroot to create an image for a cubieboard
> (http://cubieboard.org/).
> In this case I have to use u-boot-sunxi and SPL gets generated only in spl/

Right, I tested this, and it gets installed in spl/.

What about setting BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin" ?

Best regards,

Thomas
Carlo Caione March 3, 2013, 8:53 p.m. UTC | #4
On Sun, Mar 3, 2013 at 8:52 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Carlo Caione,
>
> On Sun, 3 Mar 2013 19:55:48 +0100, Carlo Caione wrote:
>
>> > In the case of OMAP, the SPL gets generated in the main source
>> > directory. For which configuration do you see that it is installed only
>> > in the spl/ sub-directory?
>>
>> I'm trying to use buildroot to create an image for a cubieboard
>> (http://cubieboard.org/).
>> In this case I have to use u-boot-sunxi and SPL gets generated only in spl/
>
> Right, I tested this, and it gets installed in spl/.
>
> What about setting BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin" ?

Well, honestly I don't like it (not really clean) but I'll go for it
if there is no other way :)
(BTW, IIRC MLO in OMAP is just spl/u-boot-spl.bin with an additional header)

Regards,

--
Carlo Caione
Thomas Petazzoni March 4, 2013, 8:11 a.m. UTC | #5
Dear Carlo Caione,

On Sun, 3 Mar 2013 21:53:16 +0100, Carlo Caione wrote:

> > What about setting BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin" ?
> 
> Well, honestly I don't like it (not really clean) but I'll go for it
> if there is no other way :)

Well, in this specific case, I think it's probably the out of tree
uboot-sunxi thing that does not comply with normal U-Boot practices. I
think in U-Boot mainline, the SPL, whatever its name is, is always
finally installed in the main source directory at the end of the build.

If you really want, we can tune the boot/uboot.mk logic so that it
search $(@D) and $(@D)/spl, but I would rather suggest to fix
uboot-sunxi instead :)

Best regards,

Thomas
Peter Korsgaard March 4, 2013, 11:26 a.m. UTC | #6
>>>>> "Carlo" == Carlo Caione <carlo.caione@gmail.com> writes:

 >> What about setting BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.bin" ?

 Carlo> Well, honestly I don't like it (not really clean) but I'll go for it
 Carlo> if there is no other way :)

 Carlo> (BTW, IIRC MLO in OMAP is just spl/u-boot-spl.bin with an
 Carlo> additional header)

True, but the header is essential to get the ROM to use it.

I find it ok that the path is relative to the u-boot basedir.
diff mbox

Patch

diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index ea77259..3dfcca3 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -103,7 +103,7 @@  endef
 define UBOOT_INSTALL_IMAGES_CMDS
 	cp -dpf $(@D)/$(UBOOT_BIN) $(BINARIES_DIR)/
 	$(if $(BR2_TARGET_UBOOT_SPL),
-		cp -dpf $(@D)/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
+		cp -dpf $(@D)/spl/$(BR2_TARGET_UBOOT_SPL_NAME) $(BINARIES_DIR)/)
 endef
 
 define UBOOT_INSTALL_OMAP_IFT_IMAGE