mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 23:42:43 +00:00
3f7047db7a
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>
16 lines
785 B
Makefile
16 lines
785 B
Makefile
obj-$(CONFIG_MTD_SPLIT) += mtdsplit.o
|
|
obj-$(CONFIG_MTD_SPLIT_BCM_WFI_FW) += mtdsplit_bcm_wfi.o
|
|
obj-$(CONFIG_MTD_SPLIT_SEAMA_FW) += mtdsplit_seama.o
|
|
obj-$(CONFIG_MTD_SPLIT_SQUASHFS_ROOT) += mtdsplit_squashfs.o
|
|
obj-$(CONFIG_MTD_SPLIT_UIMAGE_FW) += mtdsplit_uimage.o
|
|
obj-$(CONFIG_MTD_SPLIT_FIT_FW) += mtdsplit_fit.o
|
|
obj-$(CONFIG_MTD_SPLIT_LZMA_FW) += mtdsplit_lzma.o
|
|
obj-$(CONFIG_MTD_SPLIT_TPLINK_FW) += mtdsplit_tplink.o
|
|
obj-$(CONFIG_MTD_SPLIT_TRX_FW) += mtdsplit_trx.o
|
|
obj-$(CONFIG_MTD_SPLIT_BRNIMAGE_FW) += mtdsplit_brnimage.o
|
|
obj-$(CONFIG_MTD_SPLIT_EVA_FW) += mtdsplit_eva.o
|
|
obj-$(CONFIG_MTD_SPLIT_WRGG_FW) += mtdsplit_wrgg.o
|
|
obj-$(CONFIG_MTD_SPLIT_MINOR_FW) += mtdsplit_minor.o
|
|
obj-$(CONFIG_MTD_SPLIT_JIMAGE_FW) += mtdsplit_jimage.o
|
|
obj-$(CONFIG_MTD_SPLIT_ELF_FW) += mtdsplit_elf.o
|