[LEDE-DEV] [PATCH 2/6] apm821xx: Add check-size when append-kernel is used

Chris Blake chrisrblake93 at gmail.com
Sun Sep 11 21:33:02 PDT 2016


When append-kernel is used and a KERNEL_SIZE is defined, we need to make
sure that our kernel fits within it's partition size.

Signed-off-by: Chris Blake <chrisrblake93 at gmail.com>
---
 target/linux/apm821xx/image/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/apm821xx/image/Makefile b/target/linux/apm821xx/image/Makefile
index 7ab46f7..cc145e3 100644
--- a/target/linux/apm821xx/image/Makefile
+++ b/target/linux/apm821xx/image/Makefile
@@ -158,8 +158,8 @@ define Device/WNDR4700
   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/factory.img := create-uImage-dtb | append-kernel | check-size $$(KERNEL_SIZE) | pad-to 2M | \
+		       append-ubi | netgear-dni | check-size $$$$(IMAGE_SIZE)
   IMAGE/sysupgrade.tar := sysupgrade-tar
   NETGEAR_BOARD_ID := WNDR4700
   NETGEAR_HW_ID := 29763875+128+256
-- 
2.7.4




More information about the Lede-dev mailing list