* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
@ 2008-05-07 11:55 Menon, Nishanth
2008-05-07 12:52 ` Wolfgang Denk
2008-05-07 13:50 ` Sascha Hauer
0 siblings, 2 replies; 12+ messages in thread
From: Menon, Nishanth @ 2008-05-07 11:55 UTC (permalink / raw)
To: u-boot
Introduce CONFIG_SKIP_RELOCATION as alternative define. This may be
desired in some conditions where U-Boot is downloaded directly into SRAM
during NAND/Peripheral download mode and is not expected to be
relocated.
This patch also organizes SKIP_LOWLEVEL_INIT and SKIP_RELOCATION in a
common arm feature dependent section.
Signed-off-by: Nishanth Menon <x0nishan@ti.com>
Index: u-boot-v2.git/arch/arm/cpu/start-arm.S
===================================================================
--- u-boot-v2.git.orig/arch/arm/cpu/start-arm.S 2008-05-05
09:35:00.000000000 -0500
+++ u-boot-v2.git/arch/arm/cpu/start-arm.S 2008-05-05
09:35:05.000000000 -0500
@@ -160,6 +160,10 @@
bl board_init_lowlevel
#endif
+ /*
+ * In some circumstances, we may choose not to relocate u-boot
+ */
+#ifndef CONFIG_SKIP_RELOCATION
relocate: /* relocate U-Boot to RAM
*/
adr r0, _start /* r0 <- current position of
code */
ldr r1, _TEXT_BASE /* test if we run from flash or
RAM */
@@ -176,6 +180,7 @@
stmia r1!, {r3-r10} /* copy to target address [r1]
*/
cmp r0, r2 /* until source end addreee [r2]
*/
ble copy_loop
+#endif
/* Set up the stack
*/
stack_setup:
Index: u-boot-v2.git/arch/arm/Kconfig
===================================================================
--- u-boot-v2.git.orig/arch/arm/Kconfig 2008-05-05 09:34:44.000000000
-0500
+++ u-boot-v2.git/arch/arm/Kconfig 2008-05-05 09:35:25.000000000
-0500
@@ -74,6 +74,7 @@
bool
select ARM926EJS
+
choice
prompt "Select your board"
@@ -140,7 +141,7 @@
The i.MX SoCs have a Pin which can output different reference
frequencies.
Say y here if you want to have the clko command which lets you
select the
frequency to output on this pin.
-
+
source arch/arm/mach-netx/Kconfig
menu "Arm specific settings "
@@ -164,6 +165,27 @@
If you want to start a 2.6 kernel and use an
initrd image say y here.
+menu "Boot Features"
+
+config SKIP_LOWLEVEL_INIT
+ bool
+ default n
+ depends on ARM
+ prompt "Skip lowlevel init"
+ help
+ This entry skips the SDRAM initialising on many ARM based
boards.
+ It enables using U-boot as a second stage bootloader.
+
+config SKIP_RELOCATION
+ bool
+ default n
+ depends on ARM
+ prompt "Skip U-Boot Relocation"
+ help
+ This entry skips the relocation logic on certain platforms
+ It enables using U-boot as a second stage bootloader.
+endmenu
+
endmenu
source common/Kconfig
Index: u-boot-v2.git/common/Kconfig
===================================================================
--- u-boot-v2.git.orig/common/Kconfig 2008-05-05 09:34:44.000000000
-0500
+++ u-boot-v2.git/common/Kconfig 2008-05-05 09:35:05.000000000
-0500
@@ -216,14 +216,6 @@
help
Enable build of u-boot with -g.
-config SKIP_LOWLEVEL_INIT
- bool
- depends on ARM
- prompt "Skip lowlevel init"
- help
- This entry skips the SDRAM initialising on many ARM based
boards.
- It enables using U-boot as a second stage bootloader.
-
config ENABLE_FLASH_NOISE
bool
prompt "verbose flash handling"
^ permalink raw reply [flat|nested] 12+ messages in thread* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-07 11:55 [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION Menon, Nishanth
@ 2008-05-07 12:52 ` Wolfgang Denk
2008-05-07 13:50 ` Sascha Hauer
1 sibling, 0 replies; 12+ messages in thread
From: Wolfgang Denk @ 2008-05-07 12:52 UTC (permalink / raw)
To: u-boot
In message <8E8BB316C604E94AA019A54D0A5A82A201A2C94B@dlee13.ent.ti.com> you wrote:
> Introduce CONFIG_SKIP_RELOCATION as alternative define. This may be
> desired in some conditions where U-Boot is downloaded directly into SRAM
> during NAND/Peripheral download mode and is not expected to be
> relocated.
>
> This patch also organizes SKIP_LOWLEVEL_INIT and SKIP_RELOCATION in a
> common arm feature dependent section.
Your patch is corrupted - your mailer line-wrapped it:
> +config SKIP_LOWLEVEL_INIT
> + bool
> + default n
> + depends on ARM
> + prompt "Skip lowlevel init"
> + help
> + This entry skips the SDRAM initialising on many ARM based
> boards.
^^^^^^^^^^^^^ here for example.
PLease fix your mailer before resending.
I strongly recommend to use git and git tools for such work.
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: wd at denx.de
"Never face facts; if you do, you'll never get up in the morning."
- Marlo Thomas
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-07 11:55 [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION Menon, Nishanth
2008-05-07 12:52 ` Wolfgang Denk
@ 2008-05-07 13:50 ` Sascha Hauer
2008-05-07 14:41 ` Menon, Nishanth
1 sibling, 1 reply; 12+ messages in thread
From: Sascha Hauer @ 2008-05-07 13:50 UTC (permalink / raw)
To: u-boot
On Wed, May 07, 2008 at 06:55:56AM -0500, Menon, Nishanth wrote:
> Introduce CONFIG_SKIP_RELOCATION as alternative define. This may be
> desired in some conditions where U-Boot is downloaded directly into SRAM
> during NAND/Peripheral download mode and is not expected to be
> relocated.
If U-Boot is not expected to be relocated, TEXT_BASE should be in SRAM
in which case the relocation loop just does nothing. So you end up in
saving 12 * 4 bytes of space. Is it really worth to introduce an #ifdef
for such a small saving?
Sascha
>
> This patch also organizes SKIP_LOWLEVEL_INIT and SKIP_RELOCATION in a
> common arm feature dependent section.
>
> Signed-off-by: Nishanth Menon <x0nishan@ti.com>
>
> Index: u-boot-v2.git/arch/arm/cpu/start-arm.S
> ===================================================================
> --- u-boot-v2.git.orig/arch/arm/cpu/start-arm.S 2008-05-05
> 09:35:00.000000000 -0500
> +++ u-boot-v2.git/arch/arm/cpu/start-arm.S 2008-05-05
> 09:35:05.000000000 -0500
> @@ -160,6 +160,10 @@
> bl board_init_lowlevel
> #endif
>
> + /*
> + * In some circumstances, we may choose not to relocate u-boot
> + */
> +#ifndef CONFIG_SKIP_RELOCATION
> relocate: /* relocate U-Boot to RAM
> */
> adr r0, _start /* r0 <- current position of
> code */
> ldr r1, _TEXT_BASE /* test if we run from flash or
> RAM */
> @@ -176,6 +180,7 @@
> stmia r1!, {r3-r10} /* copy to target address [r1]
> */
> cmp r0, r2 /* until source end addreee [r2]
> */
> ble copy_loop
> +#endif
>
> /* Set up the stack
> */
> stack_setup:
> Index: u-boot-v2.git/arch/arm/Kconfig
> ===================================================================
> --- u-boot-v2.git.orig/arch/arm/Kconfig 2008-05-05 09:34:44.000000000
> -0500
> +++ u-boot-v2.git/arch/arm/Kconfig 2008-05-05 09:35:25.000000000
> -0500
> @@ -74,6 +74,7 @@
> bool
> select ARM926EJS
>
> +
> choice
> prompt "Select your board"
>
> @@ -140,7 +141,7 @@
> The i.MX SoCs have a Pin which can output different reference
> frequencies.
> Say y here if you want to have the clko command which lets you
> select the
> frequency to output on this pin.
> -
> +
> source arch/arm/mach-netx/Kconfig
>
> menu "Arm specific settings "
> @@ -164,6 +165,27 @@
> If you want to start a 2.6 kernel and use an
> initrd image say y here.
>
> +menu "Boot Features"
> +
> +config SKIP_LOWLEVEL_INIT
> + bool
> + default n
> + depends on ARM
> + prompt "Skip lowlevel init"
> + help
> + This entry skips the SDRAM initialising on many ARM based
> boards.
> + It enables using U-boot as a second stage bootloader.
> +
> +config SKIP_RELOCATION
> + bool
> + default n
> + depends on ARM
> + prompt "Skip U-Boot Relocation"
> + help
> + This entry skips the relocation logic on certain platforms
> + It enables using U-boot as a second stage bootloader.
> +endmenu
> +
> endmenu
>
> source common/Kconfig
> Index: u-boot-v2.git/common/Kconfig
> ===================================================================
> --- u-boot-v2.git.orig/common/Kconfig 2008-05-05 09:34:44.000000000
> -0500
> +++ u-boot-v2.git/common/Kconfig 2008-05-05 09:35:05.000000000
> -0500
> @@ -216,14 +216,6 @@
> help
> Enable build of u-boot with -g.
>
> -config SKIP_LOWLEVEL_INIT
> - bool
> - depends on ARM
> - prompt "Skip lowlevel init"
> - help
> - This entry skips the SDRAM initialising on many ARM based
> boards.
> - It enables using U-boot as a second stage bootloader.
> -
> config ENABLE_FLASH_NOISE
> bool
> prompt "verbose flash handling"
>
--
Pengutronix e.K. - Linux Solutions for Science and Industry
-----------------------------------------------------------
Kontakt-Informationen finden Sie im Header dieser Mail oder
auf der Webseite -> http://www.pengutronix.de/impressum/ <-
^ permalink raw reply [flat|nested] 12+ messages in thread* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-07 13:50 ` Sascha Hauer
@ 2008-05-07 14:41 ` Menon, Nishanth
2008-05-07 15:29 ` Sascha Hauer
0 siblings, 1 reply; 12+ messages in thread
From: Menon, Nishanth @ 2008-05-07 14:41 UTC (permalink / raw)
To: u-boot
Sascha,
> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> Sent: Wednesday, May 07, 2008 8:51 AM
> To: Menon, Nishanth
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
>
> On Wed, May 07, 2008 at 06:55:56AM -0500, Menon, Nishanth wrote:
> > Introduce CONFIG_SKIP_RELOCATION as alternative define. This may be
> > desired in some conditions where U-Boot is downloaded directly into SRAM
> > during NAND/Peripheral download mode and is not expected to be
> > relocated.
>
> If U-Boot is not expected to be relocated, TEXT_BASE should be in SRAM
> in which case the relocation loop just does nothing. So you end up in
> saving 12 * 4 bytes of space. Is it really worth to introduce an #ifdef
> for such a small saving?
Probably not much of a saving, been looking at the code, and I see CONFIG_RELOCATABLE depending on ppc.
It may not be just the savings part of 48bytes. There can be additional stuff an SOC might choose to do. (ppc start.S also uses the define to save 4 instructions or so).
Cleaner approach might make sense to remove the CONFIG_RELOCATABLE dependency on ppc and make it a global configuration. Allowing any platform to choose what ever it wants to do.
I will redo the patch accordingly if you are ok with using CONFIG_RELOCATABLE (including fixing my brain dead mailer's issues hopefully :( ).
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-07 14:41 ` Menon, Nishanth
@ 2008-05-07 15:29 ` Sascha Hauer
2008-05-07 15:38 ` Menon, Nishanth
2008-05-07 17:56 ` Wolfgang Denk
0 siblings, 2 replies; 12+ messages in thread
From: Sascha Hauer @ 2008-05-07 15:29 UTC (permalink / raw)
To: u-boot
On Wed, May 07, 2008 at 09:41:21AM -0500, Menon, Nishanth wrote:
> Sascha,
> > -----Original Message-----
> > From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> > Sent: Wednesday, May 07, 2008 8:51 AM
> > To: Menon, Nishanth
> > Cc: u-boot-users at lists.sourceforge.net
> > Subject: Re: [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
> >
> > On Wed, May 07, 2008 at 06:55:56AM -0500, Menon, Nishanth wrote:
> > > Introduce CONFIG_SKIP_RELOCATION as alternative define. This may be
> > > desired in some conditions where U-Boot is downloaded directly into SRAM
> > > during NAND/Peripheral download mode and is not expected to be
> > > relocated.
> >
> > If U-Boot is not expected to be relocated, TEXT_BASE should be in SRAM
> > in which case the relocation loop just does nothing. So you end up in
> > saving 12 * 4 bytes of space. Is it really worth to introduce an #ifdef
> > for such a small saving?
> Probably not much of a saving, been looking at the code, and I see
> CONFIG_RELOCATABLE depending on ppc. It may not be just the savings
> part of 48bytes. There can be additional stuff an SOC might choose to
> do. (ppc start.S also uses the define to save 4 instructions or so).
> Cleaner approach might make sense to remove the CONFIG_RELOCATABLE
> dependency on ppc and make it a global configuration. Allowing any
> platform to choose what ever it wants to do.
CONFIG_RELOCATABLE on powerpc means something different. On arm we start
U-Boot by running it at an address != link address and _copy_ (not
relocate) ourselves to the address we are linked at. On powerpc real
relocation is done if CONFIG_RELOCATABLE is enabled.
Hence the option you wanted to add should better have the name
CONFIG_SKIP_COPY_TO_SDRAM or something like that.
Sascha
--
Pengutronix e.K. - Linux Solutions for Science and Industry
-----------------------------------------------------------
Kontakt-Informationen finden Sie im Header dieser Mail oder
auf der Webseite -> http://www.pengutronix.de/impressum/ <-
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-07 15:29 ` Sascha Hauer
@ 2008-05-07 15:38 ` Menon, Nishanth
2008-05-08 15:16 ` Sascha Hauer
2008-05-07 17:56 ` Wolfgang Denk
1 sibling, 1 reply; 12+ messages in thread
From: Menon, Nishanth @ 2008-05-07 15:38 UTC (permalink / raw)
To: u-boot
Sascha,
> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> Sent: Wednesday, May 07, 2008 10:29 AM
> To: Menon, Nishanth
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
>
> CONFIG_RELOCATABLE on powerpc means something different. On arm we start
> U-Boot by running it at an address != link address and _copy_ (not
> relocate) ourselves to the address we are linked at. On powerpc real
> relocation is done if CONFIG_RELOCATABLE is enabled.
> Hence the option you wanted to add should better have the name
> CONFIG_SKIP_COPY_TO_SDRAM or something like that.
Hmm.. good point. My ignorance on ppc is kicking me ;).. I will remove the SKIP_COPY part from my patch. Couple of questions:
a) Are we ok with removing dependency of ARM from "config SKIP_LOWLEVEL_INIT" in common/Kconfig (as opposed to my patch in which I moved it to arch/arm/Kconfig)? Considering that it is used: arch/m68k/cpu/start-mcfv4e.S
b) Further am wondering if it is fine to convert ARCH_HAS_INIT_LOWLEVEL to CONFIG_ARCH_HAS_INIT_LOWLEVEL in common/Kconfig and make it arch independent?
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-07 15:38 ` Menon, Nishanth
@ 2008-05-08 15:16 ` Sascha Hauer
2008-05-08 15:22 ` Menon, Nishanth
0 siblings, 1 reply; 12+ messages in thread
From: Sascha Hauer @ 2008-05-08 15:16 UTC (permalink / raw)
To: u-boot
On Wed, May 07, 2008 at 10:38:35AM -0500, Menon, Nishanth wrote:
> Sascha,
>
> > -----Original Message-----
> > From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> > Sent: Wednesday, May 07, 2008 10:29 AM
> > To: Menon, Nishanth
> > Cc: u-boot-users at lists.sourceforge.net
> > Subject: Re: [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
> >
> > CONFIG_RELOCATABLE on powerpc means something different. On arm we start
> > U-Boot by running it at an address != link address and _copy_ (not
> > relocate) ourselves to the address we are linked at. On powerpc real
> > relocation is done if CONFIG_RELOCATABLE is enabled.
> > Hence the option you wanted to add should better have the name
> > CONFIG_SKIP_COPY_TO_SDRAM or something like that.
> Hmm.. good point. My ignorance on ppc is kicking me ;).. I will remove the SKIP_COPY part from my patch. Couple of questions:
> a) Are we ok with removing dependency of ARM from "config SKIP_LOWLEVEL_INIT" in common/Kconfig (as opposed to my patch in which I moved it to arch/arm/Kconfig)? Considering that it is used: arch/m68k/cpu/start-mcfv4e.S
so SKIP_LOWLEVEL_INIT would depend on CONFIG_ARCH_HAS_INIT_LOWLEVEL?
>
> b) Further am wondering if it is fine to convert ARCH_HAS_INIT_LOWLEVEL to CONFIG_ARCH_HAS_INIT_LOWLEVEL in common/Kconfig and make it arch independent?
ok
Regards
Sascha
--
Pengutronix e.K. - Linux Solutions for Science and Industry
-----------------------------------------------------------
Kontakt-Informationen finden Sie im Header dieser Mail oder
auf der Webseite -> http://www.pengutronix.de/impressum/ <-
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-08 15:16 ` Sascha Hauer
@ 2008-05-08 15:22 ` Menon, Nishanth
0 siblings, 0 replies; 12+ messages in thread
From: Menon, Nishanth @ 2008-05-08 15:22 UTC (permalink / raw)
To: u-boot
Sascha,
> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> Sent: Thursday, May 08, 2008 10:16 AM
> To: Menon, Nishanth
> Cc: u-boot-users at lists.sourceforge.net
> Subject: Re: [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
> > Hmm.. good point. My ignorance on ppc is kicking me ;).. I will remove the SKIP_COPY part from my
> patch. Couple of questions:
> > a) Are we ok with removing dependency of ARM from "config SKIP_LOWLEVEL_INIT" in common/Kconfig (as
> opposed to my patch in which I moved it to arch/arm/Kconfig)? Considering that it is used:
> arch/m68k/cpu/start-mcfv4e.S
>
> so SKIP_LOWLEVEL_INIT would depend on CONFIG_ARCH_HAS_INIT_LOWLEVEL?
No it should not. It should ideally be CONFIG_MACH_HAS_INIT_LOWLEVEL? And enabling this will call board_init_lowlevel.
Regards,
Nishanth Menon
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-07 15:29 ` Sascha Hauer
2008-05-07 15:38 ` Menon, Nishanth
@ 2008-05-07 17:56 ` Wolfgang Denk
2008-05-07 19:41 ` [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduceCONFIG_SKIP_RELOCATION Ulf Samuelsson
2008-05-08 7:26 ` [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION Sascha Hauer
1 sibling, 2 replies; 12+ messages in thread
From: Wolfgang Denk @ 2008-05-07 17:56 UTC (permalink / raw)
To: u-boot
In message <20080507152912.GJ4326@pengutronix.de> you wrote:
>
> CONFIG_RELOCATABLE on powerpc means something different. On arm we start
> U-Boot by running it at an address != link address and _copy_ (not
> relocate) ourselves to the address we are linked at. On powerpc real
> relocation is done if CONFIG_RELOCATABLE is enabled.
> Hence the option you wanted to add should better have the name
> CONFIG_SKIP_COPY_TO_SDRAM or something like that.
This is something that I always wanted to fix. The ARM implementation
is broken by design - unfortunately it has been also used for MIPS,
and other architectures. It would be much better if we had real
relocation to a (dynamically determined) address on ARM too, instead
of such a fixed mapping.
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: wd at denx.de
It's a small world, but I wouldn't want to paint it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduceCONFIG_SKIP_RELOCATION
2008-05-07 17:56 ` Wolfgang Denk
@ 2008-05-07 19:41 ` Ulf Samuelsson
2008-05-08 7:26 ` [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION Sascha Hauer
1 sibling, 0 replies; 12+ messages in thread
From: Ulf Samuelsson @ 2008-05-07 19:41 UTC (permalink / raw)
To: u-boot
>> CONFIG_RELOCATABLE on powerpc means something different. On arm we start
>> U-Boot by running it at an address != link address and _copy_ (not
>> relocate) ourselves to the address we are linked at. On powerpc real
>> relocation is done if CONFIG_RELOCATABLE is enabled.
>> Hence the option you wanted to add should better have the name
>> CONFIG_SKIP_COPY_TO_SDRAM or something like that.
>
> This is something that I always wanted to fix. The ARM implementation
> is broken by design - unfortunately it has been also used for MIPS,
> and other architectures. It would be much better if we had real
> relocation to a (dynamically determined) address on ARM too, instead
> of such a fixed mapping.
>
> Best regards,
>
> Wolfgang Denk
>
As more and more architectures support booting from just about
anything than a parallel flash, maybe it is better to have a
CONFIG_COPY_TO_SDRAM than its negative form.
Whats the big benefit of beeing able to select where U-boot runs?
I could understand if there was a need for a compile time parameter.
Best Regards
Ulf Samuelsson
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION
2008-05-07 17:56 ` Wolfgang Denk
2008-05-07 19:41 ` [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduceCONFIG_SKIP_RELOCATION Ulf Samuelsson
@ 2008-05-08 7:26 ` Sascha Hauer
1 sibling, 0 replies; 12+ messages in thread
From: Sascha Hauer @ 2008-05-08 7:26 UTC (permalink / raw)
To: u-boot
On Wed, May 07, 2008 at 07:56:25PM +0200, Wolfgang Denk wrote:
> In message <20080507152912.GJ4326@pengutronix.de> you wrote:
> >
> > CONFIG_RELOCATABLE on powerpc means something different. On arm we start
> > U-Boot by running it at an address != link address and _copy_ (not
> > relocate) ourselves to the address we are linked at. On powerpc real
> > relocation is done if CONFIG_RELOCATABLE is enabled.
> > Hence the option you wanted to add should better have the name
> > CONFIG_SKIP_COPY_TO_SDRAM or something like that.
>
> This is something that I always wanted to fix. The ARM implementation
> is broken by design - unfortunately it has been also used for MIPS,
> and other architectures. It would be much better if we had real
> relocation to a (dynamically determined) address on ARM too, instead
> of such a fixed mapping.
I wouldn't say broken. With a fixed mapping you get smaller code size
and for many cases it's just enough. So I vote for having both.
Regards
Sascha
--
Pengutronix e.K. - Linux Solutions for Science and Industry
-----------------------------------------------------------
Kontakt-Informationen finden Sie im Header dieser Mail oder
auf der Webseite -> http://www.pengutronix.de/impressum/ <-
^ permalink raw reply [flat|nested] 12+ messages in thread
[parent not found: <8E8BB316C604E94AA019A54D0A5A82A201A2C94F@dlee13.ent.ti.com>]
* [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduceCONFIG_SKIP_RELOCATION
[not found] <8E8BB316C604E94AA019A54D0A5A82A201A2C94F@dlee13.ent.ti.com>
@ 2008-05-07 13:57 ` Gopinath, Thara
0 siblings, 0 replies; 12+ messages in thread
From: Gopinath, Thara @ 2008-05-07 13:57 UTC (permalink / raw)
To: u-boot
> Introduce CONFIG_SKIP_RELOCATION as alternative define. This
> may be desired in some conditions where U-Boot is downloaded
> directly into SRAM during NAND/Peripheral download mode and
> is not expected to be relocated.
>
> This patch also organizes SKIP_LOWLEVEL_INIT and
> SKIP_RELOCATION in a common arm feature dependent section.
>
> Signed-off-by: Nishanth Menon <x0nishan@ti.com>
Acked-by: Thara Gopinath <thara@ti.com>
>
> Index: u-boot-v2.git/arch/arm/cpu/start-arm.S
> ===================================================================
> --- u-boot-v2.git.orig/arch/arm/cpu/start-arm.S 2008-05-05
> 09:35:00.000000000 -0500
> +++ u-boot-v2.git/arch/arm/cpu/start-arm.S 2008-05-05
> 09:35:05.000000000 -0500
> @@ -160,6 +160,10 @@
> bl board_init_lowlevel
> #endif
>
> + /*
> + * In some circumstances, we may choose not to relocate u-boot
> + */
> +#ifndef CONFIG_SKIP_RELOCATION
> relocate: /* relocate U-Boot to RAM
> */
> adr r0, _start /* r0 <- current position of
> code */
> ldr r1, _TEXT_BASE /* test if we run from flash or
> RAM */
> @@ -176,6 +180,7 @@
> stmia r1!, {r3-r10} /* copy to target address [r1]
> */
> cmp r0, r2 /* until source end addreee [r2]
> */
> ble copy_loop
> +#endif
>
> /* Set up the stack
> */
> stack_setup:
> Index: u-boot-v2.git/arch/arm/Kconfig
> ===================================================================
> --- u-boot-v2.git.orig/arch/arm/Kconfig 2008-05-05
> 09:34:44.000000000
> -0500
> +++ u-boot-v2.git/arch/arm/Kconfig 2008-05-05 09:35:25.000000000
> -0500
> @@ -74,6 +74,7 @@
> bool
> select ARM926EJS
>
> +
> choice
> prompt "Select your board"
>
> @@ -140,7 +141,7 @@
> The i.MX SoCs have a Pin which can output different
> reference frequencies.
> Say y here if you want to have the clko command which
> lets you select the
> frequency to output on this pin.
> -
> +
> source arch/arm/mach-netx/Kconfig
>
> menu "Arm specific settings "
> @@ -164,6 +165,27 @@
> If you want to start a 2.6 kernel and use an
> initrd image say y here.
>
> +menu "Boot Features"
> +
> +config SKIP_LOWLEVEL_INIT
> + bool
> + default n
> + depends on ARM
> + prompt "Skip lowlevel init"
> + help
> + This entry skips the SDRAM initialising on many ARM based
> boards.
> + It enables using U-boot as a second stage bootloader.
> +
> +config SKIP_RELOCATION
> + bool
> + default n
> + depends on ARM
> + prompt "Skip U-Boot Relocation"
> + help
> + This entry skips the relocation logic on certain platforms
> + It enables using U-boot as a second stage bootloader.
> +endmenu
> +
> endmenu
>
> source common/Kconfig
> Index: u-boot-v2.git/common/Kconfig
> ===================================================================
> --- u-boot-v2.git.orig/common/Kconfig 2008-05-05 09:34:44.000000000
> -0500
> +++ u-boot-v2.git/common/Kconfig 2008-05-05 09:35:05.000000000
> -0500
> @@ -216,14 +216,6 @@
> help
> Enable build of u-boot with -g.
>
> -config SKIP_LOWLEVEL_INIT
> - bool
> - depends on ARM
> - prompt "Skip lowlevel init"
> - help
> - This entry skips the SDRAM initialising on many ARM based
> boards.
> - It enables using U-boot as a second stage bootloader.
> -
> config ENABLE_FLASH_NOISE
> bool
> prompt "verbose flash handling"
>
> --------------------------------------------------------------
> -----------
> This SF.net email is sponsored by the 2008 JavaOne(SM)
> Conference Don't miss this year's exciting event. There's
> still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java
> .sun.com/javaone
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
>
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-05-08 15:22 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-07 11:55 [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION Menon, Nishanth
2008-05-07 12:52 ` Wolfgang Denk
2008-05-07 13:50 ` Sascha Hauer
2008-05-07 14:41 ` Menon, Nishanth
2008-05-07 15:29 ` Sascha Hauer
2008-05-07 15:38 ` Menon, Nishanth
2008-05-08 15:16 ` Sascha Hauer
2008-05-08 15:22 ` Menon, Nishanth
2008-05-07 17:56 ` Wolfgang Denk
2008-05-07 19:41 ` [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduceCONFIG_SKIP_RELOCATION Ulf Samuelsson
2008-05-08 7:26 ` [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduce CONFIG_SKIP_RELOCATION Sascha Hauer
[not found] <8E8BB316C604E94AA019A54D0A5A82A201A2C94F@dlee13.ent.ti.com>
2008-05-07 13:57 ` [U-Boot-Users] [Patch 2/4] U-Boot-V2: ARM: introduceCONFIG_SKIP_RELOCATION Gopinath, Thara
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox