talos-2: Move PPC-style tgz update package targets to targets/

Move the targets generating talos-2's tgz update package to targets.

While this wasn't duplicated, it breaks a cyclic dependency between
board config and BRAND_NAME by moving the ROM output name dependencies
later.  The logic probably would be shared with similar boards if any
were supported, so it is in the spirit of the other targets/ shared
target Makefiles.

Signed-off-by: Jonathon Hall <jonathon.hall@puri.sm>
This commit is contained in:
Jonathon Hall 2023-12-18 16:45:46 -05:00
parent 8ce9c9d438
commit 12a099ad8e
No known key found for this signature in database
GPG Key ID: 1E9C3CA91AE25114
2 changed files with 18 additions and 17 deletions

View File

@ -50,20 +50,4 @@ export CONFIG_BOOT_DEV="/dev/nvme0n1p2"
export CONFIG_BOARD_NAME="Talos 2"
export CONFIG_FLASHROM_OPTIONS="--noverify-all -p linux_mtd"
OUTPUT_PREFIX := heads-$(BOARD)-$(HEADS_GIT_VERSION)
BUNDLED_LINUX := $(OUTPUT_PREFIX)-zImage.bundled
OUTPUT_FILES := $(CB_OUTPUT_FILE) $(CB_BOOTBLOCK_FILE) $(BUNDLED_LINUX)
all: $(board_build)/$(BUNDLED_LINUX)
$(board_build)/$(BUNDLED_LINUX): $(board_build)/zImage.bundled
$(call do-copy,$<,$@)
all: $(board_build)/$(OUTPUT_PREFIX).tgz
$(board_build)/$(OUTPUT_PREFIX).tgz: \
$(addprefix $(board_build)/,$(OUTPUT_FILES))
rm -rf $(board_build)/pkg # cleanup in case directory exists
mkdir $(board_build)/pkg
cp $^ $(board_build)/pkg
cd $(board_build)/pkg && sha256sum * > sha256sum.txt
cd $(board_build)/pkg && tar zcf $@ *
rm -r $(board_build)/pkg
BOARD_TARGETS := ppc_tgz

17
targets/ppc_tgz.mk Normal file
View File

@ -0,0 +1,17 @@
OUTPUT_PREFIX := heads-$(BOARD)-$(HEADS_GIT_VERSION)
BUNDLED_LINUX := $(OUTPUT_PREFIX)-zImage.bundled
OUTPUT_FILES := $(CB_OUTPUT_FILE) $(CB_BOOTBLOCK_FILE) $(BUNDLED_LINUX)
all: $(board_build)/$(BUNDLED_LINUX)
$(board_build)/$(BUNDLED_LINUX): $(board_build)/zImage.bundled
$(call do-copy,$<,$@)
all: $(board_build)/$(OUTPUT_PREFIX).tgz
$(board_build)/$(OUTPUT_PREFIX).tgz: \
$(addprefix $(board_build)/,$(OUTPUT_FILES))
rm -rf $(board_build)/pkg # cleanup in case directory exists
mkdir $(board_build)/pkg
cp $^ $(board_build)/pkg
cd $(board_build)/pkg && sha256sum * > sha256sum.txt
cd $(board_build)/pkg && tar zcf $@ *
rm -r $(board_build)/pkg