mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Compressed barebox image support
@ 2012-07-19  8:12 Sascha Hauer
  2012-07-19  8:12 ` [PATCH 1/9] lzo: Allow for static inlining Sascha Hauer
                   ` (10 more replies)
  0 siblings, 11 replies; 28+ messages in thread
From: Sascha Hauer @ 2012-07-19  8:12 UTC (permalink / raw)
  To: barebox

The following series allows to create a self extracting barebox image.
This is done by linking barebox twice, once for the actual binary, but
without lowlevel initstuff and once for the lowlevel init stuff, the
decompressor and the compressed image.

Using lzo compression the pcm038 image shrinks from 252k to 155k. The
series has been tested on the pcm038 second stage, first stage NAND and
first stage NOR and also on an i.MX53 LOCO board (also in thumb2 mode)

Using compressed images currently adds to the boot time, at least on
my slower arm9 systems. Using the MMU during decompression would help,
but this currently isn't implemented.

I think the preparation patches should be ready for merging. The last
patch in this series adding compression support I am not that confident
with. Currently I am not very happy with the Makefile changes which
somehow look like bypassing the kbuild mechanism and handcrufting
something that looks like kbuild. If someone has ideas how to improve
this, let me know. Nevertheless I would be happy about Tested-by
(and does-not-work-for) tags.

Sascha

----------------------------------------------------------------
Sascha Hauer (9):
      lzo: Allow for static inlining
      ARM lds: remove unused got
      ARM: remove board linker script option
      ARM: remove exception vectors from boards
      ARM startup: calculate offset instead of runtime address
      ARM ep93xx: Get rid of special handling in linker file
      ARM boards: Use _text rather than TEXT_BASE
      ARM: Separate assembler functions into their own section
      Add compressed image support

 Makefile                                           |   31 ++++++-
 arch/arm/Kconfig                                   |   13 +--
 arch/arm/Makefile                                  |    4 +-
 arch/arm/boards/a9m2410/a9m2410.c                  |    3 +-
 arch/arm/boards/a9m2440/a9m2440.c                  |    3 +-
 arch/arm/boards/eukrea_cpuimx25/eukrea_cpuimx25.c  |    7 +-
 arch/arm/boards/eukrea_cpuimx25/lowlevel.c         |    4 +-
 arch/arm/boards/eukrea_cpuimx27/eukrea_cpuimx27.c  |    4 +-
 arch/arm/boards/eukrea_cpuimx27/lowlevel_init.S    |   11 +--
 arch/arm/boards/eukrea_cpuimx35/flash_header.c     |    2 -
 arch/arm/boards/eukrea_cpuimx35/lowlevel.c         |    4 +-
 arch/arm/boards/freescale-mx25-3-stack/3stack.c    |    8 +-
 .../boards/freescale-mx25-3-stack/lowlevel_init.S  |   11 +--
 arch/arm/boards/freescale-mx35-3-stack/3stack.c    |    4 +-
 .../boards/freescale-mx35-3-stack/flash_header.c   |    4 +-
 .../boards/freescale-mx35-3-stack/lowlevel_init.S  |   11 +--
 arch/arm/boards/freescale-mx53-loco/flash_header.c |    2 +-
 arch/arm/boards/freescale-mx53-smd/flash_header.c  |    2 +-
 arch/arm/boards/freescale-mx6-arm2/flash_header.c  |    5 +-
 arch/arm/boards/guf-cupid/lowlevel.c               |    4 +-
 arch/arm/boards/guf-neso/lowlevel.c                |    4 +-
 arch/arm/boards/imx21ads/imx21ads.c                |    4 +-
 arch/arm/boards/imx21ads/lowlevel_init.S           |   10 +--
 arch/arm/boards/karo-tx25/board.c                  |    3 +-
 arch/arm/boards/karo-tx25/lowlevel.c               |    4 +-
 arch/arm/boards/karo-tx51/flash_header.c           |    2 +-
 arch/arm/boards/mini2440/mini2440.c                |    3 +-
 arch/arm/boards/pcm037/lowlevel_init.S             |    7 +-
 arch/arm/boards/pcm037/pcm037.c                    |    4 +-
 arch/arm/boards/pcm038/lowlevel.c                  |    4 +-
 arch/arm/boards/pcm043/lowlevel.c                  |    4 +-
 arch/arm/boards/phycard-i.MX27/lowlevel_init.S     |    8 +-
 arch/arm/boards/phycard-i.MX27/pca100.c            |    2 +-
 arch/arm/boards/tqma53/flash_header.c              |    5 +-
 arch/arm/cpu/cache-armv4.S                         |    7 +-
 arch/arm/cpu/cache-armv5.S                         |    7 +-
 arch/arm/cpu/cache-armv6.S                         |   11 ++-
 arch/arm/cpu/cache-armv7.S                         |    8 +-
 arch/arm/cpu/start.c                               |   85 +++++++++++++++++---
 arch/arm/lib/Makefile                              |    4 +-
 arch/arm/lib/ashldi3.S                             |    1 +
 arch/arm/lib/ashrdi3.S                             |    1 +
 arch/arm/lib/barebox-compressed.lds.S              |   71 ++++++++++++++++
 arch/arm/lib/barebox.lds.S                         |   11 +--
 arch/arm/lib/findbit.S                             |    9 +++
 arch/arm/lib/io-writesw-armv4.S                    |    2 +
 arch/arm/lib/lib1funcs.S                           |    7 ++
 arch/arm/lib/lshrdi3.S                             |    1 +
 arch/arm/mach-ep93xx/Makefile                      |    2 +-
 arch/arm/mach-ep93xx/header.c                      |    8 ++
 arch/arm/mach-ep93xx/include/mach/barebox.lds.h    |    9 +++
 common/Kconfig                                     |   12 +++
 include/asm-generic/barebox.lds.h                  |    3 +-
 include/asm-generic/memory_layout.h                |    2 +
 include/lzo.h                                      |    8 +-
 lib/decompress_unlzo.c                             |    9 ++-
 lib/lzo/lzo1x_decompress.c                         |    2 +-
 lib/vsprintf.c                                     |   25 +++++-
 piggy.lzo.S                                        |    6 ++
 59 files changed, 382 insertions(+), 130 deletions(-)
 create mode 100644 arch/arm/lib/barebox-compressed.lds.S
 create mode 100644 arch/arm/mach-ep93xx/header.c
 create mode 100644 arch/arm/mach-ep93xx/include/mach/barebox.lds.h
 create mode 100644 piggy.lzo.S


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

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

