mirror of https://github.com/hak5/openwrt.git
apm821xx: switch MR24's initramfs to multi-image method
The recent change to switch to gcc 7.3 broke the image generation code, as the kernel would no longer fit into KERNEL_SIZE. This patch fixes the issue by reworking the initramfs creation and packaging, which will get rid of the KERNEL_SIZE check in the process. This new initramfs can be loaded through the MR24 U-boot in the following way: => setenv ipaddr 192.168.1.1 => setenv bootargs console=ttyS0,$baudrate => tftpboot c00000 192.168.1.2:meraki_mr24-initramfs-kernel.bin [...] Load address: 0xc00000 Loading: ################################################ [...] done Bytes transferred = 5952544 (5ad420 hex) => bootm $fileaddr \## Booting kernel from Legacy Image at 00c00000 ... ... For more information and the latest flashing guide: please visit the OpenWrt Wiki Page for the MR24: <https://openwrt.org/toh/meraki/mr24#flashing> Cc: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Christian Lamparter <chunkeey@gmail.com> Signed-off-by: Chris Blake <chrisrblake93@gmail.com>openwrt-18.06
parent
479aaf6375
commit
e2b35f91b3
|
@ -75,13 +75,9 @@ define Device/meraki_mr24
|
||||||
BLOCKSIZE := 63k
|
BLOCKSIZE := 63k
|
||||||
IMAGES := sysupgrade.tar
|
IMAGES := sysupgrade.tar
|
||||||
DTB_SIZE := 64512
|
DTB_SIZE := 64512
|
||||||
KERNEL_SIZE := 1984k
|
|
||||||
IMAGE_SIZE := 8191k
|
IMAGE_SIZE := 8191k
|
||||||
KERNEL := kernel-bin | lzma | uImage lzma | MerakiAdd-dtb | MerakiNAND
|
KERNEL := kernel-bin | lzma | uImage lzma | MerakiAdd-dtb | MerakiNAND
|
||||||
KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux | lzma | uImage lzma | \
|
KERNEL_INITRAMFS := kernel-bin | lzma | dtb | MuImage-initramfs lzma
|
||||||
check-size $$(KERNEL_SIZE) | \
|
|
||||||
MerakiAdd-dtb | pad-to 2047k | MerakiAdd-initramfs | \
|
|
||||||
MerakiNAND
|
|
||||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||||
UBINIZE_OPTS := -E 5
|
UBINIZE_OPTS := -E 5
|
||||||
SUPPORTED_DEVICES += mr24
|
SUPPORTED_DEVICES += mr24
|
||||||
|
@ -123,7 +119,7 @@ define Build/create-uImage-dtb
|
||||||
@mv $@.new $@
|
@mv $@.new $@
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Build/wndr4700-specialImage
|
define Build/MuImage-initramfs
|
||||||
rm -rf $@.fakerd $@.new
|
rm -rf $@.fakerd $@.new
|
||||||
|
|
||||||
dd if=/dev/zero of=$@.fakerd bs=32 count=1 conv=sync
|
dd if=/dev/zero of=$@.fakerd bs=32 count=1 conv=sync
|
||||||
|
@ -170,7 +166,7 @@ define Device/netgear_wndr4700
|
||||||
KERNEL_SIZE := 1920k
|
KERNEL_SIZE := 1920k
|
||||||
KERNEL := dtb | kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
|
KERNEL := dtb | kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
|
||||||
append-uImage-fakeroot-hdr
|
append-uImage-fakeroot-hdr
|
||||||
KERNEL_INITRAMFS := kernel-bin | gzip | dtb | wndr4700-specialImage gzip
|
KERNEL_INITRAMFS := kernel-bin | gzip | dtb | MuImage-initramfs gzip
|
||||||
IMAGE/factory.img := create-uImage-dtb | append-kernel | pad-to 2M | append-ubi | \
|
IMAGE/factory.img := create-uImage-dtb | append-kernel | pad-to 2M | append-ubi | \
|
||||||
netgear-dni | check-size $$$$(IMAGE_SIZE)
|
netgear-dni | check-size $$$$(IMAGE_SIZE)
|
||||||
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata
|
||||||
|
|
Loading…
Reference in New Issue