aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/apm821xx/image/Makefile
diff options
context:
space:
mode:
authorChristian Lamparter <chunkeey@googlemail.com>2016-11-23 17:17:05 +0100
committerFelix Fietkau <nbd@nbd.name>2016-11-24 12:53:18 +0100
commit49856a4bb5818146d9cf951cb65a0903d3b38fd4 (patch)
tree6737653befe7c4c0509f2c4e3411f174eb4c7f8f /target/linux/apm821xx/image/Makefile
parent468735c3a2f75f4ae6592608c789d8753f418a84 (diff)
downloadupstream-49856a4bb5818146d9cf951cb65a0903d3b38fd4.tar.gz
upstream-49856a4bb5818146d9cf951cb65a0903d3b38fd4.tar.bz2
upstream-49856a4bb5818146d9cf951cb65a0903d3b38fd4.zip
apm821xx: make it possible to update the dtb partition on the WNDR4700
Currently, the device-tree partition is marked as read-only. Hence, userspace tools like mtd can't write into the partition. This however will be necessary in case the DTB needs to be updated. This patch also adds the kernel.dtb image, so the compiled DTB is exported as a file and available in the binary directory along the firmware images. Note: the u-boot does expects the dtb to be a uimage. To update the dtb manually: 1. copy the generated dtb to the router. 2. mtd erase /dev/mtd2 3. mtd write wndr4700.dtb /dev/mtd2 Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'target/linux/apm821xx/image/Makefile')
-rw-r--r--target/linux/apm821xx/image/Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile
index 48eef643e1..0ee9cdcd17 100644
--- a/target/linux/apm821xx/image/Makefile
+++ b/target/linux/apm821xx/image/Makefile
@@ -22,6 +22,10 @@ define Build/dtb
$(call Image/BuildDTB,../dts/$(DEVICE_DTS).dts,$@.dtb,,--space $(DTB_SIZE))
endef
+define Build/export-dtb
+ cp $(IMAGE_KERNEL).dtb $@
+endef
+
ifeq ($(SUBTARGET),nand)
define Image/cpiogz
@@ -186,13 +190,14 @@ define Device/WNDR4700
BLOCKSIZE := 128k
DTB_SIZE := 131008
IMAGE_SIZE := 24960k
- IMAGES := factory.img sysupgrade.tar
+ IMAGES := factory.img sysupgrade.tar kernel.dtb
KERNEL_SIZE := 1920k
KERNEL := dtb | kernel-bin | lzma | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | append-fakerootfs
KERNEL_INITRAMFS := kernel-bin | gzip | dtb | wndr4700-specialImage gzip
IMAGE/factory.img := create-uImage-dtb | append-kernel | pad-to 2M | append-ubi | \
netgear-dni | check-size $$$$(IMAGE_SIZE)
IMAGE/sysupgrade.tar := sysupgrade-tar
+ IMAGE/kernel.dtb := export-dtb | uImage none
NETGEAR_BOARD_ID := WNDR4700
NETGEAR_HW_ID := 29763875+128+256
UBINIZE_OPTS := -E 5
@@ -230,10 +235,6 @@ define Build/hdd-img
$(if $(CONFIG_TARGET_IMAGES_GZIP),gzip -9n -c $@ > $(BIN_DIR)/$(notdir $@).gz)
endef
-define Build/export-dtb
- cp $(IMAGE_KERNEL).dtb $@
-endef
-
define Device/MyBookLiveDefault
IMAGE_SIZE := 48m
BLOCKSIZE := 1k