/usr/src/linux-source-4.4.0/debian/scripts/misc/fw-to-ihex.sh is in linux-source-4.4.0 4.4.0-116.140.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | #!/bin/bash
F=$1
if [ "$F" = "" ]
then
echo You must supply a firmware file.
exit 1
fi
echo "unsigned char d[] = {" > $F.c
hexdump -v -e '"\t" 8/1 "0x%02x, " "\n"' $F >> $F.c
echo "};" >> $F.c
sed -i 's/0x .*$//' $F.c
O="`dirname $F`/`basename $F`.o"
gcc -o $O -c $F.c
objcopy -Oihex $F.o $F.ihex
|