rockchip: make sysupgrade image generation reusable

This refactors the sysupgrade image generation code to make it reusable
for all devices generating an SD card image.

While at it, move the bootscripts to their own subdirectory.

Signed-off-by: David Bauer <mail@david-bauer.net>
This commit is contained in:
David Bauer 2020-07-31 01:49:16 +02:00 committed by CN_SZTL
parent af00d574dc
commit be49374ad9
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 2 additions and 3 deletions

View File

@ -24,7 +24,7 @@ endef
define Build/boot-script
# Make an U-boot image and copy it to the boot partition
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d $(if $(1),$(1),mmc).bootscript $@.boot/boot.scr
mkimage -A arm -O linux -T script -C none -a 0 -e 0 -d bootscript/$(1).bootscript $@.boot/boot.scr
endef
define Build/pine64-img
@ -54,6 +54,7 @@ define Device/Default
IMAGES := sysupgrade.img.gz
SUPPORTED_DEVICES := $(subst _,$(comma),$(1))
DEVICE_DTS = rockchip/$$(SOC)-$(lastword $(subst _, ,$(1)))
IMAGE/sysupgrade.img.gz := boot-common | boot-script $(lastword $(subst _, ,$(1))) | pine64-img | gzip | append-metadata
endef
include $(SUBTARGET).mk

View File

@ -10,7 +10,6 @@ define Device/friendlyarm_nanopi-r2s
DEVICE_MODEL := NanoPi R2S
SOC := rk3328
UBOOT_DEVICE_NAME := nanopi-r2s-rk3328
IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-img | gzip | append-metadata
DEVICE_PACKAGES := kmod-usb-net kmod-usb-net-rtl8152
endef
TARGET_DEVICES += friendlyarm_nanopi-r2s
@ -20,6 +19,5 @@ define Device/pine64_rockpro64
DEVICE_MODEL := RockPro64
SOC := rk3399
UBOOT_DEVICE_NAME := rockpro64-rk3399
IMAGE/sysupgrade.img.gz := boot-common | boot-script | pine64-img | gzip | append-metadata
endef
TARGET_DEVICES += pine64_rockpro64