Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F149922972
D40798.1791200422.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40798.1791200422.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
@@ -33,13 +33,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}" | awk '/Device Tree Blob STARTS here/ {print $1}')
+eol=$(strings -at d "${1}" | awk '/Device Tree Blob STOPS here/ {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
diff --git a/sys/tools/fdt/make_dtbh.sh b/sys/tools/fdt/make_dtbh.sh
--- a/sys/tools/fdt/make_dtbh.sh
+++ b/sys/tools/fdt/make_dtbh.sh
@@ -4,5 +4,5 @@
# Script generates a $2/fdt_static_dtb.h file.
-dtb_base_name=`basename $1 .dts`
-echo '#define FDT_DTB_FILE "'${dtb_base_name}.dtb'"' > $2/fdt_static_dtb.h
+dtb_base_name=$(basename "${1}" .dts)
+echo '#define FDT_DTB_FILE "'${dtb_base_name}.dtb'"' > "${2}/fdt_static_dtb.h"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 5, 11:40 AM (21 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30180830
Default Alt Text
D40798.1791200422.diff (1 KB)
Attached To
Mode
D40798: Minor adjustments to embed_dtb.sh and make_dtbh.sh
Attached
Detach File
Event Timeline
Log In to Comment