image: fix jffs2(_nand) image generation
authorJonas Gorski <jogo@openwrt.org>
Wed, 5 Aug 2015 13:55:52 +0000 (13:55 +0000)
committerJonas Gorski <jogo@openwrt.org>
Wed, 5 Aug 2015 13:55:52 +0000 (13:55 +0000)
Variables dependend on JFFS2_BLOCKSIZE and NANDBLOCK_SIZE are used
for template generation, so need to be present before inclusion of
image.mk in target image Makefiles.
So move all declarations to before any includes.

Fixes: r42878 ("image.mk: clean up and parallelize mkfs calls")
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 46564

target/linux/ar71xx/image/Makefile
target/linux/au1000/image/Makefile
target/linux/kirkwood/image/Makefile
target/linux/lantiq/image/Makefile
target/linux/mcs814x/image/Makefile
target/linux/mvebu/image/Makefile
target/linux/ppc44x/image/Makefile
target/linux/xburst/image/Makefile

index 78069b8d3dc659198e4eb1552eb038df2bec5428..e894d78c62cc40c0430b459c235fb4453d5714c5 100644 (file)
@@ -4,13 +4,14 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
+
+JFFS2_BLOCKSIZE = 64k 128k 256k
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 IMAGE_PROFILE:=$(if $(PROFILE),$(PROFILE),Default)
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 IMAGE_PROFILE:=$(if $(PROFILE),$(PROFILE),Default)
 
-JFFS2_BLOCKSIZE = 64k 128k 256k
-
 KERNEL_LOADADDR = 0x80060000
 
 DEVICE_VARS += NETGEAR_KERNEL_MAGIC NETGEAR_BOARD NETGEAR_ID CMDLINE CONSOLE IMAGE_SIZE BOARDNAME LOADER_FLASH_OFFS
 KERNEL_LOADADDR = 0x80060000
 
 DEVICE_VARS += NETGEAR_KERNEL_MAGIC NETGEAR_BOARD NETGEAR_ID CMDLINE CONSOLE IMAGE_SIZE BOARDNAME LOADER_FLASH_OFFS
index 3d5752930fb60f024c0739e9d575fc402dd0f07c..744e5c64e9d61a97c6b831b895ef483a1fd1e66e 100644 (file)
@@ -4,6 +4,9 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
+
+JFFS2_BLOCKSIZE = 128k
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
@@ -11,8 +14,6 @@ LOADADDR = 0x81000000         # RAM start + 16M
 KERNEL_ENTRY = 0x80100000
 RAMSIZE = 0x00100000           # 1MB
 
 KERNEL_ENTRY = 0x80100000
 RAMSIZE = 0x00100000           # 1MB
 
-JFFS2_BLOCKSIZE = 128k
-
 FLASH_KERNEL := 0xBFD00000
 FLASH_FS     := 0xBE000000
 
 FLASH_KERNEL := 0xBFD00000
 FLASH_FS     := 0xBE000000
 
index 8413a41ba39234e2f6cb7e8d10df75d5aabb4252..019806c985f712f1cbc0dee02d2c9d5da1292626 100644 (file)
@@ -4,11 +4,12 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/image.mk
 
 NAND_BLOCKSIZE := 2048-128k
 
 
 NAND_BLOCKSIZE := 2048-128k
 
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
 define sanitize_profile_name
 $(shell echo $(PROFILE) | tr '[:upper:]' '[:lower:]')
 endef
 define sanitize_profile_name
 $(shell echo $(PROFILE) | tr '[:upper:]' '[:lower:]')
 endef
index f89df52102ee0bb4ab656817ede453ecd9391152..cbe334cb9cf38e4367f581b1821fb8c800ddf0ae 100644 (file)
@@ -8,10 +8,11 @@
 # boards missing since devicetree update
 #EASY50712 ARV3527P
 
 # boards missing since devicetree update
 #EASY50712 ARV3527P
 
+JFFS2_BLOCKSIZE = 64k 128k 256k
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-JFFS2_BLOCKSIZE = 64k 128k 256k
 KDIR_TMP:=$(KDIR)/tmp
 
 LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
 KDIR_TMP:=$(KDIR)/tmp
 
 LOADER_MAKE := $(NO_TRACE_MAKE) -C lzma-loader KDIR=$(KDIR)
index 4c8af97d223ee700a73d9eb3bbc8c96b3de40a42..017a564f099c45e8916ec5ceaec217ef02fa4dee 100644 (file)
@@ -4,6 +4,9 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
+
+JFFS2_BLOCKSIZE = 128k
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
@@ -13,8 +16,6 @@ DTBS_DIR:=dts/
 
 LOADADDR:=0x00008000
 
 
 LOADADDR:=0x00008000
 
-JFFS2_BLOCKSIZE = 128k
-
 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
 
 define Image/Build/MkuImage
 UIMAGE:=$(BIN_DIR)/$(IMG_PREFIX)-uImage
 
 define Image/Build/MkuImage
index 461e3471a912ced41b574a7588d8b73e97462ee6..df75836412f41f0fe1c161c565ec482812c54dd1 100644 (file)
@@ -4,12 +4,14 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
+
+JFFS2_BLOCKSIZE = 128k
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 LOADADDR:=0x00008000
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 LOADADDR:=0x00008000
 
-JFFS2_BLOCKSIZE = 128k
 
 KDIR_TMP:=$(KDIR)/tmp
 
 
 KDIR_TMP:=$(KDIR)/tmp
 
index b0513af7888fce053d634f40e3c35d08a62cec56..e2303f6e78c295556258a81670d60bba96e6b0c0 100644 (file)
@@ -4,10 +4,12 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
+
+JFFS2_BLOCKSIZE=256k
+
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/image.mk
 
-JFFS2_BLOCKSIZE=256k
 
 define Image/Prepare
        $(LINUX_DIR)/scripts/dtc/dtc -O dtb -R 4 -S 0x20000 $(DTS_DIR)/canyonlands.dts > $(KDIR)/openwrt-canyonlands.dtb
 
 define Image/Prepare
        $(LINUX_DIR)/scripts/dtc/dtc -O dtb -R 4 -S 0x20000 $(DTS_DIR)/canyonlands.dts > $(KDIR)/openwrt-canyonlands.dtb
index 3795454c07118d75fadb63cfa7c6a796ee7a3f2f..08536075065a9210dde4479e3d62b925f587cab4 100644 (file)
@@ -4,11 +4,12 @@
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
 #
-include $(TOPDIR)/rules.mk
-include $(INCLUDE_DIR)/image.mk
 
 JFFS2_BLOCKSIZE=256k 512k
 
 
 JFFS2_BLOCKSIZE=256k 512k
 
+include $(TOPDIR)/rules.mk
+include $(INCLUDE_DIR)/image.mk
+
 ifneq ($(CONFIG_TARGET_xburst_qi_lb60),)
 UBI_OPTS = -m 4096 -p 512KiB
 UBIFS_OPTS = -m 4096 -e 516096 -c 4095
 ifneq ($(CONFIG_TARGET_xburst_qi_lb60),)
 UBI_OPTS = -m 4096 -p 512KiB
 UBIFS_OPTS = -m 4096 -e 516096 -c 4095