Message ID | 1362596377-5827-18-git-send-email-benoit.thebaudeau@advansee.com |
---|---|
State | Changes Requested |
Delegated to: | Albert ARIBAUD |
Headers | show |
Hi Benoît, I have managed to rebase your patch series and have tested it over the ARM targets. This particular patch was the only one to cause an issue, and an amusing one at that: On Wed, 6 Mar 2013 19:59:24 +0100, Benoît Thébaudeau <benoit.thebaudeau@advansee.com> wrote: > This also fixes support for mx31pdk and tx25, which had been broken by commit > e05e5de7fae5bec79617e113916dac6631251156. Both boards actually build fine with e05e5de7fae (and have built fine since, at least in all of the routine ARM-wide builds I do as the ARM custodian and where I accept zero build failures or warnings). And both boards actually do not build at all with this patch :) and die with the same error: .../spl/u-boot-spl.lds:45: non constant or forward reference address expression for section .bss In both case I have double-checked this using Ubuntu's gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1) or ELDK 5.3's gcc version 4.7.2 (GCC). Amicalement,
Hi Albert, On Sunday, March 31, 2013 7:30:24 PM, Albert ARIBAUD wrote: > Hi Benoît, > > I have managed to rebase your patch series and have tested it over the > ARM targets. This particular patch was the only one to cause an issue, > and an amusing one at that: > > On Wed, 6 Mar 2013 19:59:24 +0100, Benoît Thébaudeau > <benoit.thebaudeau@advansee.com> wrote: > > > This also fixes support for mx31pdk and tx25, which had been broken by > > commit > > e05e5de7fae5bec79617e113916dac6631251156. > > Both boards actually build fine with e05e5de7fae (and have built > fine since, at least in all of the routine ARM-wide builds I do as the > ARM custodian and where I accept zero build failures or warnings). Yes, for me too. This was not a build issue, but a runtime one. > And both boards actually do not build at all with this patch :) and die > with the same error: > > .../spl/u-boot-spl.lds:45: non constant or forward reference address > expression for section .bss > > In both case I have double-checked this using Ubuntu's gcc version > 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1) or ELDK 5.3's gcc version 4.7.2 > (GCC). OK. That worked fine for me and Fabio at the time I issued the v9, so it can be the rebase, or something that changed in mainline in the meantime, or the toolchain. According to your tests, it's very unlikely that the toolchain is involved. I've looked at the Git history, and the guilty commit is 3ebd1cb. But thanks to commit 65cdd64, this build issue should be easily solved by replacing: +#define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot.lds" with: +#define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot-spl.lds" in both mx31pdk.h and tx25.h. Can you please retest with this change? This line could even be dropped from tx25.h since there is no arm926ejs SPL linker script obstructing the default assignment, contrary to arm1136 for mx31pdk, but that would be risky if such a linker script is added later. Is it still OK for the release if I send v10 on April 8 as I said (so just with the rebase including the change above if you confirm that everything is OK like that)? Best regards, Benoît
Hi Benoît, On Mon, 1 Apr 2013 02:30:00 +0200 (CEST), Benoît Thébaudeau <benoit.thebaudeau@advansee.com> wrote: > Hi Albert, > > On Sunday, March 31, 2013 7:30:24 PM, Albert ARIBAUD wrote: > > Hi Benoît, > > > > I have managed to rebase your patch series and have tested it over the > > ARM targets. This particular patch was the only one to cause an issue, > > and an amusing one at that: > > > > On Wed, 6 Mar 2013 19:59:24 +0100, Benoît Thébaudeau > > <benoit.thebaudeau@advansee.com> wrote: > > > > > This also fixes support for mx31pdk and tx25, which had been broken by > > > commit > > > e05e5de7fae5bec79617e113916dac6631251156. > > > > Both boards actually build fine with e05e5de7fae (and have built > > fine since, at least in all of the routine ARM-wide builds I do as the > > ARM custodian and where I accept zero build failures or warnings). > > Yes, for me too. This was not a build issue, but a runtime one. > > > And both boards actually do not build at all with this patch :) and die > > with the same error: > > > > .../spl/u-boot-spl.lds:45: non constant or forward reference address > > expression for section .bss > > > > In both case I have double-checked this using Ubuntu's gcc version > > 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1) or ELDK 5.3's gcc version 4.7.2 > > (GCC). > > OK. That worked fine for me and Fabio at the time I issued the v9, so it can be > the rebase, or something that changed in mainline in the meantime, or the > toolchain. According to your tests, it's very unlikely that the toolchain is > involved. > > I've looked at the Git history, and the guilty commit is 3ebd1cb. But thanks to > commit 65cdd64, this build issue should be easily solved by replacing: > +#define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot.lds" > with: > +#define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot-spl.lds" > in both mx31pdk.h and tx25.h. > > Can you please retest with this change? Patch 18/30 amended with this change and testing done; all ARM boards build fine now. > This line could even be dropped from tx25.h since there is no arm926ejs SPL > linker script obstructing the default assignment, contrary to arm1136 for > mx31pdk, but that would be risky if such a linker script is added later. > > Is it still OK for the release if I send v10 on April 8 as I said (so just with > the rebase including the change above if you confirm that everything is OK like > that)? You have Scott's acked-by for the NAND parts, and Tom's reviewed-by is proof enough for me that he is ok with the few non-ARM-only patches, so the patch series in itself is fine (assuming v10 is identical to v9 as I rebased it). I would just like some reports that boards (mx31pdk and tx25 especially, but others too, including a few non-ARM to make sure) have no issue running v10. > Best regards, > Benoît Amicalement,
Hi Albert, On Monday, April 1, 2013 10:26:21 AM, Albert ARIBAUD wrote: > Hi Benoît, > > On Mon, 1 Apr 2013 02:30:00 +0200 (CEST), Benoît Thébaudeau > <benoit.thebaudeau@advansee.com> wrote: > > > Hi Albert, > > > > On Sunday, March 31, 2013 7:30:24 PM, Albert ARIBAUD wrote: > > > Hi Benoît, > > > > > > I have managed to rebase your patch series and have tested it over the > > > ARM targets. This particular patch was the only one to cause an issue, > > > and an amusing one at that: > > > > > > On Wed, 6 Mar 2013 19:59:24 +0100, Benoît Thébaudeau > > > <benoit.thebaudeau@advansee.com> wrote: > > > > > > > This also fixes support for mx31pdk and tx25, which had been broken by > > > > commit > > > > e05e5de7fae5bec79617e113916dac6631251156. > > > > > > Both boards actually build fine with e05e5de7fae (and have built > > > fine since, at least in all of the routine ARM-wide builds I do as the > > > ARM custodian and where I accept zero build failures or warnings). > > > > Yes, for me too. This was not a build issue, but a runtime one. > > > > > And both boards actually do not build at all with this patch :) and die > > > with the same error: > > > > > > .../spl/u-boot-spl.lds:45: non constant or forward reference address > > > expression for section .bss > > > > > > In both case I have double-checked this using Ubuntu's gcc version > > > 4.7.2 (Ubuntu/Linaro 4.7.2-1ubuntu1) or ELDK 5.3's gcc version 4.7.2 > > > (GCC). > > > > OK. That worked fine for me and Fabio at the time I issued the v9, so it > > can be > > the rebase, or something that changed in mainline in the meantime, or the > > toolchain. According to your tests, it's very unlikely that the toolchain > > is > > involved. > > > > I've looked at the Git history, and the guilty commit is 3ebd1cb. But > > thanks to > > commit 65cdd64, this build issue should be easily solved by replacing: > > +#define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot.lds" > > with: > > +#define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot-spl.lds" > > in both mx31pdk.h and tx25.h. > > > > Can you please retest with this change? > > Patch 18/30 amended with this change and testing done; all ARM boards > build fine now. Thanks for testing that. > > This line could even be dropped from tx25.h since there is no arm926ejs SPL > > linker script obstructing the default assignment, contrary to arm1136 for > > mx31pdk, but that would be risky if such a linker script is added later. > > > > Is it still OK for the release if I send v10 on April 8 as I said (so just > > with > > the rebase including the change above if you confirm that everything is OK > > like > > that)? > > You have Scott's acked-by for the NAND parts, and Tom's reviewed-by is > proof enough for me that he is ok with the few non-ARM-only patches, > so the patch series in itself is fine (assuming v10 is identical to > v9 as I rebased it). > > I would just like some reports that boards (mx31pdk and tx25 especially, > but others too, including a few non-ARM to make sure) have no issue > running v10. OK, then it's probably better if I send v10 ASAP. I may not have access to my repo before this date, and I have not kept my v9 bundle in my outbox, so can you just send me back this bundle please? I will try to send a v10 during this week. Best regards, Benoît
Hi Benoît, On Mon, 1 Apr 2013 15:13:05 +0200 (CEST), Benoît Thébaudeau <benoit.thebaudeau@advansee.com> wrote: > OK, then it's probably better if I send v10 ASAP. I may not have access to my > repo before this date, and I have not kept my v9 bundle in my outbox, so can you > just send me back this bundle please? I will try to send a v10 during this week. Sent off-list as this bundle is V9 and thus should not be tested by people, only V10 should. > Best regards, > Benoît Amicalement,
Hi Albert, On Monday, April 1, 2013 5:53:55 PM, Albert ARIBAUD wrote: > Hi Benoît, > > On Mon, 1 Apr 2013 15:13:05 +0200 (CEST), Benoît Thébaudeau > <benoit.thebaudeau@advansee.com> wrote: > > > OK, then it's probably better if I send v10 ASAP. I may not have access to > > my > > repo before this date, and I have not kept my v9 bundle in my outbox, so > > can you > > just send me back this bundle please? I will try to send a v10 during this > > week. > > Sent off-list as this bundle is V9 and thus should not be tested by > people, only V10 should. Here is the v10 bundle for those who want to test: http://dl.free.fr/vdXBGExyq The resulting HEAD is identical to yours, except for board/freescale/mx31ads/u-boot.lds in which you had removed the following unrelated line for 30/30: __bss_end = .; Regarding this line, it is also present in a few other .lds, as well as the following ones: KEEP(*(.__bss_start)); KEEP(*(__bss_end)); However, the end section is named .__bss_end in arch/arm/lib/bss.c, so there is perhaps something wrong here, unless you did that on purpose because of the __bss_end test at the end of the linker script. I had noticed that, but I let you handle it. If something needs to be changed here, please do it after my series if possible in order to avoid a v11 because of newer rebase conflicts. ;) I have also noticed that patman is broken in u-boot-arm/master. I don't know if this has already been fixed somewhere, but it fails with an internal error while running checkpatch, as if an incompatible API change had been made to checkpatch recently, and not propagated to patman. Best regards, Benoît
Hi Benoît, On Wed, 3 Apr 2013 08:30:12 +0200 (CEST), Benoît Thébaudeau <benoit.thebaudeau@advansee.com> wrote: > Hi Albert, > > Here is the v10 bundle for those who want to test: > http://dl.free.fr/vdXBGExyq Thanks, will build-test it ASAP. People with ARM (expecially tx25 and mx31pdk) and non-ARM boards please run-test it too. > The resulting HEAD is identical to yours, except for > board/freescale/mx31ads/u-boot.lds in which you had removed the following > unrelated line for 30/30: > __bss_end = .; > > Regarding this line, it is also present in a few other .lds, as well as the > following ones: > KEEP(*(.__bss_start)); > KEEP(*(__bss_end)); > > However, the end section is named .__bss_end in arch/arm/lib/bss.c, so there is > perhaps something wrong here, unless you did that on purpose because of the > __bss_end test at the end of the linker script. I had noticed that, but I let > you handle it. If something needs to be changed here, please do it after my > series if possible in order to avoid a v11 because of newer rebase conflicts. ;) Normally, defining __bss_end symbols in the ARM lds files has become unnecessary as arch/arm/lib/bss.c now defines then (and in so doing avoids generating ugly R_ARM_ABS32 relocation records) so yes, the line removal was intentional, but indeed unrelated to your series. As for the missing period in the .__bss_end input section specification, thanks for bringing this to my attention. I'll give it a look at once as this could lead to tricky bugs popping up... > I have also noticed that patman is broken in u-boot-arm/master. I don't know if > this has already been fixed somewhere, but it fails with an internal error while > running checkpatch, as if an incompatible API change had been made to checkpatch > recently, and not propagated to patman. Cc:ing Simon Glass on patman. Note: u-boot-arm/master is pretty close to u-boot/master at the moment. > Best regards, > Benoît Amicalement,
On Wed, 3 Apr 2013 10:05:57 +0200, Albert ARIBAUD <albert.u.boot@aribaud.net> wrote: > > The resulting HEAD is identical to yours, except for > > board/freescale/mx31ads/u-boot.lds in which you had removed the following > > unrelated line for 30/30: > > __bss_end = .; > > > > Regarding this line, it is also present in a few other .lds, as well as the > > following ones: > > KEEP(*(.__bss_start)); > > KEEP(*(__bss_end)); > > > > However, the end section is named .__bss_end in arch/arm/lib/bss.c, so there is > > perhaps something wrong here, unless you did that on purpose because of the > > __bss_end test at the end of the linker script. I had noticed that, but I let > > you handle it. If something needs to be changed here, please do it after my > > series if possible in order to avoid a v11 because of newer rebase conflicts. ;) > > Normally, defining __bss_end symbols in the ARM lds files has become > unnecessary as arch/arm/lib/bss.c now defines then (and in so doing > avoids generating ugly R_ARM_ABS32 relocation records) so yes, the line > removal was intentional, but indeed unrelated to your series. > > As for the missing period in the .__bss_end input section specification, > thanks for bringing this to my attention. I'll give it a look at once > as this could lead to tricky bugs popping up... Alright, now that the coffee shot has reached full effect, I think I understand what is going on and indeed that has to be fixed although it most certainly did not cause any issue. In my commit 3ebd1cbc, where the whole bss.c system was put in place, the .__bss_end__ input section specification had the leading period and was thus placed correctly, as was the compiler-generated __bss_end__ symbol from bss.c. Later, when Tom's commit 0ce033d2 manually merged Simon's work turning all __bss_end__ occurrences into __bss_end, two things happened: 1) both the bss.c file and ARM *.lds files then defined __bss_end. 2) the leading period in .__bss_end__ was lost in the conversion. This led to the compiler-generated __bss_end section being mapped away from the whole BSS area -- *before* it, actually, which would have been catastrophic... if the definition for __bss_end from the lds files had not taken precedence over that from bss.c, thus preserving the correct value and semantics for the symbol. In other words, the first issue actually countered the second one, and both stayed hidden as the code continued running as expected. But this has to be fixed, because it causes __bss_end references to generate R_ARM_ABS32 relocation records again, which must be averted (it might be a good idea to add a build-time check to avoid any new R_ARM_ABS32 from creeping up in the future). I'll send out a patch to be taken in 2013.04, in which I'll reintroduce the leading periods in .__bss_end sections, and rename the linker symbols used for overlay mapping (and make them non-exported so that the code won't mistakenly reference them). ... and indeed I won't ask for a V10 rebase for it :) -- either V10 gets in first, or if my patch gets in first, I'll handle rebasing V10 myself. Thanks Benoît for spotting this! Amicalement,
Hi Benoît, On Wed, Apr 3, 2013 at 3:30 AM, Benoît Thébaudeau <benoit.thebaudeau@advansee.com> wrote: > Here is the v10 bundle for those who want to test: > http://dl.free.fr/vdXBGExyq I would like to test it on mx31. I downloaded the mxc-nand-v10.bundle file, but I was not able to open it. Any suggestion? Regards, Fabio Estevam
Hi Fabio, On Wednesday, April 3, 2013 11:01:51 PM, Fabio Estevam wrote: > Hi Benoît, > > On Wed, Apr 3, 2013 at 3:30 AM, Benoît Thébaudeau > <benoit.thebaudeau@advansee.com> wrote: > > > Here is the v10 bundle for those who want to test: > > http://dl.free.fr/vdXBGExyq > > I would like to test it on mx31. I downloaded the mxc-nand-v10.bundle > file, but I was not able to open it. > > Any suggestion? What did you try? This is a Git bundle. You can use "git bundle verify mxc-nand-v10.bundle" to get the required reference point. Branch from u-boot-arm/master, then "git reset --hard" to this reference, then git pull from this bundle using the HEAD returned by "git bundle list-heads". Best regards, Benoît
Hi Benoît, On Wed, 3 Apr 2013 08:30:12 +0200 (CEST), Benoît Thébaudeau <benoit.thebaudeau@advansee.com> wrote: > The resulting HEAD is identical to yours, except for > board/freescale/mx31ads/u-boot.lds in which you had removed the following > unrelated line for 30/30: > __bss_end = .; > > Regarding this line, it is also present in a few other .lds, as well as the > following ones: > KEEP(*(.__bss_start)); > KEEP(*(__bss_end)); > > However, the end section is named .__bss_end in arch/arm/lib/bss.c, so there is > perhaps something wrong here, unless you did that on purpose because of the > __bss_end test at the end of the linker script. I had noticed that, but I let > you handle it. If something needs to be changed here, please do it after my > series if possible in order to avoid a v11 because of newer rebase conflicts. ;) I have a patch ready and currently undergoing build and run tests. As per http://www.denx.de/wiki/view/U-Boot/Patches#Review_Process_Git_Tags, I must ask your permission to add your 'Reported-By:' in my patch. Can I? > Best regards, > Benoît Amicalement,
Hi Albert, On Thursday, April 4, 2013 11:07:23 AM, Albert ARIBAUD wrote: > Hi Benoît, > > On Wed, 3 Apr 2013 08:30:12 +0200 (CEST), Benoît Thébaudeau > <benoit.thebaudeau@advansee.com> wrote: > > > The resulting HEAD is identical to yours, except for > > board/freescale/mx31ads/u-boot.lds in which you had removed the following > > unrelated line for 30/30: > > __bss_end = .; > > > > Regarding this line, it is also present in a few other .lds, as well as the > > following ones: > > KEEP(*(.__bss_start)); > > KEEP(*(__bss_end)); > > > > However, the end section is named .__bss_end in arch/arm/lib/bss.c, so > > there is > > perhaps something wrong here, unless you did that on purpose because of the > > __bss_end test at the end of the linker script. I had noticed that, but I > > let > > you handle it. If something needs to be changed here, please do it after my > > series if possible in order to avoid a v11 because of newer rebase > > conflicts. ;) > > I have a patch ready and currently undergoing build and run tests. As > per http://www.denx.de/wiki/view/U-Boot/Patches#Review_Process_Git_Tags, > I must ask your permission to add your 'Reported-By:' in my patch. Can I? Sure: Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Best regards, Benoît
Hi Benoît, On Thu, 4 Apr 2013 16:05:27 +0200 (CEST), Benoît Thébaudeau <benoit.thebaudeau@advansee.com> wrote: > Hi Albert, > > On Thursday, April 4, 2013 11:07:23 AM, Albert ARIBAUD wrote: > > Hi Benoît, > > > > On Wed, 3 Apr 2013 08:30:12 +0200 (CEST), Benoît Thébaudeau > > <benoit.thebaudeau@advansee.com> wrote: > > > > > The resulting HEAD is identical to yours, except for > > > board/freescale/mx31ads/u-boot.lds in which you had removed the following > > > unrelated line for 30/30: > > > __bss_end = .; > > > > > > Regarding this line, it is also present in a few other .lds, as well as the > > > following ones: > > > KEEP(*(.__bss_start)); > > > KEEP(*(__bss_end)); > > > > > > However, the end section is named .__bss_end in arch/arm/lib/bss.c, so > > > there is > > > perhaps something wrong here, unless you did that on purpose because of the > > > __bss_end test at the end of the linker script. I had noticed that, but I > > > let > > > you handle it. If something needs to be changed here, please do it after my > > > series if possible in order to avoid a v11 because of newer rebase > > > conflicts. ;) > > > > I have a patch ready and currently undergoing build and run tests. As > > per http://www.denx.de/wiki/view/U-Boot/Patches#Review_Process_Git_Tags, > > I must ask your permission to add your 'Reported-By:' in my patch. Can I? > > Sure: > Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Actually, I think you've just stated to our patchwork that your patch v9 18/30 fixes a bug reported by you... But never mind, v9 is superseded now anyway, and I'll put your Reported-By manually in my BSS fix patch. > Best regards, > Benoît Amicalement,
Hi Fabio, On Wednesday, April 3, 2013 11:42:07 PM, Benoît Thébaudeau wrote: > Hi Fabio, > > On Wednesday, April 3, 2013 11:01:51 PM, Fabio Estevam wrote: > > Hi Benoît, > > > > On Wed, Apr 3, 2013 at 3:30 AM, Benoît Thébaudeau > > <benoit.thebaudeau@advansee.com> wrote: > > > > > Here is the v10 bundle for those who want to test: > > > http://dl.free.fr/vdXBGExyq > > > > I would like to test it on mx31. I downloaded the mxc-nand-v10.bundle > > file, but I was not able to open it. > > > > Any suggestion? > > What did you try? This is a Git bundle. You can use > "git bundle verify mxc-nand-v10.bundle" to get the required reference point. > Branch from u-boot-arm/master, then "git reset --hard" to this reference, > then > git pull from this bundle using the HEAD returned by "git bundle list-heads". Did you have a chance to perform this test? Best regards, Benoît
Hi Benoît,
On Mon, Apr 8, 2013 at 3:47 PM, Benoît Thébaudeau
<benoit.thebaudeau@advansee.com> wrote:
> Did you have a chance to perform this test?
I have built v10 bundle and will have access to my mx31pdk tomorrow morning.
Will let you know the results.
Regards,
Fabio Estevam
Hi Benoît, On Mon, Apr 8, 2013 at 3:55 PM, Fabio Estevam <festevam@gmail.com> wrote: > Hi Benoît, > > On Mon, Apr 8, 2013 at 3:47 PM, Benoît Thébaudeau > <benoit.thebaudeau@advansee.com> wrote: > >> Did you have a chance to perform this test? > > I have built v10 bundle and will have access to my mx31pdk tomorrow morning. > > Will let you know the results. Just tested v10 on mx31pdk. As reported in v9 I start to get reboots and never reach the prompt. Then I disabled watchdog options in mx31pdk.h and I get the following: U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:23:01) CPU: Freescale i.MX31 rev 2.0 at 532 MHz. Reset cause: POR Board: MX31PDK DRAM: 128 MiB NAND: 256 MiB In: serial Out: serial Err: serial Net: (Board hangs here). When I tested v9 and removed watchdog support I was able to get into the U-boot prompt. Regards, Fabio Estevam
On Tue, Apr 9, 2013 at 9:30 AM, Fabio Estevam <festevam@gmail.com> wrote: > Just tested v10 on mx31pdk. > > As reported in v9 I start to get reboots and never reach the prompt. > > Then I disabled watchdog options in mx31pdk.h and I get the following: > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:23:01) > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > Reset cause: POR > Board: MX31PDK > DRAM: 128 MiB > NAND: 256 MiB > In: serial > Out: serial > Err: serial > Net: > > (Board hangs here). > > When I tested v9 and removed watchdog support I was able to get into > the U-boot prompt. I just added "#define DEBUG" in arch/arm/lib/board to start debugging this and for my surprise I can reach the prompt now: U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:35:51) U-Boot code: 87F00000 -> 87F2C34C BSS: -> 87F3137C CPU: Freescale i.MX31 rev 2.0 at 532 MHz. Reset cause: POR Board: MX31PDK monitor len: 0003137C ramsize: 08000000 TLB table from 87ff0000 to 87ff4000 Top of RAM usable for U-Boot at: 87ff0000 Reserving 196k for U-Boot at: 87fbe000 Reserving 640k for malloc() at: 87f1e000 Reserving 32 Bytes for Board Info at: 87f1dfe0 Reserving 160 Bytes for Global Data at: 87f1df40 New Stack Pointer is: 87f1df30 RAM Configuration: Bank #0: 80000000 128 MiB relocation Offset is: 000be000 monitor flash len: 000310F4 Now running in RAM - U-Boot at: 87fbe000 NAND: 256 MiB In: serial Out: serial Err: serial Net: smc911x-0 Hit any key to stop autoboot: 0 MX31PDK U-Boot > I remember to have added "#define DEBUG" in v9 as well, so looks like the behavior between v9 and v10 is consistent. Now we need to understand why the prompt is not reached without ""#define DEBUG". Regards, Fabio Estevam
Hi Fabio, On Tuesday, April 9, 2013 2:46:21 PM, Fabio Estevam wrote: > On Tue, Apr 9, 2013 at 9:30 AM, Fabio Estevam <festevam@gmail.com> wrote: > > > Just tested v10 on mx31pdk. > > > > As reported in v9 I start to get reboots and never reach the prompt. > > > > Then I disabled watchdog options in mx31pdk.h and I get the following: > > > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:23:01) > > > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > > Reset cause: POR > > Board: MX31PDK > > DRAM: 128 MiB > > NAND: 256 MiB > > In: serial > > Out: serial > > Err: serial > > Net: > > > > (Board hangs here). > > > > When I tested v9 and removed watchdog support I was able to get into > > the U-boot prompt. > > I just added "#define DEBUG" in arch/arm/lib/board to start debugging > this and for my surprise I can reach the prompt now: > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:35:51) > > U-Boot code: 87F00000 -> 87F2C34C BSS: -> 87F3137C > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > Reset cause: POR > Board: MX31PDK > monitor len: 0003137C > ramsize: 08000000 > TLB table from 87ff0000 to 87ff4000 > Top of RAM usable for U-Boot at: 87ff0000 > Reserving 196k for U-Boot at: 87fbe000 > Reserving 640k for malloc() at: 87f1e000 > Reserving 32 Bytes for Board Info at: 87f1dfe0 > Reserving 160 Bytes for Global Data at: 87f1df40 > New Stack Pointer is: 87f1df30 > RAM Configuration: > Bank #0: 80000000 128 MiB > relocation Offset is: 000be000 > monitor flash len: 000310F4 > Now running in RAM - U-Boot at: 87fbe000 > NAND: 256 MiB > In: serial > Out: serial > Err: serial > Net: smc911x-0 > Hit any key to stop autoboot: 0 > MX31PDK U-Boot > > > I remember to have added "#define DEBUG" in v9 as well, so looks like > the behavior between v9 and v10 is consistent. > > Now we need to understand why the prompt is not reached without > ""#define DEBUG". CONFIG_SYS_NAND_U_BOOT_SIZE CONFIG_ENV_OFFSET --------------------------------------------------------------------------------
On Tuesday, April 9, 2013 4:32:21 PM, Benoît Thébaudeau wrote: > Hi Fabio, > > On Tuesday, April 9, 2013 2:46:21 PM, Fabio Estevam wrote: > > On Tue, Apr 9, 2013 at 9:30 AM, Fabio Estevam <festevam@gmail.com> wrote: > > > > > Just tested v10 on mx31pdk. > > > > > > As reported in v9 I start to get reboots and never reach the prompt. > > > > > > Then I disabled watchdog options in mx31pdk.h and I get the following: > > > > > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:23:01) > > > > > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > > > Reset cause: POR > > > Board: MX31PDK > > > DRAM: 128 MiB > > > NAND: 256 MiB > > > In: serial > > > Out: serial > > > Err: serial > > > Net: > > > > > > (Board hangs here). > > > > > > When I tested v9 and removed watchdog support I was able to get into > > > the U-boot prompt. > > > > I just added "#define DEBUG" in arch/arm/lib/board to start debugging > > this and for my surprise I can reach the prompt now: > > > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:35:51) > > > > U-Boot code: 87F00000 -> 87F2C34C BSS: -> 87F3137C > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > > Reset cause: POR > > Board: MX31PDK > > monitor len: 0003137C > > ramsize: 08000000 > > TLB table from 87ff0000 to 87ff4000 > > Top of RAM usable for U-Boot at: 87ff0000 > > Reserving 196k for U-Boot at: 87fbe000 > > Reserving 640k for malloc() at: 87f1e000 > > Reserving 32 Bytes for Board Info at: 87f1dfe0 > > Reserving 160 Bytes for Global Data at: 87f1df40 > > New Stack Pointer is: 87f1df30 > > RAM Configuration: > > Bank #0: 80000000 128 MiB > > relocation Offset is: 000be000 > > monitor flash len: 000310F4 > > Now running in RAM - U-Boot at: 87fbe000 > > NAND: 256 MiB > > In: serial > > Out: serial > > Err: serial > > Net: smc911x-0 > > Hit any key to stop autoboot: 0 > > MX31PDK U-Boot > > > > > I remember to have added "#define DEBUG" in v9 as well, so looks like > > the behavior between v9 and v10 is consistent. > > > > Now we need to understand why the prompt is not reached without > > ""#define DEBUG". > > CONFIG_SYS_NAND_U_BOOT_SIZE > CONFIG_ENV_OFFSET > -------------------------------------------------------------------------------- Please discard this message. Benoît
Hi Fabio, On Tuesday, April 9, 2013 2:46:21 PM, Fabio Estevam wrote: > On Tue, Apr 9, 2013 at 9:30 AM, Fabio Estevam <festevam@gmail.com> wrote: > > > Just tested v10 on mx31pdk. > > > > As reported in v9 I start to get reboots and never reach the prompt. > > > > Then I disabled watchdog options in mx31pdk.h and I get the following: > > > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:23:01) > > > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > > Reset cause: POR > > Board: MX31PDK > > DRAM: 128 MiB > > NAND: 256 MiB > > In: serial > > Out: serial > > Err: serial > > Net: > > > > (Board hangs here). > > > > When I tested v9 and removed watchdog support I was able to get into > > the U-boot prompt. > > I just added "#define DEBUG" in arch/arm/lib/board to start debugging > this and for my surprise I can reach the prompt now: > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:35:51) > > U-Boot code: 87F00000 -> 87F2C34C BSS: -> 87F3137C > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > Reset cause: POR > Board: MX31PDK > monitor len: 0003137C > ramsize: 08000000 > TLB table from 87ff0000 to 87ff4000 > Top of RAM usable for U-Boot at: 87ff0000 > Reserving 196k for U-Boot at: 87fbe000 > Reserving 640k for malloc() at: 87f1e000 > Reserving 32 Bytes for Board Info at: 87f1dfe0 > Reserving 160 Bytes for Global Data at: 87f1df40 > New Stack Pointer is: 87f1df30 > RAM Configuration: > Bank #0: 80000000 128 MiB > relocation Offset is: 000be000 > monitor flash len: 000310F4 > Now running in RAM - U-Boot at: 87fbe000 > NAND: 256 MiB > In: serial > Out: serial > Err: serial > Net: smc911x-0 > Hit any key to stop autoboot: 0 > MX31PDK U-Boot > > > I remember to have added "#define DEBUG" in v9 as well, so looks like > the behavior between v9 and v10 is consistent. > > Now we need to understand why the prompt is not reached without > ""#define DEBUG". Can you try different values for the following configs in mx31pdk.h? - CONFIG_SYS_NAND_U_BOOT_SIZE - CONFIG_SPL_TEXT_BASE - CONFIG_SYS_TEXT_BASE - (CONFIG_ENV_OFFSET) - (CONFIG_ENV_OFFSET_REDUND) I would try: - 0x40000 for CONFIG_SYS_NAND_U_BOOT_SIZE - 0x86000000 for CONFIG_SPL_TEXT_BASE - 0x87000000 for CONFIG_SYS_TEXT_BASE Best regards, Benoît
On Tuesday, April 9, 2013 4:38:23 PM, Benoît Thébaudeau wrote: > Hi Fabio, > > On Tuesday, April 9, 2013 2:46:21 PM, Fabio Estevam wrote: > > On Tue, Apr 9, 2013 at 9:30 AM, Fabio Estevam <festevam@gmail.com> wrote: > > > > > Just tested v10 on mx31pdk. > > > > > > As reported in v9 I start to get reboots and never reach the prompt. > > > > > > Then I disabled watchdog options in mx31pdk.h and I get the following: > > > > > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:23:01) > > > > > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > > > Reset cause: POR > > > Board: MX31PDK > > > DRAM: 128 MiB > > > NAND: 256 MiB > > > In: serial > > > Out: serial > > > Err: serial > > > Net: > > > > > > (Board hangs here). > > > > > > When I tested v9 and removed watchdog support I was able to get into > > > the U-boot prompt. > > > > I just added "#define DEBUG" in arch/arm/lib/board to start debugging > > this and for my surprise I can reach the prompt now: > > > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:35:51) > > > > U-Boot code: 87F00000 -> 87F2C34C BSS: -> 87F3137C > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > > Reset cause: POR > > Board: MX31PDK > > monitor len: 0003137C > > ramsize: 08000000 > > TLB table from 87ff0000 to 87ff4000 > > Top of RAM usable for U-Boot at: 87ff0000 > > Reserving 196k for U-Boot at: 87fbe000 > > Reserving 640k for malloc() at: 87f1e000 > > Reserving 32 Bytes for Board Info at: 87f1dfe0 > > Reserving 160 Bytes for Global Data at: 87f1df40 > > New Stack Pointer is: 87f1df30 > > RAM Configuration: > > Bank #0: 80000000 128 MiB > > relocation Offset is: 000be000 > > monitor flash len: 000310F4 > > Now running in RAM - U-Boot at: 87fbe000 > > NAND: 256 MiB > > In: serial > > Out: serial > > Err: serial > > Net: smc911x-0 > > Hit any key to stop autoboot: 0 > > MX31PDK U-Boot > > > > > I remember to have added "#define DEBUG" in v9 as well, so looks like > > the behavior between v9 and v10 is consistent. > > > > Now we need to understand why the prompt is not reached without > > ""#define DEBUG". > > Can you try different values for the following configs in mx31pdk.h? > - CONFIG_SYS_NAND_U_BOOT_SIZE > - CONFIG_SPL_TEXT_BASE > - CONFIG_SYS_TEXT_BASE > - (CONFIG_ENV_OFFSET) > - (CONFIG_ENV_OFFSET_REDUND) > > I would try: > - 0x40000 for CONFIG_SYS_NAND_U_BOOT_SIZE > - 0x86000000 for CONFIG_SPL_TEXT_BASE > - 0x87000000 for CONFIG_SYS_TEXT_BASE I have retrieved your previous test trace: --- U-Boot 2013.01 (Feb 22 2013 - 16:25:48) CPU: Freescale i.MX31 rev 2.0 at 532 MHz. Reset cause: POR Board: MX31PDK DRAM: 128 MiB (hangs here). --- So it does not hang at the same step. Can you try to disable CONFIG_CMD_NET or to comment out eth_initialize() in arch/arm/lib/board.c? Do you know if something has changed in this function recently, or if there is something about it that has not yet been merged in the arm tree? Best regards, Benoît
On Tuesday, April 9, 2013 5:04:45 PM, Benoît Thébaudeau wrote: > On Tuesday, April 9, 2013 4:38:23 PM, Benoît Thébaudeau wrote: > > Hi Fabio, > > > > On Tuesday, April 9, 2013 2:46:21 PM, Fabio Estevam wrote: > > > On Tue, Apr 9, 2013 at 9:30 AM, Fabio Estevam <festevam@gmail.com> wrote: > > > > > > > Just tested v10 on mx31pdk. > > > > > > > > As reported in v9 I start to get reboots and never reach the prompt. > > > > > > > > Then I disabled watchdog options in mx31pdk.h and I get the following: > > > > > > > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:23:01) > > > > > > > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > > > > Reset cause: POR > > > > Board: MX31PDK > > > > DRAM: 128 MiB > > > > NAND: 256 MiB > > > > In: serial > > > > Out: serial > > > > Err: serial > > > > Net: > > > > > > > > (Board hangs here). > > > > > > > > When I tested v9 and removed watchdog support I was able to get into > > > > the U-boot prompt. > > > > > > I just added "#define DEBUG" in arch/arm/lib/board to start debugging > > > this and for my surprise I can reach the prompt now: > > > > > > U-Boot 2013.04-rc1-14135-gab21c72-dirty (Apr 09 2013 - 09:35:51) > > > > > > U-Boot code: 87F00000 -> 87F2C34C BSS: -> 87F3137C > > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > > > Reset cause: POR > > > Board: MX31PDK > > > monitor len: 0003137C > > > ramsize: 08000000 > > > TLB table from 87ff0000 to 87ff4000 > > > Top of RAM usable for U-Boot at: 87ff0000 > > > Reserving 196k for U-Boot at: 87fbe000 > > > Reserving 640k for malloc() at: 87f1e000 > > > Reserving 32 Bytes for Board Info at: 87f1dfe0 > > > Reserving 160 Bytes for Global Data at: 87f1df40 > > > New Stack Pointer is: 87f1df30 > > > RAM Configuration: > > > Bank #0: 80000000 128 MiB > > > relocation Offset is: 000be000 > > > monitor flash len: 000310F4 > > > Now running in RAM - U-Boot at: 87fbe000 > > > NAND: 256 MiB > > > In: serial > > > Out: serial > > > Err: serial > > > Net: smc911x-0 > > > Hit any key to stop autoboot: 0 > > > MX31PDK U-Boot > > > > > > > I remember to have added "#define DEBUG" in v9 as well, so looks like > > > the behavior between v9 and v10 is consistent. > > > > > > Now we need to understand why the prompt is not reached without > > > ""#define DEBUG". > > > > Can you try different values for the following configs in mx31pdk.h? > > - CONFIG_SYS_NAND_U_BOOT_SIZE > > - CONFIG_SPL_TEXT_BASE > > - CONFIG_SYS_TEXT_BASE > > - (CONFIG_ENV_OFFSET) > > - (CONFIG_ENV_OFFSET_REDUND) > > > > I would try: > > - 0x40000 for CONFIG_SYS_NAND_U_BOOT_SIZE > > - 0x86000000 for CONFIG_SPL_TEXT_BASE > > - 0x87000000 for CONFIG_SYS_TEXT_BASE > > I have retrieved your previous test trace: > --- > U-Boot 2013.01 (Feb 22 2013 - 16:25:48) > > CPU: Freescale i.MX31 rev 2.0 at 532 MHz. > Reset cause: POR > Board: MX31PDK > DRAM: 128 MiB > > (hangs here). > --- > > So it does not hang at the same step. > > Can you try to disable CONFIG_CMD_NET or to comment out eth_initialize() in > arch/arm/lib/board.c? Do you know if something has changed in this function > recently, or if there is something about it that has not yet been merged in > the > arm tree? gd->bd might also be broken for some reason. Can you print it with and without DEBUG, right before the call to eth_initialize()? Also, can you try to apply this patch? http://patchwork.ozlabs.org/patch/233964/ Best regards, Benoît
Hi Albert, On Wednesday, April 3, 2013 10:05:57 AM, Albert ARIBAUD wrote: > Hi Benoît, > > On Wed, 3 Apr 2013 08:30:12 +0200 (CEST), Benoît Thébaudeau > <benoit.thebaudeau@advansee.com> wrote: > > > Hi Albert, > > > > Here is the v10 bundle for those who want to test: > > http://dl.free.fr/vdXBGExyq > > Thanks, will build-test it ASAP. > > People with ARM (expecially tx25 and mx31pdk) and non-ARM boards please > run-test it too. Following Fabio's tests, I will issue a v11 today with a small change in 18/30 limited to mx31pdk.h. Do you want me to do it on top of your "[PATCH] ARM: Fix __bss_start and __bss_end in linker scripts", or not? Best regards, Benoît
diff --git a/arch/arm/cpu/arm926ejs/start.S b/arch/arm/cpu/arm926ejs/start.S index edff38a..9121af2 100644 --- a/arch/arm/cpu/arm926ejs/start.S +++ b/arch/arm/cpu/arm926ejs/start.S @@ -200,7 +200,6 @@ reset: /*------------------------------------------------------------------------------*/ -#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_NAND_SPL) /* * void relocate_code (addr_sp, gd, addr_moni) * @@ -269,6 +268,8 @@ relocate_done: bx lr +#ifndef CONFIG_SPL_BUILD + _rel_dyn_start_ofs: .word __rel_dyn_start - _start _rel_dyn_end_ofs: diff --git a/board/freescale/mx31pdk/Makefile b/board/freescale/mx31pdk/Makefile index 5b7cafd..b910722 100644 --- a/board/freescale/mx31pdk/Makefile +++ b/board/freescale/mx31pdk/Makefile @@ -27,6 +27,9 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o +ifdef CONFIG_SPL_BUILD +SOBJS := lowlevel_init.o +endif COBJS := mx31pdk.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) diff --git a/board/freescale/mx31pdk/config.mk b/board/freescale/mx31pdk/config.mk deleted file mode 100644 index de2c642..0000000 --- a/board/freescale/mx31pdk/config.mk +++ /dev/null @@ -1,5 +0,0 @@ -ifdef CONFIG_NAND_SPL -CONFIG_SYS_TEXT_BASE = 0x87ec0000 -else -CONFIG_SYS_TEXT_BASE = 0x87f00000 -endif diff --git a/board/freescale/mx31pdk/mx31pdk.c b/board/freescale/mx31pdk/mx31pdk.c index 895396c..3d0d419 100644 --- a/board/freescale/mx31pdk/mx31pdk.c +++ b/board/freescale/mx31pdk/mx31pdk.c @@ -36,6 +36,14 @@ DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_SPL_BUILD +void board_init_f(ulong bootflag) +{ + relocate_code(0, NULL, CONFIG_SPL_TEXT_BASE); + asm volatile("ldr pc, =nand_boot"); +} +#endif + int dram_init(void) { /* dram_init must store complete ramsize in gd->ram_size */ diff --git a/board/karo/tx25/Makefile b/board/karo/tx25/Makefile index 9617fa5..c26bf36 100644 --- a/board/karo/tx25/Makefile +++ b/board/karo/tx25/Makefile @@ -25,8 +25,10 @@ include $(TOPDIR)/config.mk LIB = $(obj)lib$(BOARD).o -COBJS := tx25.o +ifdef CONFIG_SPL_BUILD SOBJS := lowlevel_init.o +endif +COBJS := tx25.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) diff --git a/board/karo/tx25/config.mk b/board/karo/tx25/config.mk deleted file mode 100644 index 18b2883..0000000 --- a/board/karo/tx25/config.mk +++ /dev/null @@ -1,5 +0,0 @@ -ifdef CONFIG_NAND_SPL -CONFIG_SYS_TEXT_BASE = 0x810c0000 -else -CONFIG_SYS_TEXT_BASE = 0x81200000 -endif diff --git a/board/karo/tx25/tx25.c b/board/karo/tx25/tx25.c index 362f00a..69ee590 100644 --- a/board/karo/tx25/tx25.c +++ b/board/karo/tx25/tx25.c @@ -33,6 +33,14 @@ DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_SPL_BUILD +void board_init_f(ulong bootflag) +{ + relocate_code(0, NULL, CONFIG_SPL_TEXT_BASE); + asm volatile("ldr pc, =nand_boot"); +} +#endif + #ifdef CONFIG_FEC_MXC #define GPIO_FEC_RESET_B IMX_GPIO_NR(4, 7) #define GPIO_FEC_ENABLE_B IMX_GPIO_NR(4, 9) diff --git a/boards.cfg b/boards.cfg index 7a0b79d..8b4c6b8 100644 --- a/boards.cfg +++ b/boards.cfg @@ -45,7 +45,7 @@ imx31_phycore arm arm1136 - - imx31_phycore_eet arm arm1136 imx31_phycore - mx31 imx31_phycore:IMX31_PHYCORE_EET qong arm arm1136 - davedenx mx31 mx31ads arm arm1136 - freescale mx31 -mx31pdk arm arm1136 - freescale mx31 mx31pdk:NAND_U_BOOT +mx31pdk arm arm1136 - freescale mx31 tt01 arm arm1136 - hale mx31 imx31_litekit arm arm1136 - logicpd mx31 flea3 arm arm1136 - CarMediaLab mx35 diff --git a/doc/README.arm-relocation b/doc/README.arm-relocation index 5a9a2fb..645b374 100644 --- a/doc/README.arm-relocation +++ b/doc/README.arm-relocation @@ -40,15 +40,15 @@ Boards which are not fixed to support relocation will be REMOVED! ----------------------------------------------------------------------------- -For boards which boot from nand_spl, it is possible to save one copy +For boards which boot from spl, it is possible to save one copy if CONFIG_SYS_TEXT_BASE == relocation address! This prevents that uboot code is copied again in relocate_code(). -example for the tx25 board: +example for the tx25 board booting from NAND Flash: a) cpu starts b) it copies the first page in nand to internal ram - (nand_spl_code) + (spl code) c) end executes this code d) this initialize CPU, RAM, ... and copy itself to RAM (this bin must fit in one page, so board_init_f() @@ -79,20 +79,20 @@ TODO ----------------------------------------------------------------------------- -Relocation with NAND_SPL (example for the tx25): +Relocation with SPL (example for the tx25 booting from NAND Flash): - cpu copies the first page from NAND to 0xbb000000 (IMX_NFC_BASE) and start with code execution on this address. -- The First page contains u-boot code from u-boot:nand_spl/nand_boot_fsl_nfc.c - which inits the dram, cpu registers, reloacte itself to CONFIG_SYS_TEXT_BASE and loads +- The First page contains u-boot code from drivers/mtd/nand/mxc_nand_spl.c + which inits the dram, cpu registers, reloacte itself to CONFIG_SPL_TEXT_BASE and loads the "real" u-boot to CONFIG_SYS_NAND_U_BOOT_DST and starts execution @CONFIG_SYS_NAND_U_BOOT_START - This u-boot does no RAM init, nor CPU register setup. Just look where it has to copy and relocate itself to this address. If relocate address = CONFIG_SYS_TEXT_BASE (not the same, as the - CONFIG_SYS_TEXT_BASE from the nand_spl code), then there is no need + CONFIG_SPL_TEXT_BASE from the spl code), then there is no need to copy, just go on with bss clear and jump to board_init_r. ----------------------------------------------------------------------------- diff --git a/drivers/mtd/nand/Makefile b/drivers/mtd/nand/Makefile index c77c0c4..bcb7161 100644 --- a/drivers/mtd/nand/Makefile +++ b/drivers/mtd/nand/Makefile @@ -82,6 +82,7 @@ COBJS-$(CONFIG_NAND_PLAT) += nand_plat.o else # minimal SPL drivers COBJS-$(CONFIG_NAND_FSL_ELBC) += fsl_elbc_spl.o +COBJS-$(CONFIG_NAND_MXC) += mxc_nand_spl.o endif # drivers endif # nand diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index 29ceab3..507bbc2 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c @@ -26,7 +26,7 @@ defined(CONFIG_MX51) || defined(CONFIG_MX53) #include <asm/arch/imx-regs.h> #endif -#include <fsl_nfc.h> +#include "mxc_nand.h" #define DRIVER_NAME "mxc_nand" @@ -36,9 +36,9 @@ struct mxc_nand_host { struct mtd_info mtd; struct nand_chip *nand; - struct fsl_nfc_regs __iomem *regs; + struct mxc_nand_regs __iomem *regs; #ifdef MXC_NFC_V3_2 - struct fsl_nfc_ip_regs __iomem *ip_regs; + struct mxc_nand_ip_regs __iomem *ip_regs; #endif int spare_only; int status_request; @@ -1213,10 +1213,10 @@ int board_nand_init(struct nand_chip *this) this->read_buf = mxc_nand_read_buf; this->verify_buf = mxc_nand_verify_buf; - host->regs = (struct fsl_nfc_regs __iomem *)CONFIG_MXC_NAND_REGS_BASE; + host->regs = (struct mxc_nand_regs __iomem *)CONFIG_MXC_NAND_REGS_BASE; #ifdef MXC_NFC_V3_2 host->ip_regs = - (struct fsl_nfc_ip_regs __iomem *)CONFIG_MXC_NAND_IP_REGS_BASE; + (struct mxc_nand_ip_regs __iomem *)CONFIG_MXC_NAND_IP_REGS_BASE; #endif host->clk_act = 1; diff --git a/include/fsl_nfc.h b/drivers/mtd/nand/mxc_nand.h similarity index 98% rename from include/fsl_nfc.h rename to drivers/mtd/nand/mxc_nand.h index 48a6448..308ff8d 100644 --- a/include/fsl_nfc.h +++ b/drivers/mtd/nand/mxc_nand.h @@ -20,8 +20,8 @@ * MA 02111-1307 USA */ -#ifndef __FSL_NFC_H -#define __FSL_NFC_H +#ifndef __MXC_NAND_H +#define __MXC_NAND_H /* * Register map and bit definitions for the Freescale NAND Flash Controller @@ -73,7 +73,7 @@ #define NAND_MXC_REG_OFFSET 0x1e00 #endif -struct fsl_nfc_regs { +struct mxc_nand_regs { u8 main_area[NAND_MXC_NR_BUFS][0x200]; u8 spare_area[NAND_MXC_NR_BUFS][NAND_MXC_SPARE_BUF_SIZE]; /* @@ -131,7 +131,7 @@ struct fsl_nfc_regs { }; #ifdef MXC_NFC_V3_2 -struct fsl_nfc_ip_regs { +struct mxc_nand_ip_regs { u32 wrprot; u32 wrprot_unlock_blkaddr[8]; u32 config2; @@ -222,4 +222,4 @@ struct fsl_nfc_ip_regs { #define writenfc writel #endif -#endif /* __FSL_NFC_H */ +#endif /* __MXC_NAND_H */ diff --git a/nand_spl/nand_boot_fsl_nfc.c b/drivers/mtd/nand/mxc_nand_spl.c similarity index 92% rename from nand_spl/nand_boot_fsl_nfc.c rename to drivers/mtd/nand/mxc_nand_spl.c index 1096727..09f23c3 100644 --- a/nand_spl/nand_boot_fsl_nfc.c +++ b/drivers/mtd/nand/mxc_nand_spl.c @@ -28,13 +28,13 @@ #include <nand.h> #include <asm/arch/imx-regs.h> #include <asm/io.h> -#include <fsl_nfc.h> +#include "mxc_nand.h" #if defined(MXC_NFC_V1) || defined(MXC_NFC_V2_1) -static struct fsl_nfc_regs *const nfc = (void *)NFC_BASE_ADDR; +static struct mxc_nand_regs *const nfc = (void *)NFC_BASE_ADDR; #elif defined(MXC_NFC_V3_2) -static struct fsl_nfc_regs *const nfc = (void *)NFC_BASE_ADDR_AXI; -static struct fsl_nfc_ip_regs *const nfc_ip = (void *)NFC_BASE_ADDR; +static struct mxc_nand_regs *const nfc = (void *)NFC_BASE_ADDR_AXI; +static struct mxc_nand_ip_regs *const nfc_ip = (void *)NFC_BASE_ADDR; #endif static void nfc_wait_ready(void) @@ -68,7 +68,7 @@ static void nfc_nand_init(void) tmp = (readnfc(&nfc_ip->config2) & ~(NFC_V3_CONFIG2_SPAS_MASK | NFC_V3_CONFIG2_EDC_MASK | NFC_V3_CONFIG2_PS_MASK)) | - NFC_V3_CONFIG2_SPAS(CONFIG_SYS_NAND_SPARE_SIZE / 2) | + NFC_V3_CONFIG2_SPAS(CONFIG_SYS_NAND_OOBSIZE / 2) | NFC_V3_CONFIG2_INT_MSK | NFC_V3_CONFIG2_ECC_EN | NFC_V3_CONFIG2_ONE_CYCLE; if (CONFIG_SYS_NAND_PAGE_SIZE == 4096) @@ -81,7 +81,7 @@ static void nfc_nand_init(void) * if spare size is larger that 16 bytes per 512 byte hunk * then use 8 symbol correction instead of 4 */ - if (CONFIG_SYS_NAND_SPARE_SIZE / ecc_per_page > 16) + if (CONFIG_SYS_NAND_OOBSIZE / ecc_per_page > 16) tmp |= NFC_V3_CONFIG2_ECC_MODE_8; else tmp &= ~NFC_V3_CONFIG2_ECC_MODE_8; @@ -102,7 +102,7 @@ static void nfc_nand_init(void) int ecc_per_page = CONFIG_SYS_NAND_PAGE_SIZE / 512; int config1; - writenfc(CONFIG_SYS_NAND_SPARE_SIZE / 2, &nfc->spare_area_size); + writenfc(CONFIG_SYS_NAND_OOBSIZE / 2, &nfc->spare_area_size); /* unlocking RAM Buff */ writenfc(0x2, &nfc->config); @@ -115,7 +115,7 @@ static void nfc_nand_init(void) * if spare size is larger that 16 bytes per 512 byte hunk * then use 8 symbol correction instead of 4 */ - if (CONFIG_SYS_NAND_SPARE_SIZE / ecc_per_page > 16) + if (CONFIG_SYS_NAND_OOBSIZE / ecc_per_page > 16) config1 &= ~NFC_V2_CONFIG1_ECC_MODE_4; else config1 |= NFC_V2_CONFIG1_ECC_MODE_4; @@ -204,7 +204,7 @@ static int nfc_nand_check_ecc(void) #elif defined(MXC_NFC_V2_1) || defined(MXC_NFC_V3_2) u32 ecc_status = readl(&nfc->ecc_status_result); int ecc_per_page = CONFIG_SYS_NAND_PAGE_SIZE / 512; - int err_limit = CONFIG_SYS_NAND_SPARE_SIZE / ecc_per_page > 16 ? 8 : 4; + int err_limit = CONFIG_SYS_NAND_OOBSIZE / ecc_per_page > 16 ? 8 : 4; int subpages = CONFIG_SYS_NAND_PAGE_SIZE / 512; do { @@ -332,14 +332,6 @@ static int nand_load(unsigned int from, unsigned int size, unsigned char *buf) return 0; } -#if defined(CONFIG_ARM) -void board_init_f (ulong bootflag) -{ - relocate_code (CONFIG_SYS_TEXT_BASE - TOTAL_MALLOC_LEN, NULL, - CONFIG_SYS_TEXT_BASE); -} -#endif - /* * The main entry for NAND booting. It's necessary that SDRAM is already * configured and available since this code loads the main U-Boot image diff --git a/include/configs/mx31pdk.h b/include/configs/mx31pdk.h index 34e4295..4447c64 100644 --- a/include/configs/mx31pdk.h +++ b/include/configs/mx31pdk.h @@ -45,7 +45,16 @@ #define CONFIG_MACH_TYPE MACH_TYPE_MX31_3DS -#if defined(CONFIG_NAND_U_BOOT) && !defined(CONFIG_NAND_SPL) +#define CONFIG_SPL +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" +#define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot.lds" +#define CONFIG_SPL_MAX_SIZE 2048 +#define CONFIG_SPL_NAND_SUPPORT + +#define CONFIG_SPL_TEXT_BASE 0x87ec0000 +#define CONFIG_SYS_TEXT_BASE 0x87f00000 + +#ifndef CONFIG_SPL_BUILD #define CONFIG_SKIP_LOWLEVEL_INIT #endif @@ -163,7 +172,7 @@ #define CONFIG_SYS_GBL_DATA_OFFSET (CONFIG_SYS_INIT_RAM_SIZE - \ GENERATED_GBL_DATA_SIZE) #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \ - CONFIG_SYS_GBL_DATA_OFFSET) + CONFIG_SYS_INIT_RAM_SIZE) /*----------------------------------------------------------------------- * FLASH and environment organization @@ -189,10 +198,10 @@ /* NAND configuration for the NAND_SPL */ /* Start copying real U-boot from the second page */ -#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x800 -#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x30000 +#define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SPL_PAD_TO +#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x32000 /* Load U-Boot to this address */ -#define CONFIG_SYS_NAND_U_BOOT_DST 0x87f00000 +#define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST #define CONFIG_SYS_NAND_PAGE_SIZE 0x800 diff --git a/include/configs/tx25.h b/include/configs/tx25.h index 80194d8..bdfa3e5 100644 --- a/include/configs/tx25.h +++ b/include/configs/tx25.h @@ -21,6 +21,7 @@ #ifndef __CONFIG_H #define __CONFIG_H +#include <asm/arch/imx-regs.h> /* * KARO TX25 board - SoC Configuration @@ -31,8 +32,14 @@ #define CONFIG_SYS_MONITOR_LEN (256 << 10) /* 256 kB for U-Boot */ -/* NAND BOOT is the only boot method */ -#define CONFIG_NAND_U_BOOT +#define CONFIG_SPL +#define CONFIG_SPL_TARGET "u-boot-with-spl.bin" +#define CONFIG_SPL_LDSCRIPT "arch/$(ARCH)/cpu/u-boot.lds" +#define CONFIG_SPL_MAX_SIZE 2048 +#define CONFIG_SPL_NAND_SUPPORT + +#define CONFIG_SPL_TEXT_BASE 0x810c0000 +#define CONFIG_SYS_TEXT_BASE 0x81200000 #ifndef MACH_TYPE_TX25 #define MACH_TYPE_TX25 2177 @@ -40,16 +47,16 @@ #define CONFIG_MACH_TYPE MACH_TYPE_TX25 -#ifdef CONFIG_NAND_SPL +#ifdef CONFIG_SPL_BUILD /* Start copying real U-boot from the second page */ -#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x800 +#define CONFIG_SYS_NAND_U_BOOT_OFFS CONFIG_SPL_PAD_TO #define CONFIG_SYS_NAND_U_BOOT_SIZE 0x30000 -#define CONFIG_SYS_NAND_U_BOOT_DST (0x81200000) +#define CONFIG_SYS_NAND_U_BOOT_DST CONFIG_SYS_TEXT_BASE #define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST #define CONFIG_SYS_NAND_PAGE_SIZE 2048 -#define CONFIG_SYS_NAND_SPARE_SIZE 64 +#define CONFIG_SYS_NAND_OOBSIZE 64 #define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024) #define CONFIG_SYS_NAND_PAGE_COUNT 64 #define CONFIG_SYS_NAND_SIZE (128 * 1024 * 1024) @@ -173,7 +180,6 @@ /* additions for new relocation code, must be added to all boards */ #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \ - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_INIT_SP_ADDR (IMX_RAM_BASE + IMX_RAM_SIZE) #endif /* __CONFIG_H */ diff --git a/nand_spl/board/freescale/mx31pdk/Makefile b/nand_spl/board/freescale/mx31pdk/Makefile deleted file mode 100644 index fd0dfc1..0000000 --- a/nand_spl/board/freescale/mx31pdk/Makefile +++ /dev/null @@ -1,68 +0,0 @@ -CONFIG_NAND_SPL = y -PAD_TO := 2048 - -include $(TOPDIR)/config.mk - -nandobj := $(OBJTREE)/nand_spl/ - -LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst -LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ - $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL - -SOBJS = start.o crt0.o lowlevel_init.o -COBJS = nand_boot_fsl_nfc.o - -SRCS := $(SRCTREE)/nand_spl/nand_boot_fsl_nfc.c -SRCS += $(SRCTREE)/arch/arm/cpu/arm1136/start.S -SRCS += $(SRCTREE)/arch/arm/lib/crt0.S -SRCS += $(SRCTREE)/board/freescale/mx31pdk/lowlevel_init.S -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -__OBJS := $(SOBJS) $(COBJS) -LNDIR := $(nandobj)board/$(BOARDDIR) - -ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin - -all: $(obj).depend $(ALL) - -$(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl - $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ - -$(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl - $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ - -$(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds - cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \ - -Map $(nandobj)u-boot-spl.map \ - -o $@ - -# The following line expands into whole rule which generates $(LSTSCRIPT), -# the file containing u-boots LG-array linker section. This is included into -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) -$(nandobj)u-boot.lds: $(LDSCRIPT) $(LSTSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ - -ansi -D__ASSEMBLY__ -P - <$< >$@ - -######################################################################### - -$(obj)%.o: $(SRCTREE)/arch/arm/cpu/arm1136/%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(SRCTREE)/arch/arm/lib/%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(SRCTREE)/board/freescale/mx31pdk/%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(SRCTREE)/nand_spl/%.c - $(CC) $(CFLAGS) -c -o $@ $< - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### diff --git a/nand_spl/board/freescale/mx31pdk/u-boot.lds b/nand_spl/board/freescale/mx31pdk/u-boot.lds deleted file mode 100644 index a26110f..0000000 --- a/nand_spl/board/freescale/mx31pdk/u-boot.lds +++ /dev/null @@ -1,87 +0,0 @@ -/* - * (C) Copyright 2009 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -SECTIONS -{ - . = 0x00000000; - - . = ALIGN(4); - .text : - { - start.o (.text) - lowlevel_init.o (.text) - nand_boot_fsl_nfc.o (.text) - *(.text) - . = 2K; - } - - . = ALIGN(4); - .rodata : { *(.rodata) } - - . = ALIGN(4); - .data : { - *(.data) - } - - . = ALIGN(4); - - . = ALIGN(4); - .u_boot_list : { - #include <u-boot.lst> - } - - . = ALIGN(4); - - __image_copy_end = .; - - .rel.dyn : { - __rel_dyn_start = .; - *(.rel*) - __rel_dyn_end = .; - } - - .dynsym : { - __dynsym_start = .; - *(.dynsym) - } - - _end = .; - - .bss __rel_dyn_start (OVERLAY) : { - __bss_start = .; - *(.bss) - . = ALIGN(4); - __bss_end__ = .; - } - - /DISCARD/ : { *(.bss*) } - /DISCARD/ : { *(.dynstr*) } - /DISCARD/ : { *(.dynsym*) } - /DISCARD/ : { *(.dynamic*) } - /DISCARD/ : { *(.hash*) } - /DISCARD/ : { *(.plt*) } - /DISCARD/ : { *(.interp*) } - /DISCARD/ : { *(.gnu*) } -} diff --git a/nand_spl/board/karo/tx25/Makefile b/nand_spl/board/karo/tx25/Makefile deleted file mode 100644 index 82489d2..0000000 --- a/nand_spl/board/karo/tx25/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# -# (C) Copyright 2009 DENX Software Engineering -# -# See file CREDITS for list of people who contributed to this -# project. -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundatio; either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, -# MA 02111-1307 USA -# -CONFIG_NAND_SPL = y - -include $(TOPDIR)/config.mk -include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk - -nandobj := $(OBJTREE)/nand_spl/ - -LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds -LSTSCRIPT= $(nandobj)/board/$(BOARDDIR)/u-boot.lst -LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ - $(LDFLAGS_FINAL) -AFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL -CFLAGS += -DCONFIG_SPL_BUILD -DCONFIG_NAND_SPL - -SOBJS = start.o crt0.o lowlevel_init.o -COBJS = nand_boot_fsl_nfc.o - -SRCS := $(SRCTREE)/nand_spl/nand_boot_fsl_nfc.c -SRCS += $(SRCTREE)/arch/arm/cpu/arm926ejs/start.S -SRCS += $(SRCTREE)/arch/arm/lib/crt0.S -SRCS += $(SRCTREE)/board/karo/tx25/lowlevel_init.S -OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS)) -__OBJS := $(SOBJS) $(COBJS) -LNDIR := $(nandobj)board/$(BOARDDIR) - -ALL = $(nandobj)u-boot-spl $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin - -all: $(obj).depend $(ALL) - -$(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl - $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ - -$(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl - $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ - -$(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds - cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) \ - -Map $(nandobj)u-boot-spl.map \ - -o $@ - -# The following line expands into whole rule which generates $(LSTSCRIPT), -# the file containing u-boots LG-array linker section. This is included into -# $(LDSCRIPT). The function make_u_boot_list is defined in helper.mk file. -$(eval $(call make_u_boot_list, $(LSTSCRIPT), $(OBJS))) -$(nandobj)u-boot.lds: $(LDSCRIPT) $(LSTSCRIPT) - $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ - -ansi -D__ASSEMBLY__ -P - <$< >$@ - -######################################################################### - -$(obj)%.o: $(SRCTREE)/arch/arm/cpu/arm926ejs/%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(SRCTREE)/arch/arm/lib/%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(SRCTREE)/board/karo/tx25/%.S - $(CC) $(AFLAGS) -c -o $@ $< - -$(obj)%.o: $(SRCTREE)/nand_spl/%.c - $(CC) $(CFLAGS) -c -o $@ $< - -# defines $(obj).depend target -include $(SRCTREE)/rules.mk - -sinclude $(obj).depend - -######################################################################### diff --git a/nand_spl/board/karo/tx25/config.mk b/nand_spl/board/karo/tx25/config.mk deleted file mode 100644 index 68afbf1..0000000 --- a/nand_spl/board/karo/tx25/config.mk +++ /dev/null @@ -1 +0,0 @@ -PAD_TO := 2048 diff --git a/nand_spl/board/karo/tx25/u-boot.lds b/nand_spl/board/karo/tx25/u-boot.lds deleted file mode 100644 index 95ea8ac..0000000 --- a/nand_spl/board/karo/tx25/u-boot.lds +++ /dev/null @@ -1,87 +0,0 @@ -/* - * (C) Copyright 2009 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * See file CREDITS for list of people who contributed to this - * project. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, - * MA 02111-1307 USA - */ -OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm") -OUTPUT_ARCH(arm) -ENTRY(_start) -SECTIONS -{ - . = 0x00000000; - - . = ALIGN(4); - .text : - { - start.o (.text) - lowlevel_init.o (.text) - nand_boot_fsl_nfc.o (.text) - *(.text) - . = 2K; - } - - . = ALIGN(4); - .rodata : { *(.rodata) } - - . = ALIGN(4); - .data : { - *(.data) - } - - . = ALIGN(4); - - . = ALIGN(4); - .u_boot_list : { - #include <u-boot.lst> - } - - . = ALIGN(4); - - __image_copy_end = .; - - .rel.dyn : { - __rel_dyn_start = .; - *(.rel*) - __rel_dyn_end = .; - } - - .dynsym : { - __dynsym_start = .; - *(.dynsym) - } - - _end = .; - - .bss __rel_dyn_start (OVERLAY) : { - __bss_start = .; - *(.bss) - . = ALIGN(4); - __bss_end__ = .; - } - - /DISCARD/ : { *(.bss*) } - /DISCARD/ : { *(.dynstr*) } - /DISCARD/ : { *(.dynsym*) } - /DISCARD/ : { *(.dynamic*) } - /DISCARD/ : { *(.hash*) } - /DISCARD/ : { *(.plt*) } - /DISCARD/ : { *(.interp*) } - /DISCARD/ : { *(.gnu*) } -}