All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ?
@ 2010-03-11 15:33 André Schwarz
  2010-03-11 16:15 ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: André Schwarz @ 2010-03-11 15:33 UTC (permalink / raw)
  To: u-boot

Hi,

is there any reasonable way to reserve some small flash sectors embedded
inside U-Boot for other usage ?

Example :

2 sectors @ 0-16k U-boot start including initial code @ reset vector.
1 sector @ 16k-24k e.g. environment.
2 sectors @ 24k-40k reserved (small linux mtd partitions).
? sectors @ 40k+ remaining U-Boot code.


Back with U-Boot 1.1.4 I used the board's local u-boot.lds like this :

[snip]...
.text      	 :
  {
    cpu/mpc5xxx/start.o (.text)
    lib_ppc/board.o (.text)
    lib_ppc/interrupts.o (.text)
    lib_ppc/ticks.o (.text)

    . = DEFINED(env_offset) ? env_offset : .;
    common/environment.o (.text)

    . = DEFINED(CFG_ENV_ADD_SPACE) ? (. + CFG_ENV_ADD_SPACE) : .;

    *(.text)
    *(.fixup)
[snip]...


The primary goal is to create a dedicated sector holding the auto/boot
script being available through a nested mtd partition.

Since the flash is completely used up there's no chance using sectors
outside of U-Boot.



Any hints are welcome.



Regards,
Andr?


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ?
  2010-03-11 15:33 [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ? André Schwarz
@ 2010-03-11 16:15 ` Wolfgang Denk
  2010-03-11 16:37   ` André Schwarz
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2010-03-11 16:15 UTC (permalink / raw)
  To: u-boot

Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,

In message <1268321602.4803.24.camel@swa-m460> you wrote:
> 
> is there any reasonable way to reserve some small flash sectors embedded
> inside U-Boot for other usage ?

Yes, of course there is. For example, in many board configurations we
use such small sectors for the environment (then called "embedded
environment").

> Example :
> 
> 2 sectors @ 0-16k U-boot start including initial code @ reset vector.
> 1 sector @ 16k-24k e.g. environment.
> 2 sectors @ 24k-40k reserved (small linux mtd partitions).
> ? sectors @ 40k+ remaining U-Boot code.

This can easily be done.

> Back with U-Boot 1.1.4 I used the board's local u-boot.lds like this :

Right. The linker script is the pace that needs to be tweaked.

> The primary goal is to create a dedicated sector holding the auto/boot
> script being available through a nested mtd partition.

Well, I think there might be more efficient ways to acchieve this, but
YMMV.

Why are you asking? You wrote you have been doing this since 1.1.4, so
where exactly is your problem?

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 all seemed, he thought, to be rather a lot of  trouble  to  go  to
just sharpen a razor blade.  - Terry Pratchett, _The Light Fantastic_

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ?
  2010-03-11 16:15 ` Wolfgang Denk
@ 2010-03-11 16:37   ` André Schwarz
  2010-03-11 20:52     ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: André Schwarz @ 2010-03-11 16:37 UTC (permalink / raw)
  To: u-boot

Wolfgang,

> Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
> 
> In message <1268321602.4803.24.camel@swa-m460> you wrote:
> > 
> > is there any reasonable way to reserve some small flash sectors embedded
> > inside U-Boot for other usage ?
> 
> Yes, of course there is. For example, in many board configurations we
> use such small sectors for the environment (then called "embedded
> environment").
> 
> > Example :
> > 
> > 2 sectors @ 0-16k U-boot start including initial code @ reset vector.
> > 1 sector @ 16k-24k e.g. environment.
> > 2 sectors @ 24k-40k reserved (small linux mtd partitions).
> > ? sectors @ 40k+ remaining U-Boot code.
> 
> This can easily be done.
> 
> > Back with U-Boot 1.1.4 I used the board's local u-boot.lds like this :
> 
> Right. The linker script is the pace that needs to be tweaked.
> 
> > The primary goal is to create a dedicated sector holding the auto/boot
> > script being available through a nested mtd partition.
> 
> Well, I think there might be more efficient ways to acchieve this, but
> YMMV.

hmm - I'm not *that* familiar with all that abbreviations ... have to
ask someone : http://www.abbreviations.com/YMMV

Hopefully you didn't mean the worst one ;-)

> 
> Why are you asking? You wrote you have been doing this since 1.1.4, so
> where exactly is your problem?

The linker script has moved to the CPU directory, i.e. there's no local
linker script anymore.

Since I want to submit the board files as soon as the merge window will
open I'm asking for a reasonable way to implement this in current
U-Boot.

What's your favorite way of doing this ?
I'd be happy to implement it that way.

> 
> Best regards,
> 
> Wolfgang Denk
> 

Regards,
Andr?


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ?
  2010-03-11 16:37   ` André Schwarz
@ 2010-03-11 20:52     ` Wolfgang Denk
  2010-03-12  8:32       ` André Schwarz
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2010-03-11 20:52 UTC (permalink / raw)
  To: u-boot

Dear Andr? Schwarz,

In message <1268325452.4803.34.camel@swa-m460> you wrote:
>
> hmm - I'm not *that* familiar with all that abbreviations ... have to
> ask someone : http://www.abbreviations.com/YMMV
>
> Hopefully you didn't mean the worst one ;-)

The common (and intended) interpretation is Your Mileage May Vary.
> >
> > Why are you asking? You wrote you have been doing this since 1.1.4, so
> > where exactly is your problem?
>
> The linker script has moved to the CPU directory, i.e. there's no local
> linker script anymore.

This is because all boards used the same script anyway, so there was
no use in keeping multiple copies of the same file. But please note
that nothing prevents you to use a local, customized linker script.
All you need to do is set it's name in you config.mk (add a line
"LDSCRIPT=<your name>").

> Since I want to submit the board files as soon as the merge window will
> open I'm asking for a reasonable way to implement this in current
> U-Boot.

Use a customized linker script.

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
The easiest way to figure the cost of living is to take  your  income
and add ten percent.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ?
  2010-03-11 20:52     ` Wolfgang Denk
@ 2010-03-12  8:32       ` André Schwarz
  2010-03-15  9:00         ` André Schwarz
  0 siblings, 1 reply; 8+ messages in thread
From: André Schwarz @ 2010-03-12  8:32 UTC (permalink / raw)
  To: u-boot

Wolfgang,

> Dear Andr? Schwarz,
> 
> In message <1268325452.4803.34.camel@swa-m460> you wrote:
> >
> > hmm - I'm not *that* familiar with all that abbreviations ... have to
> > ask someone : http://www.abbreviations.com/YMMV
> >
> > Hopefully you didn't mean the worst one ;-)
> 
> The common (and intended) interpretation is Your Mileage May Vary.

huh - *big* relief.

> > >
> > > Why are you asking? You wrote you have been doing this since 1.1.4, so
> > > where exactly is your problem?
> >
> > The linker script has moved to the CPU directory, i.e. there's no local
> > linker script anymore.
> 
> This is because all boards used the same script anyway, so there was
> no use in keeping multiple copies of the same file. But please note
> that nothing prevents you to use a local, customized linker script.
> All you need to do is set it's name in you config.mk (add a line
> "LDSCRIPT=<your name>").

excellent - that's what I've been looking for.
At first glance I'd expected custom linker scripts to be refused ...

> 
> > Since I want to submit the board files as soon as the merge window will
> > open I'm asking for a reasonable way to implement this in current
> > U-Boot.
> 
> Use a customized linker script.

will do - thanks for the help.


Regards,
Andr? Schwarz


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ?
  2010-03-12  8:32       ` André Schwarz
@ 2010-03-15  9:00         ` André Schwarz
  2010-03-21 18:15           ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: André Schwarz @ 2010-03-15  9:00 UTC (permalink / raw)
  To: u-boot

Wolfgang,

...
> > This is because all boards used the same script anyway, so there was
> > no use in keeping multiple copies of the same file. But please note
> > that nothing prevents you to use a local, customized linker script.
> > All you need to do is set it's name in you config.mk (add a line
> > "LDSCRIPT=<your name>").

Created the board dir and added this line to config.mk:

LDSCRIPT := $(SRCTREE)/board/matrix-vision/mvsmr/u-boot.lds

which results in failure during make :

swa at swa-m460:~/u-boot.git$ CROSS_COMPILE=ppc_6xx- ARCH=powerpc make
for dir in tools examples/standalone examples/api
cpu/mpc5xxx /home/swa/u-boot.git/board/matrix-vision/mvsmr/ ; do \
			make -C $dir _depend ; done
make[1]: Entering directory `/home/swa/u-boot.git/tools'
make[1]: Nothing to be done for `_depend'.
...
make[1]: Leaving directory `/home/swa/u-boot.git/cpu/mpc5xxx'
make: *** /home/swa/u-boot.git/board/matrix-vision/mvsmr/: No such file
or directory.  Stop.
make: *** [depend] Error 2

At first glance I thought there's a make target missing.
But looking at other boards doing the same thing showed no difference.

Using "LDSCRIPT := $(SRCTREE)/cpu/mpc5xxx/u-boot-customlayout.lds"
withing config.mk compiles cleanly and results in working U-Boot.

What am I missing ?

> 
> excellent - that's what I've been looking for.
> At first glance I'd expected custom linker scripts to be refused ...
> 
> > 
> > > Since I want to submit the board files as soon as the merge window will
> > > open I'm asking for a reasonable way to implement this in current
> > > U-Boot.
> > 
> > Use a customized linker script.
> 
> will do - thanks for the help.
> 


Regards,
Andr?


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ?
  2010-03-15  9:00         ` André Schwarz
@ 2010-03-21 18:15           ` Wolfgang Denk
  2010-03-22  9:02             ` André Schwarz
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2010-03-21 18:15 UTC (permalink / raw)
  To: u-boot

Dear Andr?,

In message <1268643615.4089.8.camel@swa-m460> you wrote:
>
> Created the board dir and added this line to config.mk:
>
> LDSCRIPT :$(SRCTREE)/board/matrix-vision/mvsmr/u-boot.lds
>
> which results in failure during make :
>
> swa at swa-m460:~/u-boot.git$ CROSS_COMPILEppc_6xx- ARCHpowerpc make
> for dir in tools examples/standalone examples/api
> cpu/mpc5xxx /home/swa/u-boot.git/board/matrix-vision/mvsmr/ ; do \
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This comes from these lines in the Makefile:

 407                 for dir in $(SUBDIRS) cpu/$(CPU) $(dir $(LDSCRIPT)) ; do \
 408                         $(MAKE) -C $$dir _depend ; done

> make: *** /home/swa/u-boot.git/board/matrix-vision/mvsmr/: No such file
> or directory.  Stop.

Well, did you check if there is eally a directory of this name in your
source tree?  There is none in mine...

Usually error messges mean what they say.

> What am I missing ?

The directory /home/swa/u-boot.git/board/matrix-vision/mvsmr/ ?

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
Hindsight is an exact science.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ?
  2010-03-21 18:15           ` Wolfgang Denk
@ 2010-03-22  9:02             ` André Schwarz
  0 siblings, 0 replies; 8+ messages in thread
From: André Schwarz @ 2010-03-22  9:02 UTC (permalink / raw)
  To: u-boot

Wolfgang,


> Usually error messges mean what they say.

yes - of course. But I still couldn't see the difference between "-" and
"_" after looking at it three times.

> 
> > What am I missing ?
> 
> The directory /home/swa/u-boot.git/board/matrix-vision/mvsmr/ ?

ok - it's "matrix_vision" ... already put my worn out brown paper bag on
again.


Thanks for pointing this out.


Regards,
Andr?


MATRIX VISION GmbH, Talstrasse 16, DE-71570 Oppenweiler
Registergericht: Amtsgericht Stuttgart, HRB 271090
Geschaeftsfuehrer: Gerhard Thullner, Werner Armingeon, Uwe Furtner, Hans-Joachim Reich

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2010-03-22  9:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11 15:33 [U-Boot] MPC5200: possible to "reserve" embedded flash sectors ? André Schwarz
2010-03-11 16:15 ` Wolfgang Denk
2010-03-11 16:37   ` André Schwarz
2010-03-11 20:52     ` Wolfgang Denk
2010-03-12  8:32       ` André Schwarz
2010-03-15  9:00         ` André Schwarz
2010-03-21 18:15           ` Wolfgang Denk
2010-03-22  9:02             ` André Schwarz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.