Problem running make_dtb.sh

Warner Losh imp at bsdimp.com
Fri Aug 29 16:19:21 UTC 2014


On Aug 29, 2014, at 6:58 AM, Ian Lepore <ian at FreeBSD.org> wrote:

> On Fri, 2014-08-29 at 14:44 +0200, Michael Tuexen wrote:
>> Dear all,
>> 
>> when trying to build the kernel on a Wandboard the traditional way as described in
>> https://www.freebsd.org/doc/en/books/developers-handbook/kernelbuild.html#kernelbuild-traditional
>> a make results in
>> ...
>> sh ../../../tools/fdt/make_dtb.sh ../../.. wandboard-quad.dts /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD
>> converting wandboard-quad.dts -> /usr/home/tuexen/sys/arm/compile/WANDBOARD-QUAD/wandboard-quad.dtb
>> <built-in>:159:10: fatal error: 'wandboard-quad.dts' file not found
>> #include "wandboard-quad.dts"
>>         ^
>> 1 error generated.
>> Error: <stdin>:1.1-2.1 syntax error
>> FATAL ERROR: Unable to parse input tree
>> *** Error code 1
>> 
>> Stop.
>> 
>> The reason is that make_dtb.sh uses $MACHINE which is not set. If I set it to arm, the make completes
>> successfully. How is this fixed in the best way?
>> 
>> Best regards
>> Michael
> 
> IMO, the best way to fix it would be to update the handbook to say that
> the "traditional" way of building a kernel is no longer supported.
> Since that won't fly due to a small but very vocal minority, maybe the
> attached patch would be a good fix.

Yea, good luck with that one…  Then again, I do use it all the time because it
still works.

> Index: sys/tools/fdt/make_dtb.sh
> ===================================================================
> --- sys/tools/fdt/make_dtb.sh	(revision 270064)
> +++ sys/tools/fdt/make_dtb.sh	(working copy)
> @@ -12,6 +12,10 @@ if [ -z "$dts" ]; then
>     exit 1
> fi
> 
> +if [ -z "${MACHINE}" ]; then
> +    MACHINE=$(uname -m)
> +fi
> +
> for d in ${dts}; do
>     dtb=${dtb_path}/`basename $d .dts`.dtb
>     echo "converting $d -> $dtb”

This fix works for me.

Warner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-arm/attachments/20140829/bbbc8868/attachment.sig>


More information about the freebsd-arm mailing list