Skip to contentSkip to conversation

v2013.02.0 phyCORE-OMAP4 MLO to big

DISCUSSION Jan Weitzel 4 participants 5 messages Feb 8, 2013 – Mar 7, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,
with the release v2013.02.0 the MLO gets so bit, that it eats the boot information in the SRAM.

nm --size-sort

...
00000630 D nand_flash_ids
000008c0 t mci_probe
00000c00 b gpio_desc
00001400 b files

If I remove GPIOLIB from MLO it work again. Maybe setting MAX_FILES down or find a dynamic way for the big arrays is a better solution. Any Ideas?

Jan

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#1 lore raw
Quoted 12 lines · Jan Weitzel

Hi,
with the release v2013.02.0 the MLO gets so bit, that it eats the boot information in the SRAM.

nm --size-sort

...
00000630 D nand_flash_ids
000008c0 t mci_probe
00000c00 b gpio_desc
00001400 b files

Quoted 3 lines

If I remove GPIOLIB from MLO it work again. Maybe setting MAX_FILES down or find a dynamic way for the big arrays is a better solution. Any Ideas?

Could you link the MLO to SDRAM instead?

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

Re: Antwort: Re: v2013.02.0 phyCORE-OMAP4 MLO to big

In reply to a message not in the archive
Quoted 13 lines · On 11.02.2013 Sascha Hauer wrote:
Quoted 12 lines · Jan Weitzel

Hi,
with the release v2013.02.0 the MLO gets so bit, that it eats the boot information in the SRAM.

nm --size-sort

...
00000630 D nand_flash_ids
000008c0 t mci_probe
00000c00 b gpio_desc
00001400 b files

Quoted 4 lines
Quoted 3 lines

If I remove GPIOLIB from MLO it work again. Maybe setting MAX_FILES down or find a dynamic way for the big arrays is a better solution. Any Ideas?

Could you link the MLO to SDRAM instead?

Hi Sascha, we have tried as you suggested and it doesn't work without changes...

We found two things:

1.) There is early code which is not relocatable.

We solved this by adding -fPIC to the CPPFLAGS.
But I think, this is also solved with your patch http://lists.infradead.org/pipermail/barebox/2013-March/013366.html

2.) The TEXTBASE is passed to the signGP tool, which is wrong if
TEXT_BASE is different from the executing address before relocating. In our case TEXT_BASE would be 0x86000000 but the MLO is executed

in internal SRAM at 0x40300000.

So I would suggest to create a config option like OMAP_IFT_BASE which can be passed to the signGP tool and is set to 0x40300000 per default..

What do you think?

Jürgen

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#4 lore raw

Re: Antwort: Re: v2013.02.0 phyCORE-OMAP4 MLO to big

Hi Jürgen,

Quoted 21 lines · Jürgen
Quoted 13 lines · On 11.02.2013 Sascha Hauer wrote:
Quoted 12 lines · Jan Weitzel

Hi,
with the release v2013.02.0 the MLO gets so bit, that it eats the boot information in the SRAM.

nm --size-sort

...
00000630 D nand_flash_ids
000008c0 t mci_probe
00000c00 b gpio_desc
00001400 b files

Quoted 4 lines
Quoted 3 lines

If I remove GPIOLIB from MLO it work again. Maybe setting MAX_FILES down or find a dynamic way for the big arrays is a better solution. Any Ideas?

Could you link the MLO to SDRAM instead?

Hi Sascha, we have tried as you suggested and it doesn't work without changes...

Quoted 7 lines

We found two things:

1.) There is early code which is not relocatable.

We solved this by adding -fPIC to the CPPFLAGS.
But I think, this is also solved with your patch
http://lists.infradead.org/pipermail/barebox/2013-March/013366.html

This won't help you directly. What you could do with this is:
- generate a compressed image using PBL support
- The PBL is loaded to SRAM by the ROM, relocated to the current address in SRAM
- extracts the binary to SDRAM
- continues executing in SDRAM.

Thinking about it it should work.

The other thing you could do is making the bss segment smaller.

For ARM we initialize the malloc space before the initcalls are starting which means that malloc can be used in every initcall. This in turn means that we can allocate the files array and the gpio_desc array dynamically.
You would have to move the malloc initialization from initcalls to early init for the other architectures though to make this work.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

Re: Antwort: Re: v2013.02.0 phyCORE-OMAP4 MLO to big

Quoted 32 lines · Sascha Hauer

Hi Jürgen,

Quoted 21 lines · Jürgen
Quoted 13 lines · On 11.02.2013 Sascha Hauer wrote:
Quoted 12 lines · Jan Weitzel

Hi,
with the release v2013.02.0 the MLO gets so bit, that it eats the boot information in the SRAM.

nm --size-sort

...
00000630 D nand_flash_ids
000008c0 t mci_probe
00000c00 b gpio_desc
00001400 b files

Quoted 4 lines
Quoted 3 lines

If I remove GPIOLIB from MLO it work again. Maybe setting MAX_FILES down or find a dynamic way for the big arrays is a better solution. Any Ideas?

Could you link the MLO to SDRAM instead?

Hi Sascha, we have tried as you suggested and it doesn't work without changes...

Quoted 7 lines

We found two things:

1.) There is early code which is not relocatable.

We solved this by adding -fPIC to the CPPFLAGS.
But I think, this is also solved with your patch
http://lists.infradead.org/pipermail/barebox/2013-March/013366.html

Quoted 6 lines

This won't help you directly. What you could do with this is:
- generate a compressed image using PBL support
- The PBL is loaded to SRAM by the ROM, relocated to the current address in SRAM
- extracts the binary to SDRAM
- continues executing in SDRAM.

this is what we do for the bootstrap on at91

so the pbl setup the sdram and decompress it in sdram and jump in it

also try the patch I send to switch the xloader to the generic bootstrap this decrease the size of the binary

Quoted 13 lines

Thinking about it it should work.

The other thing you could do is making the bss segment smaller.

For ARM we initialize the malloc space before the initcalls are starting which means that malloc can be used in every initcall. This in turn means that we can allocate the files array and the gpio_desc array dynamically.
You would have to move the malloc initialization from initcalls to early init for the other architectures though to make this work.

Quoted 12 lines

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox