tools/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>
Mon, 5 Aug 2019 12:01:59 +0000 (14:01 +0200)
commit0bd4a1251caa048a95ea55254fc7c4e6294cc3da
tree26ffa318d5c51df6f8d5ff329edb7972318925e7
parent91d583503ca20def61020f56d22c1992609ca98c
tools/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>
tools/firmware-utils/src/mktplinkfw2.c