Browse Source

ath79: image: pad kernel for Adtran/Bluesocket devices

It has been reported that using the sysupgrade-tar image will trigger
"lzma_decode failed error". The RedBoot bootloader always loads data
from flash till block size boundary, so if there's no padding it'll also
load the beginning of rootfs, and it seems that lzma_decoder can't handle
that garbage data. Previously the script creating combined-image
silently padded the kernel and rootfs, but since sysupgrade-tar doesn't,
pad the default kernel image.

Fixes: 900330f ("ath79: image: retire combined-image for Adtran/Bluesocket
devices")
Cc: Brian Gonyer <[email protected]>
Cc: Daniel Gimpelevich <[email protected]>
Signed-off-by: Tomasz Maciej Nowak <[email protected]>
Tomasz Maciej Nowak 6 years ago
parent
commit
66b7c82bb1
1 changed files with 2 additions and 2 deletions
  1. 2 2
      target/linux/ath79/image/generic.mk

+ 2 - 2
target/linux/ath79/image/generic.mk

@@ -103,11 +103,11 @@ define Device/adtran_bsap1880
   ATH_SOC := ar7161
   ATH_SOC := ar7161
   DEVICE_VENDOR := Adtran/Bluesocket
   DEVICE_VENDOR := Adtran/Bluesocket
   DEVICE_PACKAGES += -swconfig -uboot-envtools fconfig
   DEVICE_PACKAGES += -swconfig -uboot-envtools fconfig
-  KERNEL := kernel-bin | append-dtb | lzma
+  KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE)
   KERNEL_INITRAMFS := kernel-bin | append-dtb
   KERNEL_INITRAMFS := kernel-bin | append-dtb
   IMAGE_SIZE := 11200k
   IMAGE_SIZE := 11200k
   IMAGES += kernel.bin rootfs.bin
   IMAGES += kernel.bin rootfs.bin
-  IMAGE/kernel.bin := append-kernel | pad-to $$$$(BLOCKSIZE)
+  IMAGE/kernel.bin := append-kernel
   IMAGE/rootfs.bin := append-rootfs | pad-rootfs
   IMAGE/rootfs.bin := append-rootfs | pad-rootfs
   IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
   IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | sysupgrade-tar rootfs=$$$$@ | append-metadata
 endef
 endef