Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161036063
D57872.id180688.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
941 B
Referenced Files
None
Subscribers
None
D57872.id180688.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D57872: sys/tools/fdt/embed_dtb.sh: small fixes
Attached
Detach File
Event Timeline
Log In to Comment