summaryrefslogtreecommitdiff
path: root/board/BuR/brsmarc1/config.mk
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-08-13 01:47:53 +0300
committerTom Rini <trini@konsulko.com>2019-08-13 01:47:53 +0300
commit9c6115822e894ead72fa4c094bf718eaabb9e103 (patch)
tree4f8843a5cfbe2895a168d96dee111dd31e443b2a /board/BuR/brsmarc1/config.mk
parent5939afc9611e8ba4a86b96e67670b765ee27668e (diff)
parent0805fe151d8c47cfbcfddf71c0891ed4f3c10b56 (diff)
downloadu-boot-9c6115822e894ead72fa4c094bf718eaabb9e103.tar.xz
Merge branch '2019-08-11-ti-imports'
- More DaVinci updates and fixes - PCIe support on am65x - Watchdog converted to DM - Assorted other bugfixes
Diffstat (limited to 'board/BuR/brsmarc1/config.mk')
-rw-r--r--board/BuR/brsmarc1/config.mk33
1 files changed, 33 insertions, 0 deletions
diff --git a/board/BuR/brsmarc1/config.mk b/board/BuR/brsmarc1/config.mk
new file mode 100644
index 0000000000..0692988507
--- /dev/null
+++ b/board/BuR/brsmarc1/config.mk
@@ -0,0 +1,33 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2019 Hannes Schmelzer <oe5hpm@oevsv.at> -
+# B&R Industrial Automation GmbH - http://www.br-automation.com
+#
+
+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 $<
+
+ALL-y += $(hw-platform-y)_prog.bin
+ALL-y += $(hw-platform-y)_prod.zip
+
+$(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) \ No newline at end of file