mktplinkfw2: add support to pack bootloader
authorAlexander Couzens <lynxis@fe80.eu>
Wed, 25 Apr 2018 09:42:43 +0000 (11:42 +0200)
committerAlexander Couzens <lynxis@fe80.eu>
Tue, 19 Sep 2023 18:01:06 +0000 (20:01 +0200)
commitc18f662f3c740718c3259ce08dc6f5a059ffa7a2
tree9bcbaadea1caef375738f7378dccc76609164e35
parent9e211d2980fe556b70c7191a8c908916316ebc1a
mktplinkfw2: add support to pack bootloader

The 841v13 and 841v14 can not flash any image without bootloader over
the WebUI due a bug in the oem firmware upgrade software.

Allow mktplinkfw2 to integrate bootloaders.
An image with the bootloader looks:

|------------|
|image header|
|------------|
|bootloader  |
|------------|
|optional pad|
|------------|
|image header|
|------------|
|kernel image|
|------------|
|rootfs image|
|------------|

The padding depends on the bootloader size. The 2nd image header must
start on a 64k boundary.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
src/mktplinkfw2.c