Message ID | 20171121203741.12990-1-paul.burton@mips.com |
---|---|
State | Superseded |
Delegated to: | Daniel Schwierzeck |
Headers | show |
Series | [U-Boot] boston: Add u-boot.mcs make target | expand |
On 21.11.2017 21:37, Paul Burton wrote: > 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. > > Signed-off-by: Paul Burton <paul.burton@mips.com> > Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> > Cc: u-boot@lists.denx.de > > --- > > board/imgtec/boston/config.mk | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > create mode 100644 board/imgtec/boston/config.mk > > diff --git a/board/imgtec/boston/config.mk b/board/imgtec/boston/config.mk > new file mode 100644 > index 0000000000..782bd72aa5 > --- /dev/null > +++ b/board/imgtec/boston/config.mk > @@ -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 > 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
diff --git a/board/imgtec/boston/config.mk b/board/imgtec/boston/config.mk new file mode 100644 index 0000000000..782bd72aa5 --- /dev/null +++ b/board/imgtec/boston/config.mk @@ -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
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. Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: u-boot@lists.denx.de --- board/imgtec/boston/config.mk | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 board/imgtec/boston/config.mk