Last active
April 27, 2020 14:19
-
-
Save aaronautt/cacae28729c46b0716b233c0e7dd2535 to your computer and use it in GitHub Desktop.
script to compile dts files to dtbs outside of Linux Kernel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PROGNAME="mkdts" | |
usage() | |
{ | |
echo $PROGNAME "<file.dts> <output.dtb>" | |
echo "<file.dts> is the name of the dts to be compiled" | |
echo "<output.dtb> name of the output dtb" | |
} | |
if [ -z $1 || -z $2] | |
then | |
echo "please input args" | |
usage | |
else | |
cpp -nostdinc -I include -I arch -undef -x assembler-with-cpp $1 > temp.dts | |
dtc -O dtb -b 0 -o $2 temp.dts | |
rm temp.dts | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment