lantiq: fritz_cal_extract with reverse option for AVM FritzBox 7430
authorDustin Gathmann <dzsoftware@posteo.org>
Wed, 15 Jan 2025 14:55:29 +0000 (15:55 +0100)
committerRobert Marko <robimarko@gmail.com>
Mon, 20 Jan 2025 12:07:22 +0000 (13:07 +0100)
commitb2cac2a9785ada7c30388349f5d9a9bdcff2e730
treeede22a4d0bb13db48418b55b6ed13efcf2ac8e81
parentf80f52163a1f56ebf3ced76cb4d37906c4d25702
lantiq: fritz_cal_extract with reverse option for AVM FritzBox 7430

This implementation of fritz_cal_extract can also retrieve firmware
data stored in reverse byte order, as found in the AVM 7430 device.

This is done by intermediate storage in a buffer presumably large enough
to hold the complete data set. Currently, this buffer size is 128kB + 1kB
(some extra space for skipped data).

In the usual case of "forward" data, this implementation should behave
like the original implementation in all common cases. limit [-l] will
determine the amount of data read and size of buffer allocated.

However, if you are reading reversed data or didn't set a limit, the buffer
may be too small to hold all data. In this case, you can choose a higher
limit [-l] to enforce a sufficient buffer size.

Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
Link: https://github.com/openwrt/openwrt/pull/15501
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/utils/fritz-tools/src/fritz_cal_extract.c
target/linux/lantiq/xrx200/base-files/etc/hotplug.d/firmware/12-ath9k-eeprom