[OpenWrt-Devel] [PATCH] kirkwood: image: fix unwanted 2nd inclusion of kernel

Petr Štetiar ynezz at true.cz
Wed Jun 5 06:03:04 EDT 2019


In commit d2e18dae2892 ("kirkwood: cleanup image build code") the image
build code was refactored, setting KERNEL_IN_UBI=0 which doesn't work as
the KERNEL_IN_UBI needs to be unset in order to make it working as
intended, which leads to factory images with two kernels in them:

 binwalk --keep-going openwrt-kirkwood-cisco_on100-squashfs-factory.bin
 MD5 Checksum:  c33e3d1eb0cb632bf0a4dc287592eb70
 DECIMAL   	HEX       	DESCRIPTION
 -------------------------------------------------------------------------------
 0         	0x0       	uImage header [...] "ARM OpenWrt Linux-4.14.123"
 5769216   	0x580800  	uImage header [...] "ARM OpenWrt Linux-4.14.123"

Cc: Mathias Kresin <dev at kresin.me>
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2285
Fixes: d2e18dae2892 ("kirkwood: cleanup image build code")
Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 target/linux/kirkwood/image/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 0672ba03741c..6d8062b33054 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -32,7 +32,7 @@ define Device/cisco_on100
   DEVICE_DTS := kirkwood-on100
   DEVICE_PACKAGES := kmod-i2c-mv64xxx
   KERNEL_SIZE := 5376k
-  KERNEL_IN_UBI := 0
+  KERNEL_IN_UBI :=
   UBINIZE_OPTS := -E 5
   IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
   BOARD_NAME := on100
@@ -71,8 +71,8 @@ define Device/iom_ix2_200
   SUBPAGESIZE := 256
   BLOCKSIZE := 16KiB
   KERNEL_SIZE := 3072k
-  KERNEL_IN_UBI := 0
-  UBINIZE_OPTS := -E 5  
+  KERNEL_IN_UBI :=
+  UBINIZE_OPTS := -E 5
   IMAGE_SIZE := 32505856
   IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
 endef
@@ -83,7 +83,7 @@ define Device/linksys_audi
   DEVICE_PACKAGES := kmod-mwl8k swconfig wpad-basic kmod-gpio-button-hotplug
   DEVICE_DTS := kirkwood-linksys-audi
   KERNEL_SIZE := 2624k
-  KERNEL_IN_UBI := 0
+  KERNEL_IN_UBI :=
   UBINIZE_OPTS := -E 5
   IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
   BOARD_NAME := linksys-audi
@@ -96,7 +96,7 @@ define Device/linksys_viper
   DEVICE_PACKAGES := kmod-mwl8k swconfig wpad-basic kmod-gpio-button-hotplug
   DEVICE_DTS := kirkwood-linksys-viper
   KERNEL_SIZE := 2688k
-  KERNEL_IN_UBI := 0
+  KERNEL_IN_UBI :=
   UBINIZE_OPTS := -E 5
   IMAGE/factory.bin := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi
   BOARD_NAME := linksys-viper
-- 
1.9.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list