scripts/ubinize-image.sh: fix buildbot breakage
authorPetr Štetiar <ynezz@true.cz>
Sat, 27 Jul 2019 05:47:10 +0000 (07:47 +0200)
committerPetr Štetiar <ynezz@true.cz>
Tue, 30 Jul 2019 08:16:16 +0000 (10:16 +0200)
New Docker based buildslaves install just bare minimum of packages, thus
not having bsdmainutils package installed which provides `hexdump`
utility, leading to the following build breakage on buildbots:

 ubinize-image.sh: 12: /builder/scripts/ubinize-image.sh: hexdump: not found

So this patch simply replaces `hexdump` with `od` utility provided by
coreutils package, which should be likely available.

Co-authored-by: Yousong Zhou <yszhou4tech@gmail.com>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
scripts/ubinize-image.sh

index 09a00b1898cec141bf99a776eb26697d29fec864..a18d6dc428d1cdc21161c5d414ab24211b2b8d03 100755 (executable)
@@ -9,7 +9,7 @@ outfile=""
 err=""
 
 get_magic_word() {
-       dd if=$1 bs=2 count=1 2>/dev/null | hexdump -v -n 2 -e '1/1 "%02x"'
+       dd if=$1 bs=2 count=1 2>/dev/null | od -A n -N 2 -t x1 | tr -d ' '
 }
 
 is_ubifs() {