boston: Add u-boot.mcs make target
PATCH 1/1 boston: Add u-boot.mcs make target
U-Boot is generally flashed to a MIPS Boston development board by means of a .mcs file which Xilinx Vivado software can write to the flash present on the board. As such we'd generally want to produce an mcs file when building U-Boot to target the Boston board. Introduce a make target for u-boot.mcs which generates it using the srec_cat tool available from the SRecord project, and build it by default when srec_cat is present.
---
board/imgtec/boston/config.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 board/imgtec/boston/config.mk
board/imgtec/boston/config.mk new file +15 -0
@@ -0,0 +1,15 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +quiet_cmd_srec_cat = SRECCAT $@ + cmd_srec_cat = srec_cat -output $@ -$2 $< -binary -offset $3 + +u-boot.mcs: u-boot.bin + $(call cmd,srec_cat,intel,0x7c00000) + +# if srec_cat is present build u-boot.mcs by default +ifneq ($(shell which srec_cat 2>/dev/null),) +ALL-y += u-boot.mcs +CLEAN_FILES += u-boot.mcs +endif
Signature · 1 line
2.15.0
PATCH 1/1 boston: Add u-boot.mcs make target
Quoted 29 lines · Paul Burton
U-Boot is generally flashed to a MIPS Boston development board by means of a .mcs file which Xilinx Vivado software can write to the flash present on the board. As such we'd generally want to produce an mcs file when building U-Boot to target the Boston board. Introduce a make target for u-boot.mcs which generates it using the
srec_cattool available from the SRecord project, and build it by default whensrec_catis present.Signed-off-by Paul Burton <[email protected]>Cc Daniel Schwierzeck <[email protected]>Cc u-boot at lists.denx.de---
board/imgtec/boston/config.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 board/imgtec/boston/config.mkboard/imgtec/boston/config.mk new file +5
-0@@ -0,0 +1,15 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +quiet_cmd_srec_cat = SRECCAT $@
board/imgtec/boston/config.mk line 15
Quoted 10 lines
board/imgtec/boston/config.mk new file +10
-0+ cmd_srec_cat = srec_cat -output $@ -$2 $< -binary -offset $3 + +u-boot.mcs: u-boot.bin + $(call cmd,srec_cat,intel,0x7c00000) + +# if srec_cat is present build u-boot.mcs by default +ifneq ($(shell which srec_cat 2>/dev/null),) +ALL-y += u-boot.mcs +CLEAN_FILES += u-boot.mcs +endif
I think the following would be more elegant and clean:
# if srec_cat is present build u-boot.mcs by default has_srec_cat := $(call try-run,srec_cat -VERSion,y,n) ALL-$(has_srec_cat) += u-boot.mcs CLEAN_FILES += u-boot.mcs
Signature · 9 lines
- Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171121/1bdb5fee/attachment.sig>
PATCH v2 1/1 boston: Add u-boot.mcs make target
U-Boot is generally flashed to a MIPS Boston development board by means of a .mcs file which Xilinx Vivado software can write to the flash present on the board. As such we'd generally want to produce an mcs file when building U-Boot to target the Boston board. Introduce a make target for u-boot.mcs which generates it using the srec_cat tool available from the SRecord project, and build it by default when srec_cat is present.
---
Changes in v2:
- Use try-run as suggested by Daniel.
board/imgtec/boston/config.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 board/imgtec/boston/config.mk
board/imgtec/boston/config.mk new file +14 -0
@@ -0,0 +1,14 @@ +# +# SPDX-License-Identifier: GPL-2.0+ +# + +quiet_cmd_srec_cat = SRECCAT $@ + cmd_srec_cat = srec_cat -output $@ -$2 $< -binary -offset $3 + +u-boot.mcs: u-boot.bin + $(call cmd,srec_cat,intel,0x7c00000) + +# if srec_cat is present build u-boot.mcs by default +has_srec_cat = $(call try-run,srec_cat -VERSion,y,n) +ALL-$(has_srec_cat) += u-boot.mcs +CLEAN_FILES += u-boot.mcs
Signature · 1 line
2.15.0
PATCH v2 1/1 boston: Add u-boot.mcs make target
Quoted 11 lines · Paul Burton
U-Boot is generally flashed to a MIPS Boston development board by means of a .mcs file which Xilinx Vivado software can write to the flash present on the board. As such we'd generally want to produce an mcs file when building U-Boot to target the Boston board. Introduce a make target for u-boot.mcs which generates it using the
srec_cattool available from the SRecord project, and build it by default whensrec_catis present.Signed-off-by Paul Burton <[email protected]>Cc Daniel Schwierzeck <[email protected]>Cc u-boot at lists.denx.de
Quoted 9 lines
---
Changes in v2:
- Use try-run as suggested by Daniel.board/imgtec/boston/config.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 board/imgtec/boston/config.mk
applied to u-boot-mips, thanks.
Signature · 9 lines
- Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: OpenPGP digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20171122/935609cd/attachment.sig>