MPC5200: possible to "reserve" embedded flash sectors ?
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
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 3 lines · 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").
Quoted 6 lines
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.
Quoted 1 line
Back with U-Boot 1.1.4 I used the board's local
u-boot.ldslike this :
Right. The linker script is the pace that needs to be tweaked.
Quoted 2 lines
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
Signature · 5 lines
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_
Wolfgang,
Quoted 22 lines
Dear =?ISO-8859-1?Q?Andr=E9?= Schwarz,
Quoted 3 lines · 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").
Quoted 6 lines
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.
Quoted 1 line
Back with U-Boot 1.1.4 I used the board's local
u-boot.ldslike this :
Quoted 7 lines
Right. The linker script is the pace that needs to be tweaked.
Quoted 2 lines
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 ;-)
Quoted 3 lines
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.
Quoted 5 lines
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
Dear Andr? Schwarz,
Quoted 5 lines · 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.
Quoted 6 lines
Quoted 3 lines
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>").
Quoted 3 lines
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
Signature · 5 lines
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.
Wolfgang,
Quoted 10 lines
Dear Andr? Schwarz,
Quoted 5 lines · 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.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Why are you asking? You wrote you have been doing this since 1.1.4, so where exactly is your problem?
Quoted 8 lines
Quoted 2 lines
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 ...
Quoted 6 lines
Quoted 4 lines
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
Wolfgang,
...
Quoted 5 lines
Quoted 5 lines
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 ?
Quoted 5 lines
excellent - that's what I've been looking for.
At first glance I'd expected custom linker scripts to be refused ...Quoted 1 line
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
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
Dear Andr?,
Quoted 10 lines · 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
Quoted 2 lines
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.
Quoted 1 line
What am I missing ?
The directory /home/swa/u-boot.git/board/matrix-vision/mvsmr/ ?
Best regards,
Wolfgang Denk
Signature · 4 lines
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.
Wolfgang,
Quoted 1 line
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.
Quoted 4 lines
Quoted 2 lines
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