Page MenuHomeFreeBSD

D57872.id180688.diff
No OneTemporary

D57872.id180688.diff

diff --git a/sys/tools/fdt/embed_dtb.sh b/sys/tools/fdt/embed_dtb.sh
--- a/sys/tools/fdt/embed_dtb.sh
+++ b/sys/tools/fdt/embed_dtb.sh
@@ -32,13 +32,13 @@
# $1: kernel filename
# $2: device tree blob filename
-dtbsize=`ls -l $2 | awk '{print $5}'`
-obs=`strings -at d $1 | grep "Device Tree Blob STARTS here" | awk '{print $1}'`
-eol=`strings -at d $1 | grep "Device Tree Blob STOPS here" | awk '{print $1}'`
+dtbsize=$(stat -f%z "$2")
+obs=$(strings -at d "$1" | grep "Device Tree Blob STARTS here" | awk '{print $1}')
+eol=$(strings -at d "$1" | grep "Device Tree Blob STOPS here" | awk '{print $1}')
sz=$((eol - obs));
-if [ $sz -lt $dtbsize ]
+if [ $sz -lt "$dtbsize" ]
then
echo "Selected blob is too big to reembed. Please rebuild the kernel."
exit
fi
-dd if=$2 ibs=${dtbsize} of=$1 obs=${obs} oseek=1 conv=notrunc 2> /dev/null
+dd if="$2" ibs="${dtbsize}" of="$1" obs="${obs}" oseek=1 conv=notrunc 2> /dev/null

File Metadata

Mime Type
text/plain
Expires
Wed, Jul 1, 12:43 AM (15 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34397111
Default Alt Text
D57872.id180688.diff (941 B)

Event Timeline