aboutsummaryrefslogtreecommitdiff
path: root/sys/tools/embed_mfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sys/tools/embed_mfs.sh')
-rw-r--r--sys/tools/embed_mfs.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/tools/embed_mfs.sh b/sys/tools/embed_mfs.sh
index 66c50c2da111..a7ac80c8f8d3 100644
--- a/sys/tools/embed_mfs.sh
+++ b/sys/tools/embed_mfs.sh
@@ -36,12 +36,12 @@ mfs_size=`stat -f '%z' $2 2> /dev/null`
# If we can't determine MFS image size - bail.
[ -z ${mfs_size} ] && echo "Can't determine MFS image size" && exit 1
-sec_info=`${CROSS_BINUTILS_PREFIX}objdump -h $1 2> /dev/null | grep " oldmfs "`
+sec_info=`elfdump -c $1 2> /dev/null | grep -A 5 -E "sh_name: oldmfs$"`
# If we can't find the mfs section within the given kernel - bail.
[ -z "${sec_info}" ] && echo "Can't locate mfs section within kernel" && exit 1
-sec_size=`echo ${sec_info} | awk '{printf("%d", "0x" $3)}' 2> /dev/null`
-sec_start=`echo ${sec_info} | awk '{printf("%d", "0x" $6)}' 2> /dev/null`
+sec_size=`echo "${sec_info}" | awk '/sh_size/ {print $2}' 2> /dev/null`
+sec_start=`echo "${sec_info}" | awk '/sh_offset/ {print $2}' 2> /dev/null`
# If the mfs section size is smaller than the mfs image - bail.
[ ${sec_size} -lt ${mfs_size} ] && echo "MFS image too large" && exit 1