Przeglądaj źródła

mvebu: unify boot.scr creation

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 <[email protected]>
Tomasz Maciej Nowak 7 lat temu
rodzic
commit
0ef28ea387

+ 6 - 11
target/linux/mvebu/image/Makefile

@@ -25,14 +25,9 @@ endef
 # Partition 1:   32768 sectors
 # Partition 2:   98304 sectors (configurable)
 
-define Build/boot-scr-cfpro
-	rm -f [email protected]
-	mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d cfpro-boot.script [email protected]
-endef
-
-define Build/boot-scr-cfbase
-	rm -f [email protected]
-	mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d cfbase-boot.script [email protected]
+define Build/boot-scr
+	rm -f [email protected]
+	mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d $(DEVICE_NAME).bootscript [email protected]
 endef
 
 define Build/boot-img
@@ -40,7 +35,7 @@ define Build/boot-img
 	mkfs.fat -C [email protected] 16384
 	$(foreach dts,$(DEVICE_DTS), mcopy -i [email protected] $(DTS_DIR)/$(dts).dtb ::$(dts).dtb;)
 	mcopy -i [email protected] $(IMAGE_KERNEL) ::zImage
-	mcopy -i [email protected] [email protected] ::boot.scr
+	-mcopy -i [email protected] [email protected] ::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

+ 1 - 1
target/linux/mvebu/image/cfbase-boot.script → target/linux/mvebu/image/armada-388-clearfog-base.bootscript

@@ -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

+ 1 - 1
target/linux/mvebu/image/cfpro-boot.script → target/linux/mvebu/image/armada-388-clearfog-pro.bootscript

@@ -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