Created
April 12, 2024 08:40
-
-
Save krisk0/8874f18318c2b8c50ef63c9db4f214ef to your computer and use it in GitHub Desktop.
compile u-boot .dts found in dir arch/arm/dts
This file contains hidden or 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 | |
src=`realpath $1` | |
uboot_base=`dirname $src`/../../.. | |
uboot_base=`realpath $uboot_base` | |
echo $uboot_base | |
pre=/tmp/pre.dts | |
tgt=${src%.dts}.dtb | |
cd $uboot_base | |
oo=" | |
-nostdinc | |
-Iinclude | |
-x assembler-with-cpp | |
" | |
cc -E $oo -o $pre $src || exit | |
dtc -O dtb -o $tgt -b 0 $pre |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment