c2f5940db3
DTB Overlays are useful to change/add nodes to a dtb without the need to modify it. Add support for building dtbo during buildkernel. The goal of DTBO present in the FreeBSD source tree is to fill a gap in time when we submit changes upstream (Linux). Instead of waiting 2 to 4 months we can add a DTBO in tree in the meantime. This is not for adding DTBO for capes/hat/addon boards, those will be better to put in a ports. This is also not for enabling a i2c/spi/pwm controller on certain pins, each user have a different use case for those (which pins to use etc ...) and we cannot have all possible configuration. Add a dtbo for sun8i-h3-sid which add the SID node missing in upstream dts. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D14782
27 lines
582 B
Bash
Executable File
27 lines
582 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
|
|
# Script generates dtbo file ($3) from dtso source ($2) in build tree S ($1)
|
|
S=$1
|
|
dtso="$2"
|
|
dtbo_path=$3
|
|
|
|
if [ -z "$dtso" ]; then
|
|
echo "No DTS overlays specified"
|
|
exit 1
|
|
fi
|
|
|
|
if [ -z "${MACHINE}" ]; then
|
|
MACHINE=$(uname -m)
|
|
fi
|
|
|
|
: ${DTC:=dtc}
|
|
|
|
for d in ${dtso}; do
|
|
dtb=${dtbo_path}/`basename $d .dtso`.dtbo
|
|
echo "converting $d -> $dtb"
|
|
cpp -P -x assembler-with-cpp -I $S/gnu/dts/include -I $S/dts/${MACHINE} -I $S/gnu/dts/${MACHINE} -include $d /dev/null |
|
|
${DTC} -@ -O dtb -o $dtb -i $S/dts/${MACHINE} -i $S/gnu/dts/${MACHINE}
|
|
done
|