Commit Graph

4 Commits (aae8bdbf8960cd58dc359cc5fa320c900d049f66)

Author SHA1 Message Date
Matthias Schiffer a28e46b7cc
ar71xx: lzma-loader: move padding workaround to gzip step
Some devices (TP-Link TL-WR1043ND v1) don't boot reliably when the
uncompressed loader is too small. This was workarounded in the loader by
adding 512KB of padding to the .data section of the loader binary.

This approach had two issues:

- The padding was only working when .data was non-empty (otherwise the
  section would become NOBITS, omitting it in the binary). .data was only
  empty when no CMDLINE was set, leading to further workarounds like
  fe594bf90d ("ath79: fix loader-okli, lzma-loader"), and this
  workaround was only effective because a missing "const" led to the kernel
  argv being stored in .data instead of .rodata
- The padding was not only added to the compressed .gz loader, but also
  uncompressed .bin and .elf loaders. The prevented embedding the kernel
  cmdline in the loader for non-gz loader types.

To fix both issues, move the creation of the padding from the linker script
to the gzip step.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
6 years ago
Felix Fietkau ef215468f1 ar71xx: ensure that LOADADDR is passed to lzma-loader
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48101
9 years ago
Gabor Juhos e29d6bec6f ar71xx: image: allow to use board specific code in the lzma-loader
SVN-Revision: 32945
12 years ago
Gabor Juhos d42968351f ar71xx: add lzma loader
SVN-Revision: 29443
13 years ago