Re: [U-Boot] SPL framework re-design

2011-06-29 Thread Aneesh V
On Tuesday 28 June 2011 09:48 PM, Scott Wood wrote: On Tue, 28 Jun 2011 12:24:11 +0530 Aneesh Vane...@ti.com wrote: 1. If there are SPL customized generic files like the nand_spl/nand_boot.c where do we keep them? I suggest that we keep them in spl/nand, spl/onenand etc. And for the object

Re: [U-Boot] SPL framework re-design

2011-06-28 Thread Aneesh V
On Tuesday 28 June 2011 02:52 AM, Wolfgang Denk wrote: Dear Scott Wood, In message20110627161803.16783...@schlenkerla.am.freescale.net you wrote: But if we do not create a new hierarchy of target directories we will have the normal and the spl objects in parallel (and I don't want to

Re: [U-Boot] SPL framework re-design

2011-06-28 Thread Scott Wood
On Tue, 28 Jun 2011 12:24:11 +0530 Aneesh V ane...@ti.com wrote: 1. If there are SPL customized generic files like the nand_spl/nand_boot.c where do we keep them? I suggest that we keep them in spl/nand, spl/onenand etc. And for the object file hierarchy let's have something like spl/obj. How

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Ilya Yanok
Hi Aneesh, On 27.06.2011 08:29, Aneesh V wrote: I wonder why do we need this whole spl thing in the first place (well, surely I know what they are used for but why do we need a separate entity for this)? Isn't it just the same U-Boot in, well, very special configuration (minimal set of

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Simon Schwarz
Hi, You mentioned that /spl can not be used for source files. Isn't there a way to workaround this problem? Why should we have source files in a SPL directory? I would prefer to have spl specific sources right where the rest ist - maybe marked with something like _spl or excluded by some

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Aneesh V
Hi Ilya, On Monday 27 June 2011 01:54 PM, Ilya Yanok wrote: Hi Aneesh, On 27.06.2011 08:29, Aneesh V wrote: I wonder why do we need this whole spl thing in the first place (well, surely I know what they are used for but why do we need a separate entity for this)? Isn't it just the same

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Aneesh, In message 4e0804dc.8090...@ti.com you wrote: +spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend + $(MAKE) -C spl/ all + $(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl The mmc_spl/ is suppoed to be moved into spl/, isn't it? This patch was intended only as a

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Ilya, In message loom.20110627t010402-...@post.gmane.org you wrote: I wonder why do we need this whole spl thing in the first place (well, surely I know what they are used for but why do we need a separate entity for this)? Isn't it just the same U-Boot in, well, very special

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Aneesh, In message 4e080733.2030...@ti.com you wrote: I wonder why do we need this whole spl thing in the first place (well, surely I know what they are used for but why do we need a separate entity for this)? Isn't it just the same U-Boot in, well, very special configuration

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Daniel Schwierzeck
Hi, On Mon, Jun 27, 2011 at 11:27 AM, Wolfgang Denk w...@denx.de wrote: Dear Ilya, In message loom.20110627t010402-...@post.gmane.org you wrote: I wonder why do we need this whole spl thing in the first place (well, surely I know what they are used for but why do we need a separate entity

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Aneesh V
Dear Wolfgang, On Monday 27 June 2011 02:57 PM, Wolfgang Denk wrote: Dear Aneesh, In message4e0804dc.8090...@ti.com you wrote: +spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend + $(MAKE) -C spl/ all + $(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl The mmc_spl/ is suppoed to be

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Scott Wood
On Mon, 27 Jun 2011 11:27:31 +0200 Wolfgang Denk w...@denx.de wrote: Dear Ilya, In message loom.20110627t010402-...@post.gmane.org you wrote: I wonder why do we need this whole spl thing in the first place (well, surely I know what they are used for but why do we need a separate entity

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Scott Wood
On Mon, 27 Jun 2011 11:36:33 +0200 Wolfgang Denk w...@denx.de wrote: Dear Aneesh, In message 4e080733.2030...@ti.com you wrote: I wonder why do we need this whole spl thing in the first place (well, surely I know what they are used for but why do we need a separate entity for

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Daniel, In message BANLkTin-s=wznptu8ej7s_gz9hrrv-p...@mail.gmail.com you wrote: Good point. Eventually we can just add additional build rules for new object files (say, .splo instead of .o) ? I agree this approach seems to be the best one. But then we have to create

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Aneesh V, In message 4e089a25.4050...@ti.com you wrote: Instead of doing this, we could as well just maintain a list of objects and then link all these together directly, without creating libraries first. Is this like a make variable that keeps accumulating objects from

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Scott Wood, In message 20110627133435.31cd3...@schlenkerla.am.freescale.net you wrote: Good point. Eventually we can just add additional build rules for new object files (say, .splo instead of .o) ? No need for new extensions -- we should be able to use the target directory to

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Scott Wood, In message 20110627134205.021af...@schlenkerla.am.freescale.net you wrote: This statement does not make much sense to me. If we can do it in the spl/ directory, we should be able to do it in any other directory as well. The worst to happen is that we have to keep two

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Scott Wood
On Mon, 27 Jun 2011 22:50:46 +0200 Wolfgang Denk w...@denx.de wrote: Dear Scott Wood, In message 20110627133435.31cd3...@schlenkerla.am.freescale.net you wrote: Good point. Eventually we can just add additional build rules for new object files (say, .splo instead of .o) ? No

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Scott Wood, In message 20110627155535.4217b...@schlenkerla.am.freescale.net you wrote: But if we do not create a new hierarchy of target directories we will have the normal and the spl objects in parallel (and I don't want to delete one when building the other). What's wrong with

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Scott Wood
On Mon, 27 Jun 2011 23:10:33 +0200 Wolfgang Denk w...@denx.de wrote: Dear Scott Wood, In message 20110627155535.4217b...@schlenkerla.am.freescale.net you wrote: But if we do not create a new hierarchy of target directories we will have the normal and the spl objects in parallel (and I

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Scott Wood, In message 20110627161803.16783...@schlenkerla.am.freescale.net you wrote: But if we do not create a new hierarchy of target directories we will have the normal and the spl objects in parallel (and I don't want to delete one when building the other). What's

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Graeme Russ
Hi All, Just thought I'd throw in a left-field idea... Could we make the loading of U-Boot into a generic multi-stage framework with each stage bootstrapping the next stage? OK, I know this is how IPL, SPL etc work already, but I'm thinking something more formal and arch independent. I can

Re: [U-Boot] SPL framework re-design

2011-06-27 Thread Wolfgang Denk
Dear Graeme Russ, In message banlktinapvrprepfnsoypjertu6hzga...@mail.gmail.com you wrote: I can think of three disctinct phases which are relatively commong across most arch's (especially NAND Flash arches) 1) An intial page (say 256 bytes for example) which loads a second stage into

Re: [U-Boot] SPL framework re-design

2011-06-26 Thread Ilya Yanok
Hello everybody, I've read the whole thread and I really like what Daniel suggests but I just want to speak it in a little bit different words. I wonder why do we need this whole spl thing in the first place (well, surely I know what they are used for but why do we need a separate entity for

Re: [U-Boot] SPL framework re-design

2011-06-26 Thread Aneesh V
Dear Wolfgang, On Saturday 25 June 2011 05:40 PM, Wolfgang Denk wrote: Dear Aneesh V, In message4e00799a.5040...@ti.com you wrote: Here is a crude implementation of the top-down approach you had been suggesting (or my interpretation of it). This is not complete yet and serves only as a

Re: [U-Boot] SPL framework re-design

2011-06-26 Thread Aneesh V
Hi Ilya, On Monday 27 June 2011 04:47 AM, Ilya Yanok wrote: Hello everybody, I've read the whole thread and I really like what Daniel suggests but I just want to speak it in a little bit different words. I wonder why do we need this whole spl thing in the first place (well, surely I know

Re: [U-Boot] SPL framework re-design

2011-06-25 Thread Aneesh V
Dear Wolfgang, On Tuesday 21 June 2011 04:29 PM, Aneesh V wrote: Dear Wolfgang, On Friday 17 June 2011 10:18 PM, Aneesh V wrote: Dear Wolfgang, Here is a crude implementation of the top-down approach you had been suggesting (or my interpretation of it). This is not complete yet and serves

Re: [U-Boot] SPL framework re-design

2011-06-25 Thread Wolfgang Denk
Dear Aneesh V, In message 4e00799a.5040...@ti.com you wrote: Here is a crude implementation of the top-down approach you had been suggesting (or my interpretation of it). This is not complete yet and serves only as a material for further discussions on this topic. Here is an updated

Re: [U-Boot] SPL framework re-design

2011-06-25 Thread Daniel Schwierzeck
Dear Wolfgang, On 06/25/2011 02:10 PM, Wolfgang Denk wrote: Dear Aneesh V, In message4e00799a.5040...@ti.com you wrote: Here is a crude implementation of the top-down approach you had been suggesting (or my interpretation of it). This is not complete yet and serves only as a material for

Re: [U-Boot] SPL framework re-design

2011-06-21 Thread Aneesh V
Dear Wolfgang, On Friday 17 June 2011 10:18 PM, Aneesh V wrote: Dear Wolfgang, Here is a crude implementation of the top-down approach you had been suggesting (or my interpretation of it). This is not complete yet and serves only as a material for further discussions on this topic. Here is

Re: [U-Boot] SPL framework re-design

2011-06-20 Thread Scott Wood
On Sun, 19 Jun 2011 15:52:29 +0530 V, Aneesh ane...@ti.com wrote: On Sat, Jun 18, 2011 at 3:58 AM, Scott Wood scottw...@freescale.com wrote: On Fri, 17 Jun 2011 22:18:57 +0530 Aneesh V ane...@ti.com wrote: @@ -1158,6 +1164,7 @@ clobber:        clean       @[ ! -d $(obj)nand_spl ] ||

Re: [U-Boot] SPL framework re-design

2011-06-20 Thread Aneesh V
On Monday 20 June 2011 09:49 PM, Scott Wood wrote: On Sun, 19 Jun 2011 15:52:29 +0530 V, Aneeshane...@ti.com wrote: On Sat, Jun 18, 2011 at 3:58 AM, Scott Woodscottw...@freescale.com wrote: On Fri, 17 Jun 2011 22:18:57 +0530 Aneesh Vane...@ti.com wrote: @@ -1158,6 +1164,7 @@ clobber:

Re: [U-Boot] SPL framework re-design

2011-06-19 Thread V, Aneesh
On Sat, Jun 18, 2011 at 3:58 AM, Scott Wood scottw...@freescale.com wrote: On Fri, 17 Jun 2011 22:18:57 +0530 Aneesh V ane...@ti.com wrote: @@ -1158,6 +1164,7 @@ clobber:        clean       @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name * -type l -print | xargs rm -f       @[ ! -d

Re: [U-Boot] SPL framework re-design

2011-06-17 Thread Aneesh V
On Thursday 16 June 2011 10:15 PM, Scott Wood wrote: On Thu, 16 Jun 2011 13:38:00 +0530 Aneesh Vane...@ti.com wrote: New Design Proposed by Wolfgang: * Have a top-level Makefile in the SPL root-directory - for instance 'nand_spl/Makefile' * nand_spl/Makefile builds a generic library with

Re: [U-Boot] SPL framework re-design

2011-06-17 Thread Aneesh V
On Friday 17 June 2011 03:39 AM, Wolfgang Denk wrote: Dear Scott Wood, In message20110616114556.7d3c2...@schlenkerla.am.freescale.net you wrote: What is a generic SPL library, or even a generic NAND SPL library? There is no code that is shared by all NAND SPLs. The files directly under

Re: [U-Boot] SPL framework re-design

2011-06-17 Thread Aneesh V
Dear Wolfgang, Here is a crude implementation of the top-down approach you had been suggesting (or my interpretation of it). This is not complete yet and serves only as a material for further discussions on this topic. This work borrows from the work of Daniel Schwierzeck staged here:

Re: [U-Boot] SPL framework re-design

2011-06-17 Thread Daniel Schwierzeck
Dear Wolfgang, On Thu, Jun 16, 2011 at 11:47 PM, Wolfgang Denk w...@denx.de wrote: Dear Daniel Schwierzeck, In message banlktim9ae2aszklidh53vd+hjpz7gv...@mail.gmail.com you wrote: The relocate_code and board_init_r functions must not be compiled, they are not needed anyway. This can be

Re: [U-Boot] SPL framework re-design

2011-06-17 Thread Scott Wood
On Fri, 17 Jun 2011 20:45:19 +0200 Daniel Schwierzeck daniel.schwierz...@googlemail.com wrote: Dear Wolfgang, On Thu, Jun 16, 2011 at 11:47 PM, Wolfgang Denk w...@denx.de wrote: Dear Daniel Schwierzeck, In message banlktim9ae2aszklidh53vd+hjpz7gv...@mail.gmail.com you wrote: The

Re: [U-Boot] SPL framework re-design

2011-06-17 Thread Scott Wood
On Fri, 17 Jun 2011 22:18:57 +0530 Aneesh V ane...@ti.com wrote: @@ -1158,6 +1164,7 @@ clobber:clean @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name * -type l -print | xargs rm -f @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name * -type l -print | xargs

[U-Boot] SPL framework re-design

2011-06-16 Thread Aneesh V
Dear Wolfgang, This is in continuation of our discussion in the following threads: http://article.gmane.org/gmane.comp.boot-loaders.u-boot/99795 http://article.gmane.org/gmane.comp.boot-loaders.u-boot/99785 I think this discussion now needs a dedicated thread. To make sure I understand your

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Wolfgang Denk
Dear Aneesh, In message 4df9b9e0.8020...@ti.com you wrote: To make sure I understand your new proposals, let me consolidate them here. Please correct me if I am wrong. Also, in the end I have some questions about your new proposal. Some of the questions are getting into the details. But I

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Aneesh V
Dear Wolfgang, On Thursday 16 June 2011 04:17 PM, Wolfgang Denk wrote: Dear Aneesh, In message4df9b9e0.8020...@ti.com you wrote: To make sure I understand your new proposals, let me consolidate them here. Please correct me if I am wrong. Also, in the end I have some questions about your

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Wolfgang Denk
Dear Aneesh V, In message 4df9ee03.8010...@ti.com you wrote: we are also duplicating the structure across different boot media. I think we should re-organize this as follows: spl/ spl/common/ spl/mmc/ spl/nand/ spl/onenand/ Can you please extend this to

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Daniel Schwierzeck
Hi all, for my MIPS based boards I tested a approach similar to Wolfgang's one in the last weeks. My goal was to create a SPL image, that is able to boot from a SPI flash. The basic idea is to have a spl directory that is used as remote build directory for all object files needed for the SPL

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Andreas Bießmann
Dear all, Am 16.06.2011 14:55, schrieb Daniel Schwierzeck: snip On Thu, Jun 16, 2011 at 12:47 PM, Wolfgang Denk w...@denx.de wrote: Dear Aneesh, snip We should try to get rid of the need to create symbolic links. If we use the same source files as for the normal, then we should also use

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Aneesh V
On Thursday 16 June 2011 05:45 PM, Wolfgang Denk wrote: Dear Aneesh V, In message4df9ee03.8010...@ti.com you wrote: we are also duplicating the structure across different boot media. I think we should re-organize this as follows: spl/ spl/common/ spl/mmc/ spl/nand/

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Aneesh V
Hi Daniel, This looks like an interesting alternative. On Thursday 16 June 2011 06:25 PM, Daniel Schwierzeck wrote: Hi all, for my MIPS based boards I tested a approach similar to Wolfgang's one in the last weeks. My goal was to create a SPL image, that is able to boot from a SPI flash.

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Daniel Schwierzeck
On Thu, Jun 16, 2011 at 3:57 PM, Aneesh V ane...@ti.com wrote: Hi Daniel, This looks like an interesting alternative. On Thursday 16 June 2011 06:25 PM, Daniel Schwierzeck wrote: Hi all, for my MIPS based boards I tested a approach similar to Wolfgang's one in the last weeks. My goal

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Scott Wood
On Thu, 16 Jun 2011 13:38:00 +0530 Aneesh V ane...@ti.com wrote: New Design Proposed by Wolfgang: * Have a top-level Makefile in the SPL root-directory - for instance 'nand_spl/Makefile' * nand_spl/Makefile builds a generic library with the generic source files at this level. What is a

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Wolfgang Denk
Dear Daniel Schwierzeck, In message banlktim9ae2aszklidh53vd+hjpz7gv...@mail.gmail.com you wrote: The relocate_code and board_init_r functions must not be compiled, they are not needed anyway. This can be simply controlled with -DCONFIG_UBOOT_SPL_BUILD. This is very much wrong. In the

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Wolfgang Denk
Dear Aneesh V, In message 4dfa0759.2060...@ti.com you wrote: Can you please extend this to show the SoC/board directories etc. I guess they will go under spl/ and not under each media. Correct, i. e. please add for example: spl/board/freescale/mx31pdk/

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Wolfgang Denk
Dear Aneesh V, In message 4dfa0be1.4060...@ti.com you wrote: In the last few mails Wolfgang was suggesting re-use of object files themselves, not the source files. In this respect his approach may be different from yours. But I think his objective was to avoid the symbolic link business,

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Wolfgang Denk
Dear Scott Wood, In message 20110616114556.7d3c2...@schlenkerla.am.freescale.net you wrote: What is a generic SPL library, or even a generic NAND SPL library? There is no code that is shared by all NAND SPLs. The files directly under nand_spl/ are alternatives that the board makefile can

Re: [U-Boot] SPL framework re-design

2011-06-16 Thread Scott Wood
On Fri, 17 Jun 2011 00:09:00 +0200 Wolfgang Denk w...@denx.de wrote: Dear Scott Wood, In message 20110616114556.7d3c2...@schlenkerla.am.freescale.net you wrote: What is a generic SPL library, or even a generic NAND SPL library? There is no code that is shared by all NAND SPLs. The