diff options
author | Hannes Schmelzer <oe5hpm@oevsv.at> | 2018-07-06 15:41:29 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-07-19 17:03:35 -0400 |
commit | 0938cff73727f562cd49c55e1d47d09bbffd4915 (patch) | |
tree | aa6f7a2bf1653399a675764604df7d6a5dced814 /board/BuR | |
parent | fbc7c7decf47b22717d3aad13358f4d7440e7055 (diff) |
board/BuR/brppt1: add makerule for generating production files
Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Diffstat (limited to 'board/BuR')
-rw-r--r-- | board/BuR/brppt1/config.mk | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/board/BuR/brppt1/config.mk b/board/BuR/brppt1/config.mk new file mode 100644 index 0000000000..b11b544c37 --- /dev/null +++ b/board/BuR/brppt1/config.mk @@ -0,0 +1,36 @@ +# +# Copyright (C) 2018 Hannes Schmelzer <oe5hpm@oevsv.at> - +# B&R Industrial Automation GmbH - http://www.br-automation.com +# +# SPDX-License-Identifier: GPL-2.0+ +# + +hw-platform-y :=$(shell echo $(CONFIG_DEFAULT_DEVICE_TREE) | sed -e 's/am335x-//') + +payload_off :=$(shell printf "%d" $(CONFIG_SYS_SPI_U_BOOT_OFFS)) + +quiet_cmd_prodbin = PRODBIN $@ $(payload_off) +cmd_prodbin = \ + dd if=/dev/zero ibs=1M count=2 2>/dev/null | tr "\000" "\377" >$@ && \ + dd conv=notrunc bs=1 if=MLO.byteswap of=$@ seek=0 2>/dev/null && \ + dd bs=1 if=u-boot-dtb.img of=$@ seek=$(payload_off) 2>/dev/null + +quiet_cmd_prodzip = SAPZIP $@ +cmd_prodzip = \ + test -d misc && rm -r misc; \ + mkdir misc && \ + cp MLO.byteswap misc/ && \ + cp spl/u-boot-spl.bin misc/ && \ + cp u-boot-dtb.img misc/ && \ + zip -9 -r $@ misc/* >/dev/null $< + +ifeq ($(hw-platform-y),brppt1-spi) +ALL-y += $(hw-platform-y)_prog.bin +ALL-y += $(hw-platform-y)_prod.zip +endif + +$(hw-platform-y)_prog.bin: u-boot-dtb.img spl/u-boot-spl.bin + $(call if_changed,prodbin) + +$(hw-platform-y)_prod.zip: $(hw-platform-y)_prog.bin + $(call if_changed,prodzip) |