From 0e1d07af1df7f05f069fde2404ce35281aeb63b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0tetiar?= Date: Wed, 5 Jun 2019 11:25:44 +0200 Subject: [PATCH] kirkwood: image: fix unwanted 2nd inclusion of kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Ref: https://bugs.openwrt.org/index.php?do=details&task_id=2285 Fixes: d2e18dae2892 ("kirkwood: cleanup image build code") Signed-off-by: Petr Štetiar --- 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 0672ba0374..6d8062b330 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