diff options
author | Christian Lamparter <chunkeey@googlemail.com> | 2016-09-02 22:35:03 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2016-09-05 07:28:52 +0200 |
commit | 78e63ce7e3ee16a91e250f6fdbd4b5a9e90978ac (patch) | |
tree | 304749ad9a6ea430d692cea7141a78354e9cfd07 /target/linux/apm821xx | |
parent | bc36678bdb0223774cf0d088b80b2f0c1e6737db (diff) | |
download | upstream-78e63ce7e3ee16a91e250f6fdbd4b5a9e90978ac.tar.gz upstream-78e63ce7e3ee16a91e250f6fdbd4b5a9e90978ac.tar.bz2 upstream-78e63ce7e3ee16a91e250f6fdbd4b5a9e90978ac.zip |
apm821xx: add size check for initramfs kernel for the Meraki MR24
Russell Senior reported an issue with the MR24 initramfs kernels:
> ## Booting kernel from Legacy Image at 00c10000 ...
> Image Name: POWERPC LEDE Linux-4.4.19
> Created: 2016-08-31 11:57:05 UTC
> Image Type: PowerPC Linux Kernel Image (gzip compressed)
> Data Size: 2155723 Bytes = 2.1 MiB
> Load Address: 00000000
> Entry Point: 00000000
> Verifying Checksum ... OK
>Wrong Ramdisk Image Format
>Ramdisk image is corrupt or invalid
For the MR24, the kernel is uploaded to 0x10000. The ramdisk starts
at 0x200000. This leaves the kernel with just 0x1f0000 bytes = 1984kb.
This patch adds a size check so the image creation script will abort
instead of producing a unbootable initramfs image. A separate patch
"apm821xx: Fix initramfs image for the Meraki MR24" which fixed the
reported issue was submitted earlier.
Cc: Russell Senior <russell@personaltelco.net>
Cc: Chris Blake <chrisrblake93@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx')
-rw-r--r-- | target/linux/apm821xx/image/Makefile | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index 8edd5780f0..f151543b9c 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -72,10 +72,13 @@ define Device/mr24 BLOCKSIZE := 64512 IMAGES := sysupgrade.tar DTB_SIZE := 64512 - KERNEL_SIZE := 2048k + KERNEL_SIZE := 1984k IMAGE_SIZE := 8191k KERNEL := kernel-bin | lzma | uImage lzma | MerakiAdd-dtb | MerakiNAND - KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux | lzma | uImage lzma | MerakiAdd-dtb | pad-to 2047k | MerakiAdd-initramfs | MerakiNAND + KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux | lzma | uImage lzma | \ + check-size $$(KERNEL_SIZE) | \ + MerakiAdd-dtb | pad-to 2047k | MerakiAdd-initramfs | \ + MerakiNAND IMAGE/sysupgrade.tar := sysupgrade-tar endef TARGET_DEVICES += mr24 |