end of thread, other threads:[~2012-07-23 20:00 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-19  8:12 Compressed barebox image support Sascha Hauer
2012-07-19  8:12 ` [PATCH 1/9] lzo: Allow for static inlining Sascha Hauer
2012-07-19  8:12 ` [PATCH 2/9] ARM lds: remove unused got Sascha Hauer
2012-07-19  8:12 ` [PATCH 3/9] ARM: remove board linker script option Sascha Hauer
2012-07-19  8:12 ` [PATCH 4/9] ARM: remove exception vectors from boards Sascha Hauer
2012-07-19  8:12 ` [PATCH 5/9] ARM startup: calculate offset instead of runtime address Sascha Hauer
2012-07-19  8:12 ` [PATCH 6/9] ARM ep93xx: Get rid of special handling in linker file Sascha Hauer
2012-07-19  8:13 ` [PATCH 7/9] ARM boards: Use _text rather than TEXT_BASE Sascha Hauer
2012-07-19  8:13 ` [PATCH 8/9] ARM: Separate assembler functions into their own section Sascha Hauer
2012-07-19 10:38   ` Marc Kleine-Budde
2012-07-19 14:04     ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-19 14:08     ` Sascha Hauer
2012-07-19 20:45       ` Sascha Hauer
2012-07-20 16:20         ` Johannes Stezenbach
2012-07-23 20:00           ` Sascha Hauer
2012-07-23 19:59   ` Sascha Hauer
2012-07-19  8:13 ` [PATCH 9/9] Add compressed image support Sascha Hauer
2012-07-19 14:10   ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-19 17:08   ` Johannes Stezenbach
2012-07-19 17:41     ` Sascha Hauer
2012-07-19 18:32       ` Johannes Stezenbach
2012-07-19 20:42         ` Sascha Hauer
2012-07-20 15:01           ` Johannes Stezenbach
2012-07-20 15:24   ` Jean-Christophe PLAGNIOL-VILLARD
2012-07-19 15:08 ` Compressed barebox " Jean-Christophe PLAGNIOL-VILLARD
2012-07-19 16:05   ` Sascha Hauer
2012-07-19 20:11 ` Robert Jarzmik
2012-07-20  7:59   ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox