mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] image and bss size decrease
Date: Sun, 10 Mar 2013 11:02:13 +0100	[thread overview]
Message-ID: <20130310100213.GN1906@pengutronix.de> (raw)
In-Reply-To: <E4906CA1-E082-429B-8A7D-BB21E85A65E7@jcrosoft.com>

On Sun, Mar 10, 2013 at 02:38:06AM +0800, Jean-Christophe PLAGNIOL-VILLARD wrote:
> 
> On Mar 9, 2013, at 6:53 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > This series decreases the image size and bss size a bit. First
> > we make malloc available in all initcalls by moving the malloc
> > pool initialization before start_barebox().
> > 
> > We then decrease the image size by making some statically initialized
> > structs smaller. struct command has a struct list_head member
> > which can be removed by wrapping the static struct command into
> > a dynamically initialized one which contains the list_head. Also
> > the embedded struct device_d in struct bus_type is removed in
> > favour for a dynamically allocated one.
> > 
> > Also we make the bss smaller by allocating the FILE table and
> > the gpio_desc table dynamically. The bss size is may become
> > a problem on boards which run from SRAM. Here the malloc pool
> > is in the big SDRAM area, but the bss is in SRAM, so it makes
> > sense to move the big tables from bss to SDRAM by using malloc.
> > 
> 
> How much less
> 
> IIRC I try this too but with PBL it's bigger

With PBL it's still smaller, but on a pcm038 defconfig it's only 18
bytes, so this is not really worth the effort. Decreasing the bss
size still makes sense though.

Sascha

-- 
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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-03-10 10:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-09 10:53 Sascha Hauer
2013-03-09 10:53 ` [PATCH 01/10] mips: initialize malloc pool before start_barebox() Sascha Hauer
2013-03-09 10:53 ` [PATCH 02/10] nios: " Sascha Hauer
2013-03-09 10:53 ` [PATCH 03/10] openrisc: " Sascha Hauer
2013-03-09 10:53 ` [PATCH 04/10] blackfin: " Sascha Hauer
2013-03-09 10:53 ` [PATCH 05/10] x86: " Sascha Hauer
2013-03-09 10:53 ` [PATCH 06/10] bus: Make struct device a pointer Sascha Hauer
2013-03-09 10:53 ` [PATCH 07/10] command: remove list_head from struct command Sascha Hauer
2013-03-09 10:53 ` [PATCH 08/10] command: remove statically initialized aliases Sascha Hauer
2013-03-09 10:53 ` [PATCH 09/10] fs: allocate FILE table dynamically Sascha Hauer
2013-03-09 10:53 ` [PATCH 10/10] gpio: allocate gpio_desc " Sascha Hauer
2013-03-09 18:38 ` [PATCH] image and bss size decrease Jean-Christophe PLAGNIOL-VILLARD
2013-03-10 10:02   ` Sascha Hauer [this message]
2013-03-11  9:08 ` Juergen Beisert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130310100213.GN1906@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=plagnioj@jcrosoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox