Compressed barebox image support
Sascha Hauer
s.hauer at pengutronix.de
Thu Jul 19 04:12:53 EDT 2012
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
More information about the barebox
mailing list