[PATCH 9/9] Add compressed image support

Johannes Stezenbach js at sig21.net
Thu Jul 19 13:08:45 EDT 2012


Hi,

On Thu, Jul 19, 2012 at 10:13:02AM +0200, Sascha Hauer wrote:
> --- a/Makefile
> +++ b/Makefile
...
> +ifdef CONFIG_IMAGE_COMPRESSION_LZO
> +barebox: piggy.lzo.o
> +	@echo "  LD     " $@
> +	$(Q)$(LD) $(LDFLAGS) $(LDFLAGS_barebox) -o $@ \
> +		-T $(barebox-compressed-lds) $(barebox-compressed) \
> +		--start-group $(barebox-common) piggy.lzo.o --end-group
> +else

Where is barebox-compressed set?

I tried it and it fails to link:

  LD      arch/arm/lib/built-in.o
  LD      barebox-uncompressed
  SYSMAP  System.map
  OBJCOPY barebox-uncompressed.bin
  LZO     barebox-uncompressed.bin.lzo
  CC      piggy.lzo.o
  LD      barebox
common/built-in.o: In function `start_barebox':
.../barebox/common/startup.c:154: undefined reference to `__barebox_initcalls_start'
.../barebox/common/startup.c:154: undefined reference to `__barebox_initcalls_end'

$ make V=1
...
  LD      barebox
arm-linux-ld -EL  -Map barebox.map -static --gc-sections -o barebox \
                -T arch/arm/lib/barebox-compressed.lds  \
                --start-group  common/built-in.o  drivers/built-in.o  commands/built-in.o  lib/built-in.o  crypto/built-in.o  net/built-in.o  fs/built-in.o  arch/arm/boards/foo/built-in.o  arch/arm/mach-foo/built-in.o  arch/arm/lib/built-in.o  arch/arm/cpu/built-in.o piggy.lzo.o --end-group


It shouldn't link all the -built-in.o into the uncompressor, should it?
Or is it supposed to work via --gc-sections trick?


Thanks,
Johannes



More information about the barebox mailing list