2015-01-02 21:52:35 +00:00
|
|
|
config MTD_SPLIT
|
|
|
|
def_bool n
|
|
|
|
help
|
|
|
|
Generic MTD split support.
|
|
|
|
|
|
|
|
config MTD_SPLIT_SUPPORT
|
|
|
|
def_bool MTD = y
|
|
|
|
|
2014-08-25 16:30:44 +00:00
|
|
|
comment "Rootfs partition parsers"
|
|
|
|
|
|
|
|
config MTD_SPLIT_SQUASHFS_ROOT
|
|
|
|
bool "Squashfs based root partition parser"
|
2015-01-02 21:52:35 +00:00
|
|
|
depends on MTD_SPLIT_SUPPORT
|
2014-08-25 16:30:44 +00:00
|
|
|
select MTD_SPLIT
|
|
|
|
default n
|
|
|
|
help
|
|
|
|
This provides a parsing function which allows to detect the
|
|
|
|
offset and size of the unused portion of a rootfs partition
|
|
|
|
containing a squashfs.
|
|
|
|
|
|
|
|
comment "Firmware partition parsers"
|
|
|
|
|
2020-05-17 15:24:47 +00:00
|
|
|
config MTD_SPLIT_BCM63XX_FW
|
|
|
|
bool "BCM63xx firmware parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
|
|
|
|
2020-05-14 16:19:35 +00:00
|
|
|
config MTD_SPLIT_BCM_WFI_FW
|
|
|
|
bool "Broadcom Whole Flash Image parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
|
|
|
|
2021-01-20 15:49:26 +00:00
|
|
|
config MTD_SPLIT_CFE_BOOTFS
|
|
|
|
bool "Parser finding rootfs appended to the CFE bootfs"
|
|
|
|
depends on MTD_SPLIT_SUPPORT && ARCH_BCM4908
|
|
|
|
select MTD_SPLIT
|
|
|
|
help
|
|
|
|
cferom on BCM4908 (and bcm63xx) uses JFFS2 bootfs partition
|
|
|
|
for storing kernel, cferam and some device specific files.
|
|
|
|
There isn't any straight way of storing rootfs so it gets
|
|
|
|
appended to the JFFS2 bootfs partition. Kernel needs to find
|
|
|
|
it and run init from it. This parser is responsible for
|
|
|
|
finding appended rootfs.
|
|
|
|
|
2014-08-25 16:30:44 +00:00
|
|
|
config MTD_SPLIT_SEAMA_FW
|
|
|
|
bool "Seama firmware parser"
|
2015-01-02 21:52:35 +00:00
|
|
|
depends on MTD_SPLIT_SUPPORT
|
2014-08-25 16:30:44 +00:00
|
|
|
select MTD_SPLIT
|
|
|
|
|
2016-08-07 11:39:00 +00:00
|
|
|
config MTD_SPLIT_WRGG_FW
|
|
|
|
bool "WRGG firmware parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
|
|
|
|
2014-08-25 16:30:44 +00:00
|
|
|
config MTD_SPLIT_UIMAGE_FW
|
|
|
|
bool "uImage based firmware partition parser"
|
2015-01-02 21:52:35 +00:00
|
|
|
depends on MTD_SPLIT_SUPPORT
|
2014-08-25 16:30:44 +00:00
|
|
|
select MTD_SPLIT
|
|
|
|
|
2015-03-15 19:39:27 +00:00
|
|
|
config MTD_SPLIT_FIT_FW
|
|
|
|
bool "FIT based firmware partition parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
|
|
|
|
2014-08-25 16:30:44 +00:00
|
|
|
config MTD_SPLIT_LZMA_FW
|
|
|
|
bool "LZMA compressed kernel based firmware partition parser"
|
2015-01-02 21:52:35 +00:00
|
|
|
depends on MTD_SPLIT_SUPPORT
|
2014-08-25 16:30:44 +00:00
|
|
|
select MTD_SPLIT
|
2015-01-02 21:52:44 +00:00
|
|
|
|
|
|
|
config MTD_SPLIT_TPLINK_FW
|
|
|
|
bool "TP-Link firmware parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
2015-01-02 21:53:11 +00:00
|
|
|
|
|
|
|
config MTD_SPLIT_TRX_FW
|
|
|
|
bool "TRX image based firmware partition parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
2016-01-17 10:40:51 +00:00
|
|
|
|
|
|
|
config MTD_SPLIT_BRNIMAGE_FW
|
|
|
|
bool "brnImage (brnboot image) firmware parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
2016-01-17 10:41:08 +00:00
|
|
|
|
|
|
|
config MTD_SPLIT_EVA_FW
|
|
|
|
bool "EVA image based firmware partition parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
2017-02-14 13:42:10 +00:00
|
|
|
|
|
|
|
config MTD_SPLIT_MINOR_FW
|
|
|
|
bool "Mikrotik NOR image based firmware partition parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
2018-02-04 12:11:16 +00:00
|
|
|
|
|
|
|
config MTD_SPLIT_JIMAGE_FW
|
|
|
|
bool "JBOOT Image based firmware partition parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|
kernel: mtdsplit: support ELF loader splitting
To parse the ELF kernel loader, a small ELF parser is used that can
handle both ELF32 or ELF64 class loaders. The splitter assumes that the
kernel is always located before the rootfs, whether it is embedded in
the loader or not. If the kernel is located after the rootfs on the
firmware partition, then the rootfs splitter will include it in the
dynamically created rootfs_data partition and the kernel will be
corrupted.
The kernel image is preferably embedded inside the ELF loader, so the
end of the loader equals the end of the kernel partition. This is due to
the way mtd_find_rootfs_from searches for the the rootfs:
- if the kernel image is embedded in the loader, the appended rootfs may
follow the loader immediately, within the same erase block.
- if the kernel image is not embedded in the loader, but placed at some
offset behind the loader (OKLI-style loader), the rootfs must be
aligned to an erase-block after the loader and kernel image.
In case section header table is empty, determine the elf loader size by
finding the end of the last segment, as defined by the program header
table.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
2020-07-02 20:33:56 +00:00
|
|
|
|
|
|
|
config MTD_SPLIT_ELF_FW
|
|
|
|
bool "ELF loader firmware partition parser"
|
|
|
|
depends on MTD_SPLIT_SUPPORT
|
|
|
|
select MTD_SPLIT
|