Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Christian Riesch
Hi,

On Sun, Sep 16, 2012 at 11:27 AM, José Miguel Gonçalves
jose.goncal...@inov.pt wrote:
 On 09/14/2012 08:08 PM, Tom Rini wrote:

 On Fri, Sep 14, 2012 at 06:29:01PM +0100, Jos?? Miguel Gon??alves wrote:

 Samsung's S3C24XX SoCs need this in order to generate a binary image
 with the SPL and U-Boot concatenated.

 Signed-off-by: Jos?? Miguel Gon??alves jose.goncal...@inov.pt
 ---
 Changes for v2:
 - None
 ---
   Makefile |7 ---
   1 file changed, 4 insertions(+), 3 deletions(-)

 diff --git a/Makefile b/Makefile
 index 058fb53..595b5f6 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -442,13 +442,14 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin
   $(obj)u-boot.dis: $(obj)u-boot
 $(OBJDUMP) -d $  $@
   -$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 +$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary
 $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
 cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin 
 $(obj)u-boot-ubl.bin
 +   rm $(obj)spl/u-boot-spl-pad.bin
 +
 +$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
 $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
 -e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin
 $(obj)u-boot.ubl
 -   rm $(obj)u-boot-ubl.bin
 -   rm $(obj)spl/u-boot-spl-pad.bin
 $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 $(obj)tools/mkimage -s -n $(if
 $(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null) \

 This diff is hard to read, but what exactly are you changing?  The
 u-boot-ubl target is also used on TI platforms.  It looks like you're
 making it such that u-boot-ubl.bin produces the old binary and
 u-boot-ubl adds a new target which is the mkimage header on top of the
 same bits as before, but without possibly padding the output image.  I
 suspect in your case you could just set PAD_TO to 8192 in
 board/../config.mk and use the existing target.


 In the S3C2416 I don't need the mkimage stuff. I only need the raw SPL image
 padded at 8KB concatenated with the standard U-Boot. What I've done was to
 split the existing u-boot-ubl target in two; u-boot-ubl.bin, that I use to
 program the Flash, and u-boot-ubl that remains with the same functionality
 as before, just now it depends on u-boot-ubl.bin.

I think you should drop the UBL names from your padding target
(u-boot-ubl.bin) since this is TI specific, use something more
generic.
Regards, Christian
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread José Miguel Gonçalves

On 09/17/2012 07:47 AM, Christian Riesch wrote:

Hi,

On Sun, Sep 16, 2012 at 11:27 AM, José Miguel Gonçalves
jose.goncal...@inov.pt wrote:

On 09/14/2012 08:08 PM, Tom Rini wrote:

On Fri, Sep 14, 2012 at 06:29:01PM +0100, Jos?? Miguel Gon??alves wrote:


Samsung's S3C24XX SoCs need this in order to generate a binary image
with the SPL and U-Boot concatenated.

Signed-off-by: Jos?? Miguel Gon??alves jose.goncal...@inov.pt
---
Changes for v2:
 - None
---
   Makefile |7 ---
   1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 058fb53..595b5f6 100644
--- a/Makefile
+++ b/Makefile
@@ -442,13 +442,14 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin
   $(obj)u-boot.dis: $(obj)u-boot
 $(OBJDUMP) -d $  $@
   -$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
+$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary
$(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
 cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin 
$(obj)u-boot-ubl.bin
+   rm $(obj)spl/u-boot-spl-pad.bin
+
+$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
 $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
 -e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin
$(obj)u-boot.ubl
-   rm $(obj)u-boot-ubl.bin
-   rm $(obj)spl/u-boot-spl-pad.bin
 $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 $(obj)tools/mkimage -s -n $(if
$(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null) \

This diff is hard to read, but what exactly are you changing?  The
u-boot-ubl target is also used on TI platforms.  It looks like you're
making it such that u-boot-ubl.bin produces the old binary and
u-boot-ubl adds a new target which is the mkimage header on top of the
same bits as before, but without possibly padding the output image.  I
suspect in your case you could just set PAD_TO to 8192 in
board/../config.mk and use the existing target.


In the S3C2416 I don't need the mkimage stuff. I only need the raw SPL image
padded at 8KB concatenated with the standard U-Boot. What I've done was to
split the existing u-boot-ubl target in two; u-boot-ubl.bin, that I use to
program the Flash, and u-boot-ubl that remains with the same functionality
as before, just now it depends on u-boot-ubl.bin.

I think you should drop the UBL names from your padding target
(u-boot-ubl.bin) since this is TI specific, use something more
generic.


I only reused a temporary filename used for the u-boot-ubl target and 
make it a new target.

If you think this is not an adequate name, can you suggest a new one?

Best regards,
José Gonçalves
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread José Miguel Gonçalves

On 09/17/2012 10:10 AM, Christian Riesch wrote:

On Mon, Sep 17, 2012 at 10:30 AM, José Miguel Gonçalves
jose.goncal...@inov.pt wrote:

On 09/17/2012 07:47 AM, Christian Riesch wrote:

Hi,

On Sun, Sep 16, 2012 at 11:27 AM, José Miguel Gonçalves
jose.goncal...@inov.pt wrote:

On 09/14/2012 08:08 PM, Tom Rini wrote:

On Fri, Sep 14, 2012 at 06:29:01PM +0100, Jos?? Miguel Gon??alves wrote:


Samsung's S3C24XX SoCs need this in order to generate a binary image
with the SPL and U-Boot concatenated.

Signed-off-by: Jos?? Miguel Gon??alves jose.goncal...@inov.pt
---
Changes for v2:
  - None
---
Makefile |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 058fb53..595b5f6 100644
--- a/Makefile
+++ b/Makefile
@@ -442,13 +442,14 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin
$(obj)u-boot.dis: $(obj)u-boot
  $(OBJDUMP) -d $  $@
-$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
+$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
  $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary
$(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
  cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin 
$(obj)u-boot-ubl.bin
+   rm $(obj)spl/u-boot-spl-pad.bin
+
+$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
  $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
  -e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin
$(obj)u-boot.ubl
-   rm $(obj)u-boot-ubl.bin
-   rm $(obj)spl/u-boot-spl-pad.bin
  $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
  $(obj)tools/mkimage -s -n $(if
$(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null) \

This diff is hard to read, but what exactly are you changing?  The
u-boot-ubl target is also used on TI platforms.  It looks like you're
making it such that u-boot-ubl.bin produces the old binary and
u-boot-ubl adds a new target which is the mkimage header on top of the
same bits as before, but without possibly padding the output image.  I
suspect in your case you could just set PAD_TO to 8192 in
board/../config.mk and use the existing target.


In the S3C2416 I don't need the mkimage stuff. I only need the raw SPL
image
padded at 8KB concatenated with the standard U-Boot. What I've done was
to
split the existing u-boot-ubl target in two; u-boot-ubl.bin, that I use
to
program the Flash, and u-boot-ubl that remains with the same
functionality
as before, just now it depends on u-boot-ubl.bin.

I think you should drop the UBL names from your padding target
(u-boot-ubl.bin) since this is TI specific, use something more
generic.


I only reused a temporary filename used for the u-boot-ubl target and make
it a new target.
If you think this is not an adequate name, can you suggest a new one?

u-boot.pad? u-boot-pad.bin?



If no one else has anything against, I will change the name of the new 
target to u-boot-pad.bin


Best regards,
José Gonçalves
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Tom Rini
On Mon, Sep 17, 2012 at 10:24:34AM +0100, Jos?? Miguel Gon??alves wrote:
 On 09/17/2012 10:10 AM, Christian Riesch wrote:
 On Mon, Sep 17, 2012 at 10:30 AM, Jos?? Miguel Gon??alves
 jose.goncal...@inov.pt wrote:
 On 09/17/2012 07:47 AM, Christian Riesch wrote:
 Hi,
 
 On Sun, Sep 16, 2012 at 11:27 AM, Jos?? Miguel Gon??alves
 jose.goncal...@inov.pt wrote:
 On 09/14/2012 08:08 PM, Tom Rini wrote:
 On Fri, Sep 14, 2012 at 06:29:01PM +0100, Jos?? Miguel Gon??alves wrote:
 
 Samsung's S3C24XX SoCs need this in order to generate a binary image
 with the SPL and U-Boot concatenated.
 
 Signed-off-by: Jos?? Miguel Gon??alves jose.goncal...@inov.pt
 ---
 Changes for v2:
   - None
 ---
 Makefile |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 058fb53..595b5f6 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -442,13 +442,14 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin
 $(obj)u-boot.dis: $(obj)u-boot
   $(OBJDUMP) -d $  $@
 -$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 +$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
   $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary
 $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
   cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin 
 $(obj)u-boot-ubl.bin
 +   rm $(obj)spl/u-boot-spl-pad.bin
 +
 +$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
   $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
   -e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin
 $(obj)u-boot.ubl
 -   rm $(obj)u-boot-ubl.bin
 -   rm $(obj)spl/u-boot-spl-pad.bin
   $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
   $(obj)tools/mkimage -s -n $(if
 $(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null) \
 This diff is hard to read, but what exactly are you changing?  The
 u-boot-ubl target is also used on TI platforms.  It looks like you're
 making it such that u-boot-ubl.bin produces the old binary and
 u-boot-ubl adds a new target which is the mkimage header on top of the
 same bits as before, but without possibly padding the output image.  I
 suspect in your case you could just set PAD_TO to 8192 in
 board/../config.mk and use the existing target.
 
 In the S3C2416 I don't need the mkimage stuff. I only need the raw SPL
 image
 padded at 8KB concatenated with the standard U-Boot. What I've done was
 to
 split the existing u-boot-ubl target in two; u-boot-ubl.bin, that I use
 to
 program the Flash, and u-boot-ubl that remains with the same
 functionality
 as before, just now it depends on u-boot-ubl.bin.
 I think you should drop the UBL names from your padding target
 (u-boot-ubl.bin) since this is TI specific, use something more
 generic.
 
 I only reused a temporary filename used for the u-boot-ubl target and make
 it a new target.
 If you think this is not an adequate name, can you suggest a new one?
 u-boot.pad? u-boot-pad.bin?
 
 
 If no one else has anything against, I will change the name of the
 new target to u-boot-pad.bin

I think I'm OK with that.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Scott Wood

On 09/17/2012 04:24:34 AM, José Miguel Gonçalves wrote:

On 09/17/2012 10:10 AM, Christian Riesch wrote:

On Mon, Sep 17, 2012 at 10:30 AM, José Miguel Gonçalves
jose.goncal...@inov.pt wrote:

On 09/17/2012 07:47 AM, Christian Riesch wrote:

Hi,

On Sun, Sep 16, 2012 at 11:27 AM, José Miguel Gonçalves
jose.goncal...@inov.pt wrote:

On 09/14/2012 08:08 PM, Tom Rini wrote:
On Fri, Sep 14, 2012 at 06:29:01PM +0100, Jos?? Miguel  
Gon??alves wrote:


Samsung's S3C24XX SoCs need this in order to generate a binary  
image

with the SPL and U-Boot concatenated.

Signed-off-by: Jos?? Miguel Gon??alves jose.goncal...@inov.pt
---
Changes for v2:
  - None
---
Makefile |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 058fb53..595b5f6 100644
--- a/Makefile
+++ b/Makefile
@@ -442,13 +442,14 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin
$(obj)u-boot.dis: $(obj)u-boot
  $(OBJDUMP) -d $  $@
-$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin  
$(obj)u-boot.bin
+$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin  
$(obj)u-boot.bin
  $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O  
binary

$(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
  cat $(obj)spl/u-boot-spl-pad.bin  
$(obj)u-boot.bin 

$(obj)u-boot-ubl.bin
+   rm $(obj)spl/u-boot-spl-pad.bin
+
+$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
  $(obj)tools/mkimage -n $(UBL_CONFIG) -T  
ublimage \
  -e $(CONFIG_SYS_TEXT_BASE) -d  
$(obj)u-boot-ubl.bin

$(obj)u-boot.ubl
-   rm $(obj)u-boot-ubl.bin
-   rm $(obj)spl/u-boot-spl-pad.bin
  $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin  
$(obj)u-boot.bin

  $(obj)tools/mkimage -s -n $(if
$(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null)  
\
This diff is hard to read, but what exactly are you changing?   
The
u-boot-ubl target is also used on TI platforms.  It looks like  
you're

making it such that u-boot-ubl.bin produces the old binary and
u-boot-ubl adds a new target which is the mkimage header on top  
of the
same bits as before, but without possibly padding the output  
image.  I

suspect in your case you could just set PAD_TO to 8192 in
board/../config.mk and use the existing target.

In the S3C2416 I don't need the mkimage stuff. I only need the  
raw SPL

image
padded at 8KB concatenated with the standard U-Boot. What I've  
done was

to
split the existing u-boot-ubl target in two; u-boot-ubl.bin, that  
I use

to
program the Flash, and u-boot-ubl that remains with the same
functionality
as before, just now it depends on u-boot-ubl.bin.

I think you should drop the UBL names from your padding target
(u-boot-ubl.bin) since this is TI specific, use something more
generic.


I only reused a temporary filename used for the u-boot-ubl target  
and make

it a new target.
If you think this is not an adequate name, can you suggest a new  
one?

u-boot.pad? u-boot-pad.bin?



If no one else has anything against, I will change the name of the  
new target to u-boot-pad.bin


What exactly is u-boot-pad.bin supposed to be?  I hope that's not being  
proposed as the final output file the user sees.


With old nand_spl we had u-boot-nand.bin for the final concatenated  
binary, but that's not appropriate for a generic spl.  I think it would  
be better for the user to see u-boot.bin as the actual image to put  
on the boot device, regardless of implementation details like spl, if  
there's no requirement of a specific file format.  The second stage  
could become u-boot-main.bin or similar on builds where spl is used.


-Scott
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Marek Vasut
Dear Tom Rini,

[...]

  If no one else has anything against, I will change the name of the
  new target to u-boot-pad.bin
 
 I think I'm OK with that.

What about having CPU-overridable targets ? So omap can have it's own .ubl 
result and commands leading to it ... and so can s3c24xx. Such targets would 
have to be shifted into CPU-specific dirs, is that possible?

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Tom Rini
On 09/17/12 09:29, Marek Vasut wrote:
 Dear Tom Rini,
 
 [...]
 
 If no one else has anything against, I will change the name of the
 new target to u-boot-pad.bin

 I think I'm OK with that.
 
 What about having CPU-overridable targets ? So omap can have it's own .ubl 
 result and commands leading to it ... and so can s3c24xx. Such targets would 
 have to be shifted into CPU-specific dirs, is that possible?

The problem I see first is that UBL doesn't seem to mean anything in
the context of s3c24xx, it just happens to be doing some of what the
system wants.

-- 
Tom

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Tom Rini
On 09/17/12 09:27, Scott Wood wrote:
 On 09/17/2012 04:24:34 AM, José Miguel Gonçalves wrote:
[snip]
 If no one else has anything against, I will change the name of the new
 target to u-boot-pad.bin
 
 What exactly is u-boot-pad.bin supposed to be?  I hope that's not being
 proposed as the final output file the user sees.
 
 With old nand_spl we had u-boot-nand.bin for the final concatenated
 binary, but that's not appropriate for a generic spl.  I think it would
 be better for the user to see u-boot.bin as the actual image to put on
 the boot device, regardless of implementation details like spl, if
 there's no requirement of a specific file format.  The second stage
 could become u-boot-main.bin or similar on builds where spl is used.

We need some name that means U-Boot SPL with U-Boot tacked on at the
end.  This can optionally be padded to a defined size to make writing
to hardware easier.  We also have the problem that u-boot.bin already
means something so it needs to be clear.  I further fear that even if we
made an out directory if we put u-boot.bin in there and it's not the
same as the objcopy -O binary u-boot u-boot.bin as before we've violated
the rule of least surprise and the end user problems from people that
read the document (that happened to be out of date) will be our problem.

In short, at least a few people have said something along the lines of
We need generic output nameo $mediums and targets but there's two hard
problems, one of which is that every SoC _needs_ things tweaked just so
(no header? no boot!), sometimes wants things tweaked further (pad the
final image out to be easier to write to $medium) and sometimes needs
multiple files (the whole of 'SPL' will be read so it must fit into
$SMALL_MEMORY).  The other is naming.

I don't want to block this series on this problem.  I do want to say it
needs to use my updated SPL framework or show that it's inadequate (and
I owe another reply to part of this thread still) for this platform.
Call it u-boot.s3c or .s3c24xx and lets continue talking about how to
solve the general problem.

-- 
Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Scott Wood

On 09/17/2012 11:51:52 AM, Tom Rini wrote:

On 09/17/12 09:27, Scott Wood wrote:
 On 09/17/2012 04:24:34 AM, José Miguel Gonçalves wrote:
[snip]
 If no one else has anything against, I will change the name of the  
new

 target to u-boot-pad.bin

 What exactly is u-boot-pad.bin supposed to be?  I hope that's not  
being

 proposed as the final output file the user sees.

 With old nand_spl we had u-boot-nand.bin for the final concatenated
 binary, but that's not appropriate for a generic spl.  I think it  
would
 be better for the user to see u-boot.bin as the actual image to  
put on

 the boot device, regardless of implementation details like spl, if
 there's no requirement of a specific file format.  The second stage
 could become u-boot-main.bin or similar on builds where spl is  
used.


We need some name that means U-Boot SPL with U-Boot tacked on at the
end.  This can optionally be padded to a defined size to make writing
to hardware easier.  We also have the problem that u-boot.bin  
already

means something so it needs to be clear.


u-boot.bin has traditionally (except for nand_spl and derivatives)  
meant the final image ready to put into flash, after any  
platform-specific layout issues are taken care of (e.g. on mpc83xx it  
will have a reset control word embedded, on mpc85xx it will be padded  
to 512K with a reset vector at the end, etc.).  That we did the  
tweaking in the linker script rather than after linking seems like an  
inconsequential implementation detail.



I further fear that even if we
made an out directory if we put u-boot.bin in there and it's not the
same as the objcopy -O binary u-boot u-boot.bin as before we've  
violated

the rule of least surprise and the end user problems from people that
read the document (that happened to be out of date) will be our  
problem.


In this case I think you can't meet one user's expectations without  
violating another's.  I think it's more important to make it clear to  
the user what file they're supposed to put into flash.  Users of  
platforms that are currently supported by nand_spl would probably like  
to continue seeing u-boot-nand.bin -- it's a tradeoff of historical  
stability versus current consistency.



In short, at least a few people have said something along the lines of
We need generic output nameo $mediums and targets but there's two  
hard
problems, one of which is that every SoC _needs_ things tweaked just  
so

(no header? no boot!), sometimes wants things tweaked further (pad the
final image out to be easier to write to $medium) and sometimes needs
multiple files (the whole of 'SPL' will be read so it must fit into
$SMALL_MEMORY).  The other is naming.


A simple concatenation of a padded SPL plus the main U-Boot was good  
enough for all the nand_spl boards AFAIK, so it's not quite every SoC  
that needs something special here.  For those that do require a special  
format (or multiple files) with a file extension that is familiar to  
people working with that platform, using that extension makes sense.   
pad does not, and a proliferation of SoC-specific suffixes isn't much  
better.


-Scott
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Tom Rini
On 09/17/12 10:32, Scott Wood wrote:
 On 09/17/2012 11:51:52 AM, Tom Rini wrote:
 On 09/17/12 09:27, Scott Wood wrote:
  On 09/17/2012 04:24:34 AM, José Miguel Gonçalves wrote:
 [snip]
  If no one else has anything against, I will change the name of the new
  target to u-boot-pad.bin
 
  What exactly is u-boot-pad.bin supposed to be?  I hope that's not being
  proposed as the final output file the user sees.
 
  With old nand_spl we had u-boot-nand.bin for the final concatenated
  binary, but that's not appropriate for a generic spl.  I think it would
  be better for the user to see u-boot.bin as the actual image to
 put on
  the boot device, regardless of implementation details like spl, if
  there's no requirement of a specific file format.  The second stage
  could become u-boot-main.bin or similar on builds where spl is used.

 We need some name that means U-Boot SPL with U-Boot tacked on at the
 end.  This can optionally be padded to a defined size to make writing
 to hardware easier.  We also have the problem that u-boot.bin already
 means something so it needs to be clear.
 
 u-boot.bin has traditionally (except for nand_spl and derivatives) meant
 the final image ready to put into flash, after any platform-specific
 layout issues are taken care of (e.g. on mpc83xx it will have a reset
 control word embedded, on mpc85xx it will be padded to 512K with a reset
 vector at the end, etc.).  That we did the tweaking in the linker script
 rather than after linking seems like an inconsequential implementation
 detail.

Right, but it's also just objcopy (with OBJCFLAGS) -O binary of, and
this is the biggie to me, just U-Boot.

 I further fear that even if we
 made an out directory if we put u-boot.bin in there and it's not the
 same as the objcopy -O binary u-boot u-boot.bin as before we've violated
 the rule of least surprise and the end user problems from people that
 read the document (that happened to be out of date) will be our
 problem.
 
 In this case I think you can't meet one user's expectations without
 violating another's.  I think it's more important to make it clear to
 the user what file they're supposed to put into flash.  Users of
 platforms that are currently supported by nand_spl would probably like
 to continue seeing u-boot-nand.bin -- it's a tradeoff of historical
 stability versus current consistency.

Right.  So I'm saying we need to set new expectations for everyone and
some human helper symlinks to help.  A new top-level out or images or
something, with symlinks inside.

 In short, at least a few people have said something along the lines of
 We need generic output nameo $mediums and targets but there's two hard
 problems, one of which is that every SoC _needs_ things tweaked just so
 (no header? no boot!), sometimes wants things tweaked further (pad the
 final image out to be easier to write to $medium) and sometimes needs
 multiple files (the whole of 'SPL' will be read so it must fit into
 $SMALL_MEMORY).  The other is naming.
 
 A simple concatenation of a padded SPL plus the main U-Boot was good
 enough for all the nand_spl boards AFAIK, so it's not quite every SoC
 that needs something special here.  For those that do require a special
 format (or multiple files) with a file extension that is familiar to
 people working with that platform, using that extension makes sense. 
 pad does not, and a proliferation of SoC-specific suffixes isn't much
 better.

I think we're running into PowerPC vs ARM fun.  We've got 7 or so
different whack the image for this SoC for this medium type things
already.

-- 
Tom
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Scott Wood

On 09/17/2012 12:53:41 PM, Tom Rini wrote:

On 09/17/12 10:32, Scott Wood wrote:
 On 09/17/2012 11:51:52 AM, Tom Rini wrote:
 On 09/17/12 09:27, Scott Wood wrote:
  On 09/17/2012 04:24:34 AM, José Miguel Gonçalves wrote:
 [snip]
  If no one else has anything against, I will change the name of  
the new

  target to u-boot-pad.bin
 
  What exactly is u-boot-pad.bin supposed to be?  I hope that's  
not being

  proposed as the final output file the user sees.
 
  With old nand_spl we had u-boot-nand.bin for the final  
concatenated
  binary, but that's not appropriate for a generic spl.  I think  
it would

  be better for the user to see u-boot.bin as the actual image to
 put on
  the boot device, regardless of implementation details like spl,  
if
  there's no requirement of a specific file format.  The second  
stage
  could become u-boot-main.bin or similar on builds where spl is  
used.


 We need some name that means U-Boot SPL with U-Boot tacked on at  
the
 end.  This can optionally be padded to a defined size to make  
writing
 to hardware easier.  We also have the problem that u-boot.bin  
already

 means something so it needs to be clear.

 u-boot.bin has traditionally (except for nand_spl and derivatives)  
meant

 the final image ready to put into flash, after any platform-specific
 layout issues are taken care of (e.g. on mpc83xx it will have a  
reset
 control word embedded, on mpc85xx it will be padded to 512K with a  
reset
 vector at the end, etc.).  That we did the tweaking in the linker  
script
 rather than after linking seems like an inconsequential  
implementation

 detail.

Right, but it's also just objcopy (with OBJCFLAGS) -O binary of, and
this is the biggie to me, just U-Boot.

 I further fear that even if we
 made an out directory if we put u-boot.bin in there and it's not  
the
 same as the objcopy -O binary u-boot u-boot.bin as before we've  
violated
 the rule of least surprise and the end user problems from people  
that

 read the document (that happened to be out of date) will be our
 problem.

 In this case I think you can't meet one user's expectations without
 violating another's.  I think it's more important to make it clear  
to

 the user what file they're supposed to put into flash.  Users of
 platforms that are currently supported by nand_spl would probably  
like

 to continue seeing u-boot-nand.bin -- it's a tradeoff of historical
 stability versus current consistency.

Right.  So I'm saying we need to set new expectations for everyone and
some human helper symlinks to help.  A new top-level out or images or
something, with symlinks inside.


How about something like u-boot-final.bin[1], u-boot-all.bin,  
u-boot-image.bin, etc. as the end-user output, with .bin changed to  
something else if it's a well known file type?  At least for the boards  
that only require one output file.


-Scott

[1] Though then LDFLAGS_FINAL becomes confusing...
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-17 Thread Wolfgang Denk
Dear Tom Rini,

In message 505763a5.1030...@ti.com you wrote:

 Right.  So I'm saying we need to set new expectations for everyone and
 some human helper symlinks to help.  A new top-level out or images or
 something, with symlinks inside.

Why would we need that?

For the end user, any name is good enough, as long as it's clearly
documented which file to use, and what exactly to do with it.  There
are so many different boot formatrequirements, that we canot expect to
come up with good names for all of these in any way that matches all
people's expectations because everything is completely
self-explanatory.

Make it simple, and handle it in the documentation.

 I think we're running into PowerPC vs ARM fun.  We've got 7 or so
 different whack the image for this SoC for this medium type things
 already.

I don't think it's an PPC versus ARM issue  It's more an good old
times versus brave new world thing.  Actually Shakespeare's verses
apply fully to many of teh recent SoC designs - be these PPC or ARM or
whatever based:

O wonder!
How many goodly creatures are there here!
How beauteous mankind is! O brave new world,
That has such people in't.
—William Shakespeare, The Tempest, Act V, Scene I, ll. 203—6

Thinking about features, boot image formats, boot device selection and
other boot requirements of the ROM boot loaders of any recent SoC
indeed makes me wonder How many goodly creatures are there here!

PS: The good in this reference is to be understood in the same
sense as the best in the name of the MPC5200 BestComm DMA
controller.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de
In the long run, every program becomes rococo, and then rubble.
- Alan Perlis
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-16 Thread José Miguel Gonçalves

On 09/14/2012 08:08 PM, Tom Rini wrote:

On Fri, Sep 14, 2012 at 06:29:01PM +0100, Jos?? Miguel Gon??alves wrote:


Samsung's S3C24XX SoCs need this in order to generate a binary image
with the SPL and U-Boot concatenated.

Signed-off-by: Jos?? Miguel Gon??alves jose.goncal...@inov.pt
---
Changes for v2:
- None
---
  Makefile |7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 058fb53..595b5f6 100644
--- a/Makefile
+++ b/Makefile
@@ -442,13 +442,14 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin
  $(obj)u-boot.dis: $(obj)u-boot
$(OBJDUMP) -d $  $@
  
-$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin

+$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
$(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary 
$(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin  
$(obj)u-boot-ubl.bin
+   rm $(obj)spl/u-boot-spl-pad.bin
+
+$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
$(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
-e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin 
$(obj)u-boot.ubl
-   rm $(obj)u-boot-ubl.bin
-   rm $(obj)spl/u-boot-spl-pad.bin
  
  $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin

$(obj)tools/mkimage -s -n $(if 
$(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null) \

This diff is hard to read, but what exactly are you changing?  The
u-boot-ubl target is also used on TI platforms.  It looks like you're
making it such that u-boot-ubl.bin produces the old binary and
u-boot-ubl adds a new target which is the mkimage header on top of the
same bits as before, but without possibly padding the output image.  I
suspect in your case you could just set PAD_TO to 8192 in
board/../config.mk and use the existing target.



In the S3C2416 I don't need the mkimage stuff. I only need the raw SPL 
image padded at 8KB concatenated with the standard U-Boot. What I've 
done was to split the existing u-boot-ubl target in two; u-boot-ubl.bin, 
that I use to program the Flash, and u-boot-ubl that remains with the 
same functionality as before, just now it depends on u-boot-ubl.bin.


___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


[U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-14 Thread José Miguel Gonçalves
Samsung's S3C24XX SoCs need this in order to generate a binary image
with the SPL and U-Boot concatenated.

Signed-off-by: José Miguel Gonçalves jose.goncal...@inov.pt
---
Changes for v2:
   - None
---
 Makefile |7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 058fb53..595b5f6 100644
--- a/Makefile
+++ b/Makefile
@@ -442,13 +442,14 @@ $(obj)u-boot.sha1:$(obj)u-boot.bin
 $(obj)u-boot.dis:  $(obj)u-boot
$(OBJDUMP) -d $  $@
 
-$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
+$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
$(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary 
$(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin  
$(obj)u-boot-ubl.bin
+   rm $(obj)spl/u-boot-spl-pad.bin
+
+$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
$(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
-e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin 
$(obj)u-boot.ubl
-   rm $(obj)u-boot-ubl.bin
-   rm $(obj)spl/u-boot-spl-pad.bin
 
 $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
$(obj)tools/mkimage -s -n $(if 
$(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null) \
-- 
1.7.9.5

___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-14 Thread Marek Vasut
Dear José Miguel Gonçalves,

 Samsung's S3C24XX SoCs need this in order to generate a binary image
 with the SPL and U-Boot concatenated.

You aren't adding it, you're modifying it.

 Signed-off-by: José Miguel Gonçalves jose.goncal...@inov.pt
 ---
 Changes for v2:
- None
 ---
  Makefile |7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 058fb53..595b5f6 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -442,13 +442,14 @@ $(obj)u-boot.sha1:  $(obj)u-boot.bin
  $(obj)u-boot.dis:$(obj)u-boot
   $(OBJDUMP) -d $  $@
 
 -$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 +$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
   $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary
 $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin cat
 $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin  $(obj)u-boot-ubl.bin +
 
rm
 $(obj)spl/u-boot-spl-pad.bin
 +
 +$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
   $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
   -e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin $(obj)u-
boot.ubl
 - rm $(obj)u-boot-ubl.bin
 - rm $(obj)spl/u-boot-spl-pad.bin

Check the apollon board, won't this colide with it's NAND IPL?

  $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
   $(obj)tools/mkimage -s -n $(if
 $(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null) \

Best regards,
Marek Vasut
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot


Re: [U-Boot] [PATCH v2 10/11] Add u-boot-ubl.bin target to the Makefile

2012-09-14 Thread Tom Rini
On Fri, Sep 14, 2012 at 06:29:01PM +0100, Jos?? Miguel Gon??alves wrote:

 Samsung's S3C24XX SoCs need this in order to generate a binary image
 with the SPL and U-Boot concatenated.
 
 Signed-off-by: Jos?? Miguel Gon??alves jose.goncal...@inov.pt
 ---
 Changes for v2:
- None
 ---
  Makefile |7 ---
  1 file changed, 4 insertions(+), 3 deletions(-)
 
 diff --git a/Makefile b/Makefile
 index 058fb53..595b5f6 100644
 --- a/Makefile
 +++ b/Makefile
 @@ -442,13 +442,14 @@ $(obj)u-boot.sha1:  $(obj)u-boot.bin
  $(obj)u-boot.dis:$(obj)u-boot
   $(OBJDUMP) -d $  $@
  
 -$(obj)u-boot.ubl:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
 +$(obj)u-boot-ubl.bin:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
   $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary 
 $(obj)spl/u-boot-spl $(obj)spl/u-boot-spl-pad.bin
   cat $(obj)spl/u-boot-spl-pad.bin $(obj)u-boot.bin  
 $(obj)u-boot-ubl.bin
 + rm $(obj)spl/u-boot-spl-pad.bin
 +
 +$(obj)u-boot.ubl:   $(obj)u-boot-ubl.bin
   $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \
   -e $(CONFIG_SYS_TEXT_BASE) -d $(obj)u-boot-ubl.bin 
 $(obj)u-boot.ubl
 - rm $(obj)u-boot-ubl.bin
 - rm $(obj)spl/u-boot-spl-pad.bin
  
  $(obj)u-boot.ais:   $(obj)spl/u-boot-spl.bin $(obj)u-boot.bin
   $(obj)tools/mkimage -s -n $(if 
 $(CONFIG_AIS_CONFIG_FILE),$(CONFIG_AIS_CONFIG_FILE),/dev/null) \

This diff is hard to read, but what exactly are you changing?  The
u-boot-ubl target is also used on TI platforms.  It looks like you're
making it such that u-boot-ubl.bin produces the old binary and
u-boot-ubl adds a new target which is the mkimage header on top of the
same bits as before, but without possibly padding the output image.  I
suspect in your case you could just set PAD_TO to 8192 in
board/../config.mk and use the existing target.

-- 
Tom


signature.asc
Description: Digital signature
___
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot