All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Some question about uboot
@ 2009-02-24  6:49 loody
  2009-02-24  6:56 ` Aggrwal Poonam-B10812
  2009-02-24 12:41 ` Jerry Van Baren
  0 siblings, 2 replies; 5+ messages in thread
From: loody @ 2009-02-24  6:49 UTC (permalink / raw)
  To: u-boot

Dear all:
While porting uboot, I find there are too many things I don't need at
all, like net, i2c etc.
How could I remove them from my uboot binary to minimize the size of
uboot, my flash limitation is 6k?
I try to edit Makefile to remove them by marking some library setting,
but it compile error after I doing so.
Is there any easier way to meet my requirement?
Appreciate your help,
miloody

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

* [U-Boot] Some question about uboot
  2009-02-24  6:49 [U-Boot] Some question about uboot loody
@ 2009-02-24  6:56 ` Aggrwal Poonam-B10812
  2009-02-24 12:41 ` Jerry Van Baren
  1 sibling, 0 replies; 5+ messages in thread
From: Aggrwal Poonam-B10812 @ 2009-02-24  6:56 UTC (permalink / raw)
  To: u-boot

 

> -----Original Message-----
> From: u-boot-bounces at lists.denx.de 
> [mailto:u-boot-bounces at lists.denx.de] On Behalf Of loody
> Sent: Tuesday, February 24, 2009 12:19 PM
> To: u-boot at lists.denx.de
> Subject: [U-Boot] Some question about uboot
> 
> Dear all:
> While porting uboot, I find there are too many things I don't 
> need at all, like net, i2c etc.
> How could I remove them from my uboot binary to minimize the 
> size of uboot, my flash limitation is 6k?
> I try to edit Makefile to remove them by marking some library 
> setting, but it compile error after I doing so.
> Is there any easier way to meet my requirement?

Justr trim your board specific file in include/configs/ folder.
Remove the CONFIGS you  do not want.
> Appreciate your help,
> miloody
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
> 
> 

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

* [U-Boot] Some question about uboot
  2009-02-24  6:49 [U-Boot] Some question about uboot loody
  2009-02-24  6:56 ` Aggrwal Poonam-B10812
@ 2009-02-24 12:41 ` Jerry Van Baren
  2009-02-24 13:21   ` loody
  1 sibling, 1 reply; 5+ messages in thread
From: Jerry Van Baren @ 2009-02-24 12:41 UTC (permalink / raw)
  To: u-boot

loody wrote:
> Dear all:
> While porting uboot, I find there are too many things I don't need at
> all, like net, i2c etc.
> How could I remove them from my uboot binary to minimize the size of
> uboot, my flash limitation is 6k?

If 6K is truly what you have, you aren't going to get there with u-boot. 
  I don't know what the current minimum config results in (and it will 
vary depending on processor and the definition of "minimum"), but rule 
of thumb is that 128K is a fairly tight u-boot; under 128K and you will 
be cutting deeply.  It may be possible to get it under 64K with a lot of 
work, but it may be easier to start with a different code base or start 
from scratch.

Can you do a two level bootstrap where you have a 6K minimal bootstrap 
program that loads u-boot from somewhere else that has 128K-256K 
available?  Note that this is what NAND-booting systems (e.g. ARM) do - 
the NAND first stage boot fits in 4K, the rest gets copied from NAND to 
RAM and then run in RAM.

> I try to edit Makefile to remove them by marking some library setting,
> but it compile error after I doing so.

Libraries are crack cocaine to programmers.  Once you use them, it is 
really hard to give them up.  :-)

> Is there any easier way to meet my requirement?

Sorry, unless there is a really significant typo in your original email, 
u-boot has way too much functionality for your constraints.  I don't 
know what the alternatives are (there are some), but you are looking at 
a very tight boot ROM probably written mostly/entirely in assembly or 
very constrained C (no libraries, very tightly written, max optimization).

> Appreciate your help,
> miloody

Good luck,
gvb

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

* [U-Boot] Some question about uboot
  2009-02-24 12:41 ` Jerry Van Baren
@ 2009-02-24 13:21   ` loody
  2009-02-24 15:40     ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: loody @ 2009-02-24 13:21 UTC (permalink / raw)
  To: u-boot

Hi Jerry:

2009/2/24 Jerry Van Baren <gerald.vanbaren@ge.com>:
> loody wrote:
>>
>> Dear all:
>> While porting uboot, I find there are too many things I don't need at
>> all, like net, i2c etc.
>> How could I remove them from my uboot binary to minimize the size of
>> uboot, my flash limitation is 6k?
>
> If 6K is truly what you have, you aren't going to get there with u-boot. ?I
> don't know what the current minimum config results in (and it will vary
> depending on processor and the definition of "minimum"), but rule of thumb
> is that 128K is a fairly tight u-boot; under 128K and you will be cutting
> deeply. ?It may be possible to get it under 64K with a lot of work, but it
> may be easier to start with a different code base or start from scratch.
>
> Can you do a two level bootstrap where you have a 6K minimal bootstrap
> program that loads u-boot from somewhere else that has 128K-256K available?
> ?Note that this is what NAND-booting systems (e.g. ARM) do - the NAND first
> stage boot fits in 4K, the rest gets copied from NAND to RAM and then run in
> RAM.
Thanks for your kind suggestion.
If I only need uboot to do cpu basic setting with USB ehci and file
system support, does it still need 128k at least?
As you suggest, I can do the 2 levels bootstrap.
But uboot has great features support.
I am not sure it will be easier to make another wheel.

> Sorry, unless there is a really significant typo in your original email,
> u-boot has way too much functionality for your constraints. ?I don't know
> what the alternatives are (there are some), but you are looking at a very
> tight boot ROM probably written mostly/entirely in assembly or very
> constrained C (no libraries, very tightly written, max optimization).

Would you please tell me how to add a new cpu and platform in uBoot?
I know the first step I have to do is adding my cpu and platform
folder. But I have no idea how to add setting in Makefile.
why sometimes we use "@$(MKCONFIG) $(@:_config=)" ,sometimes we use
"@$(MKCONFIG) -a" and sometimes we have to " @mkdir -p $(obj)include"
before calling mkconfig?

I try to modify platform.h located at include/configs to remove
unnecessary driver.
But I have no idea which one I can remove such that the unnecessary
driver will no compile my uboot.
for example, I remove "CONFIG_DRIVER_CS8900" in smdk2410.h, and the
error message while linking is "net/libnet.a(net.o): In function
`NetSendPacket':
/media/u-boot_20090224_snapshot/net/net.c:654: undefined reference to
`eth_send'"
Appreciate your kind help,
miloody

I

I want to add my cpu and platform and find out where the bottle net is.

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

* [U-Boot] Some question about uboot
  2009-02-24 13:21   ` loody
@ 2009-02-24 15:40     ` Wolfgang Denk
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Denk @ 2009-02-24 15:40 UTC (permalink / raw)
  To: u-boot

Dear loody,

In message <3a665c760902240521y768bead8x9bebc4a30ac04f2e@mail.gmail.com> you wrote:
>
> If I only need uboot to do cpu basic setting with USB ehci and file
> system support, does it still need 128k at least?

File system support is big (which file system(s) are we talking
about?), and USB support is BIG.

You will most probably need more than 128 k.

> Would you please tell me how to add a new cpu and platform in uBoot?
> I know the first step I have to do is adding my cpu and platform
> folder. But I have no idea how to add setting in Makefile.
> why sometimes we use "@$(MKCONFIG) $(@:_config=)" ,sometimes we use
> "@$(MKCONFIG) -a" and sometimes we have to " @mkdir -p $(obj)include"
> before calling mkconfig?

Well, read the source code. It's the best documentation we have - it
is exact, and detailed.

> I try to modify platform.h located at include/configs to remove
> unnecessary driver.

This is not the way to configure U-Boot. 

> But I have no idea which one I can remove such that the unnecessary
> driver will no compile my uboot.

As a first step you need an in depth understanding of your  hardware.
This will tell you exactly which drivers are needed for the operation
of your system as you want to use it.

Note that nobody else can tell you that - we don't know your hardware,
and we don;t know your requirements.

> for example, I remove "CONFIG_DRIVER_CS8900" in smdk2410.h, and the
> error message while linking is "net/libnet.a(net.o): In function
> `NetSendPacket':
> /media/u-boot_20090224_snapshot/net/net.c:654: undefined reference to
> `eth_send'"

You are taking the wrong approach. If you rip out the network  driver
without  disabling  network  support  you  will obviously get errors.
Hoever, if you just disable network support, then the network  driver
may go out of way automagically.


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
A quarrel is quickly settled when deserted by one party; there is  no
battle unless there be two.                                  - Seneca

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

end of thread, other threads:[~2009-02-24 15:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-24  6:49 [U-Boot] Some question about uboot loody
2009-02-24  6:56 ` Aggrwal Poonam-B10812
2009-02-24 12:41 ` Jerry Van Baren
2009-02-24 13:21   ` loody
2009-02-24 15:40     ` Wolfgang Denk

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.