Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jan 2020 14:12:41 -0800
From:      Thomas Skibo <thomas-bsd@skibo.net>
To:        freebsd-uboot@freebsd.org
Subject:   Another u-boot build problem.
Message-ID:  <114E7BE8-61B2-4540-AFCB-7FAE91AAC6D0@skibo.net>
References:  <B343F015-8B41-46B2-8DE4-C122E7C7165A@skibo.net>

next in thread | previous in thread | raw e-mail | index | archive | help
I was looking into creating a patch to submit to u-boot to fix a problem =
with building u-boot for Zynq boards on FreeBSD and I ran into another =
issue.  This probably affects other boards so I thought I=E2=80=99d give =
a heads up:

It appears the build fails while building device tree blobs:

DTC     arch/arm/dts/bitmain-antminer-s9.dtb
sed: 1: "arch/arm/dts/.bitmain-a ...": command a expects \ followed by =
text
gmake[2]: *** [scripts/Makefile.lib:308: =
arch/arm/dts/bitmain-antminer-s9.dtb] Error 1
gmake[2]: *** Deleting file 'arch/arm/dts/bitmain-antminer-s9.dtb'
gmake[1]: *** [dts/Makefile:38: arch-dtbs] Error 2
gmake: *** [Makefile:1087: dts/dt.dtb] Error 2
skibo@ashbury:~/u-boot-official %=20

The problem is that sed on FreeBSD requires the =E2=80=9C-e=E2=80=9D =
option in front of the script but it=E2=80=99s optional with Linux sed.  =
This diff seems to fix it:

diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index ef116e0e0a..79d8ae2a23 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -302,7 +302,7 @@ cmd_dtc =3D mkdir -p $(dir ${dtc-tmp}) ; \
              -i $(dir $<) $(DTC_FLAGS) \
              -d $(depfile).dtc.tmp $(dtc-tmp) ; \
      cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) ; \
-       sed -i "s:$(pre-tmp):$(<):" $(depfile)
+       sed -i -e "s:$(pre-tmp):$(<):" $(depfile)

$(obj)/%.dtb: $(src)/%.dts FORCE
      $(call if_changed_dep,dtc)



=E2=80=94Thomas Skibo





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?114E7BE8-61B2-4540-AFCB-7FAE91AAC6D0>