mirror of
https://github.com/easytarget/MQ-Pro-IO.git
synced 2026-01-21 18:33:06 +00:00
new build script
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
rm -f dtbs/*
|
||||
for file in `ls ../{*.dts,*.dtsi}`; do
|
||||
echo "Processing $file to ${file##*/}"
|
||||
cpp -I/usr/src/linux-headers-6.8.0-31-generic/include/ -nostdinc -undef -x assembler-with-cpp $file > ${file##*/}
|
||||
done
|
||||
27
device-tree/make_dtb.sh
Executable file
27
device-tree/make_dtb.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
# Takes a list of dts files for the specified architecture and emits appropriate compiled dtb files for use in customised deviceTree setups.
|
||||
#
|
||||
|
||||
dtc=/usr/bin/dtc
|
||||
revision=`/usr/bin/uname -r`
|
||||
|
||||
echo "Compiling against headers for $revision"
|
||||
|
||||
if [ -d "$revision" ]; then
|
||||
echo "Using existing build directory"
|
||||
else
|
||||
echo "Creating new build directory"
|
||||
mkdir "$revision"
|
||||
fi
|
||||
|
||||
for file in `ls {*.dts,*.dtsi}`; do
|
||||
echo "Processing $file to ${file##*/}"
|
||||
cpp -I/usr/src/linux-headers-$revision/include/ -nostdinc -undef -x assembler-with-cpp $file > $revision/${file##*/}
|
||||
done
|
||||
|
||||
cd $revision
|
||||
for file in `ls *.dts`; do
|
||||
out=${file/.dts/.dtb}
|
||||
echo "Compiling: $revision/$file > $revision/$out"
|
||||
$dtc $file > $out
|
||||
done
|
||||
Reference in New Issue
Block a user