diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2018-03-26 17:25:32 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2018-03-30 00:30:52 +0200 |
commit | c555b524c7e55f54aea69d11113bc36326aabafe (patch) | |
tree | ac7d1086b779c3bf3f7c0aaa323a898f80a26a0a /target/linux/apm821xx/image | |
parent | e2b35f91b38f668976cc8a8e08843cf853d9be71 (diff) | |
download | upstream-c555b524c7e55f54aea69d11113bc36326aabafe.tar.gz upstream-c555b524c7e55f54aea69d11113bc36326aabafe.tar.bz2 upstream-c555b524c7e55f54aea69d11113bc36326aabafe.zip |
apm821xx: increase WNDR4700's dtb+kernel partition to 3.5 MiB
This patch cleans and reworks the WNDR4700 dts to increase the
now combined dtb+kernel partition to 3.5 MiB. This has become
necessary due to the switch to GCC 7.3 and the ever increasing
kernel binary size.
The dtb+kernel partition was combined in order to finally
fix the problem with out-of-sync device-trees. From now
on, the kernel and device-tree will always be updated together.
Upgrade Note:
Existing installations will have to use the TFTP firmware
recovery option in order to install the update. Affected users
are advised to make a backup of their existing configuration
prior to running sysupgrade:
<https://openwrt.org/docs/guide-user/installation/generic.backup#backup_openwrt_configuration>
Due to the repartitioning of the NAND, the generated backup
should be placed on either the internal HDD, an attached
USB-Stick or on another PC (externally).
To manually trigger the firmware recovery, the reset button has
to be pressed (and hold) during boot. U-boot will enter the "Upgrade
Mode" and starts a tftpserver listening on 192.168.1.1 for a
tftp client from one of the four LAN/Ethernet ports to connect and
upload the new system: (enable tftp binary mode!).
openwrt-apm821xx-nand-netgear_wndr4700-squashfs-factory.img
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/image')
-rw-r--r-- | target/linux/apm821xx/image/Makefile | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile index 4e6b6e4995..4cfbea4cbd 100644 --- a/target/linux/apm821xx/image/Makefile +++ b/target/linux/apm821xx/image/Makefile @@ -21,6 +21,11 @@ define Build/dtb $(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb,,--space $(DTB_SIZE)) endef +define Build/prepend-dtb + cat "$@.dtb.uimage" "$@" > "$@.new" + mv "$@.new" "$@" +endef + define Build/export-dtb cp $(IMAGE_KERNEL).dtb $@ endef @@ -115,8 +120,7 @@ define Build/create-uImage-dtb -$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) \ -O linux -T kernel -C none \ -n '$(call toupper,$(LINUX_KARCH)) $(VERSION_DIST) Linux-$(LINUX_VERSION)' \ - -d $(IMAGE_KERNEL).dtb $@.new - @mv $@.new $@ + -d "$@.dtb" "$@.dtb.uimage" endef define Build/MuImage-initramfs @@ -163,11 +167,13 @@ define Device/netgear_wndr4700 DTB_SIZE := 131008 IMAGE_SIZE := 24960k IMAGES := factory.img sysupgrade.tar kernel.dtb - KERNEL_SIZE := 1920k - KERNEL := dtb | kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \ - append-uImage-fakeroot-hdr + KERNEL_SIZE := 3584k + # append a fake/empty rootfs to fool netgear's uboot + # CHECK_DNI_FIRMWARE_ROOTFS_INTEGRITY in do_chk_dniimg() + KERNEL := kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \ + append-uImage-fakeroot-hdr | dtb | create-uImage-dtb | prepend-dtb 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 := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | \ netgear-dni | check-size $$$$(IMAGE_SIZE) IMAGE/sysupgrade.tar := sysupgrade-tar | append-metadata IMAGE/kernel.dtb := export-dtb | uImage none |