]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
mvebu: unify boot.scr creation
authorTomasz Maciej Nowak <tomek_n@o2.pl>
Wed, 14 Feb 2018 16:34:38 +0000 (17:34 +0100)
committerHauke Mehrtens <hauke@hauke-m.de>
Fri, 2 Mar 2018 20:33:08 +0000 (21:33 +0100)
Unify boot.scr generation so Makefile for device image generation won't
grow without a reason. Also make boot-scr step optional.

Signed-off-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
target/linux/mvebu/image/Makefile
target/linux/mvebu/image/armada-388-clearfog-base.bootscript [moved from target/linux/mvebu/image/cfbase-boot.script with 94% similarity]
target/linux/mvebu/image/armada-388-clearfog-pro.bootscript [moved from target/linux/mvebu/image/cfpro-boot.script with 93% similarity]

index 1f490905ff79468cdf63baa2f69b02fa2978a7f5..68adfc3ddd9e55e8cfd1f89ce8779601761a3089 100644 (file)
@@ -25,14 +25,9 @@ endef
 # Partition 1:   32768 sectors
 # Partition 2:   98304 sectors (configurable)
 
-define Build/boot-scr-cfpro
-       rm -f $@.bootscript
-       mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d cfpro-boot.script $@.bootscript
-endef
-
-define Build/boot-scr-cfbase
-       rm -f $@.bootscript
-       mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d cfbase-boot.script $@.bootscript
+define Build/boot-scr
+       rm -f $@-boot.scr
+       mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d $(DEVICE_NAME).bootscript $@-boot.scr
 endef
 
 define Build/boot-img
@@ -40,7 +35,7 @@ define Build/boot-img
        mkfs.fat -C $@.boot 16384
        $(foreach dts,$(DEVICE_DTS), mcopy -i $@.boot $(DTS_DIR)/$(dts).dtb ::$(dts).dtb;)
        mcopy -i $@.boot $(IMAGE_KERNEL) ::zImage
-       mcopy -i $@.boot $@.bootscript ::boot.scr
+       -mcopy -i $@.boot $@-boot.scr ::boot.scr
 endef
 
 define Build/sdcard-img
@@ -204,7 +199,7 @@ define Device/armada-388-clearfog-pro
   DEVICE_TITLE := SolidRun ClearFog Pro
   DEVICE_PACKAGES := mkf2fs e2fsprogs swconfig kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
   IMAGES := sdcard.img.gz
-  IMAGE/sdcard.img.gz := boot-scr-cfpro | boot-img | sdcard-img | gzip | append-metadata
+  IMAGE/sdcard.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
   DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
   SUPPORTED_DEVICES := armada-388-clearfog-pro armada-388-clearfog
   UBOOT := clearfog-u-boot-spl.kwb
@@ -217,7 +212,7 @@ define Device/armada-388-clearfog-base
   DEVICE_TITLE := SolidRun ClearFog Base
   DEVICE_PACKAGES := mkf2fs e2fsprogs kmod-fs-vfat kmod-nls-cp437 kmod-nls-iso8859-1
   IMAGES := sdcard.img.gz
-  IMAGE/sdcard.img.gz := boot-scr-cfbase | boot-img | sdcard-img | gzip | append-metadata
+  IMAGE/sdcard.img.gz := boot-scr | boot-img | sdcard-img | gzip | append-metadata
   DEVICE_DTS := armada-388-clearfog-pro armada-388-clearfog-base
   UBOOT := clearfog-u-boot-spl.kwb
 endef
similarity index 94%
rename from target/linux/mvebu/image/cfbase-boot.script
rename to target/linux/mvebu/image/armada-388-clearfog-base.bootscript
index 6ab6e363bc7ea0fec70fecdcaeb155cd1c2aa588..1755203dc5afba1a168a8f3fe091a863d12f62f3 100644 (file)
@@ -1,6 +1,6 @@
 # Standard Boot-Script
 # use only well-known variable names provided by U-Boot Distro boot
-# This script assumes that there is a boot partition, 
+# This script assumes that there is a boot partition,
 # and that the root partition is always the next one.
 
 # Override DeviceTree for Clearfog Base
similarity index 93%
rename from target/linux/mvebu/image/cfpro-boot.script
rename to target/linux/mvebu/image/armada-388-clearfog-pro.bootscript
index 5971b0da77ab61cf2873300bc6a016d251ce1898..4cc206dbf331ae579731daa5be20138bb92691a0 100644 (file)
@@ -1,6 +1,6 @@
 # Standard Boot-Script
 # use only well-known variable names provided by U-Boot Distro boot
-# This script assumes that there is a boot partition, 
+# This script assumes that there is a boot partition,
 # and that the root partition is always the next one.
 
 # rootfs is always on the next partition