Skip to content

Commit

Permalink
Extra options -t 4 -r for fritz_cal_data instead of data reversal in …
Browse files Browse the repository at this point in the history
…shell

script.
  • Loading branch information
dzzinstant committed May 4, 2024
1 parent 01c1895 commit 47612a6
Showing 1 changed file with 2 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,8 @@ case "$FIRMWARE" in
/usr/bin/fritz_cal_extract -i 1 -s 0x1e800 -e 0x207 -l 5120 -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader")
;;
avm,fritz7430)
reversed=$( ( \
/usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 5120 $(find_mtd_chardev "urlader") || \
/usr/bin/fritz_cal_extract -i 1 -s 0x1e800 -e 0x207 -l 5120 $(find_mtd_chardev "urlader") \
) | hexdump -v -e '/1 "%02x "')

caldata=""
i=0
count=$((${#reversed} / 3 - 4))
for byte in $reversed; do
i=$(($i+1))
if [ "$i" -gt "$count" ]; then
break
fi
caldata="\x${byte}${caldata}"
done

printf "%b" "$caldata" > /lib/firmware/$FIRMWARE
/usr/bin/fritz_cal_extract -i 1 -s 0x1e000 -e 0x207 -l 5120 -t 4 -r -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader") || \
/usr/bin/fritz_cal_extract -i 1 -s 0x1e800 -e 0x207 -l 5120 -t 4 -r -o /lib/firmware/$FIRMWARE $(find_mtd_chardev "urlader")
;;
bt,homehub-v5a)
caldata_extract_ubi "caldata" 0x1000 0x1000
Expand Down

0 comments on commit 47612a6

Please sign in to comment.