Saving u-boot-v1 space

for folks playing with u-boot :):
fyi -> by adding the following into board/omap3/beagle/config.mk -> i
could see U-boot.bin size reduce from 161300 bytes to 156264 bytes size.
PLATFORM_CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS +=-static --gc-sections

These essentially get the code to garbage collect unused functions.. not
tested resultant image though.. u-boot.lds might need a bit tweaking..
Regards,
Nishanth Menon

Have you tested now? It doesn't seem like enough % savings to be
worth much effort.

I'd rather spend some effort to get signGP to add configuration
headers for the LPDDR DRAM.

for folks playing with u-boot :):
fyi -> by adding the following into board/omap3/beagle/config.mk -> i
could see U-boot.bin size reduce from 161300 bytes to 156264 bytes size.
PLATFORM_CPPFLAGS += -fdata-sections -ffunction-sections
LDFLAGS +=-static --gc-sections

These essentially get the code to garbage collect unused functions.. not
tested resultant image though.. u-boot.lds might need a bit tweaking..

Have you tested now? It doesn't seem like enough % savings to be
worth much effort.

I have done this for U-boot-v2, not tested for u-boot v1 though.. was
planning to try this out..

I'd rather spend some effort to get signGP to add configuration
headers for the LPDDR DRAM.

yes, CH would be a great addition -> this will throw out dependency on
x-loader for nand. But we wont escape this for mmc boot due to 128K
max for MLO file.

Regards,
Nishanth Menon

Can you tell me which compiler/linker you are using and where you are pulling the uboot V2 source from? I attempted to do this in my system (using the current OE arm-angstrom-linux-gnueabi stuff), and I get an error about "gc-sections requires either an entry or an undefined symbol". This seems to have to do with the ld "-r" switch causing a partial link. I'm guessing your setup is different and is not doing a partial link at that point.

         Brett

Brett Kuehner said the following on 01/28/2009 08:32 PM:

Can you tell me which compiler/linker you are using and where you are
pulling the uboot V2 source from? I attempted to do this in my system
(using the current OE arm-angstrom-linux-gnueabi stuff), and I get an
error about "gc-sections requires either an entry or an undefined
symbol". This seems to have to do with the ld "-r" switch causing a
partial link. I'm guessing your setup is different and is not doing a
partial link at that point.
  

GCC: I use 2007q3-51 code sourcery gcc - not the angstrom build. you can
get it at [1].
U-boot-v2: code I pull is from [2].

Regards,
Nishanth Menon
Ref:
[1]: http://www.codesourcery.com/gnu_toolchains/arm/portal/release313
[2]: Sign in · GitLab

Nishanth Menon said the following on 01/28/2009 09:16 PM:

Brett Kuehner said the following on 01/28/2009 08:32 PM:
  

Can you tell me which compiler/linker you are using and where you are
pulling the uboot V2 source from? I attempted to do this in my system
(using the current OE arm-angstrom-linux-gnueabi stuff), and I get an
error about "gc-sections requires either an entry or an undefined
symbol". This seems to have to do with the ld "-r" switch causing a
partial link. I'm guessing your setup is different and is not doing a
partial link at that point.
  

GCC: I use 2007q3-51 code sourcery gcc - not the angstrom build. you can
get it at [1].
U-boot-v2: code I pull is from [2].

Regards,
Nishanth Menon
Ref:
[1]: http://www.codesourcery.com/gnu_toolchains/arm/portal/release313
[2]: Sign in · GitLab
  

Relevant change for u-boot-v2 for space saving was checked in [1]
Regards,
Nishanth Menon
ref:
[1]

Hi all
Pls tell me the path / location of Source tree for USB video class
drivers and relevant application if any.

With regards
Madhav

DISCLAIMER:

Hmm, clearly I don’t know how to use git properly. I attempted to do a git checkout of that revision number, but was unsuccessful:
git clone git://www.denx.de/git/u-boot-v2.git ubootV2
git checkout 22d3dc0d272c7294bfac2eb09f1b75c9622299b3
git pull then gives an error about not being on a branch. And various fiddling with my limited understanding of git branches got me nowhere.

So I then tried to use the “snapshot” link on the http git page from [1], and I got a tar file, but it seems to contain something radically different than the previous ubootv2 stuff I was using, since it is missing the omap configs and boards, as well as many other files being different.
I apologize for my cluelessness (I know svn quite well, but have not yet climbed the learning curve on git), would you mind giving a bit more detail about how to grab the code?

Thanks,
Brett

Brett Kuehner said the following on 01/28/2009 11:12 PM:

Hmm, clearly I don't know how to use git properly. I attempted to do a
git checkout of that revision number, but was unsuccessful:
git clone git://www.denx.de/git/u-boot-v2.git
<http://www.denx.de/git/u-boot-v2.git&gt; ubootV2
git checkout 22d3dc0d272c7294bfac2eb09f1b75c9622299b3
git pull then gives an error about not being on a branch. And various
fiddling with my limited understanding of git branches got me nowhere.

all you need to do is this:
git clone git://git.denx.de/u-boot-v2.git
ls arch/arm/configs will list the configurations -> it is very similar
to linux kernel.
Regards,
Nishanth Menon