I’m playing with the K20 and custom firmware based on the
There is some strange logic for deciding if the file in
/lib/firmware/apalis-tk1-k20.bin should be flashed into the K20 or not.
Looking at apalis-tk1-k20.c « mfd « drivers - linux-toradex.git - Linux kernel for Apalis and Colibri modules it seems that the bin file in
/lib/firmware/apalis-tk1-k20.bin is only flashed in IF the version of the firmware on the K20 doesn’t match the version baked into the mfd driver
APALIS_TK1_K20_FW_VER ( which is defined in apalis-tk1-k20.h « mfd « linux « include - linux-toradex.git - Linux kernel for Apalis and Colibri modules )
This makes replacing the firmware require an extra step to erase the K20 (
dd if=/dev/zero of=/lib/firmware/apalis-tk1-k20.bin bs=1 count=1 ) then restart TK1 and then copy the new custom firmware file to
/lib/firmware/apalis-tk1-k20.bin and then restart.
Would it make more snse to compare the version of the firmware on the K20 to the version of firmware of the binary file in the
/lib/firmware/apalis-tk1-k20.bin instead? That would make firmware upgrades simpler.