immortalwrt/package
Daniel Golle 36c74de2f5
image: add support for building FIT image with filesystem
Allow for single (external-data) FIT image to hold kernel, dtb and
squashfs. In that way, the bootloader verifies the system integrity
including the rootfs, because what's the point of checking that the
hash of the kernel is correct if it won't boot in case of squashfs
being corrupted? Better allow bootloader to check everything needed
to make it at least up to failsafe mode. As a positive side effect
this change also makes the sysupgrade process on nand potentially
much easier as it is now.
In short: mkimage has a parameter '-E' which allows generating FIT
images with 'external' data rather than embedding the data into the
device-tree blob itself. In this way, the FIT structure itself remains
small and can be parsed easily (rather than having to page around
megabytes of image content). This patch makes use of that and adds
support for adding sub-images of type 'filesystem' which are used to
store the squashfs. Now U-Boot can verify the whole OS and the new
partition parsers added in the Linux kernel can detect the filesystem
sub-images, create partitions for them, and select the active rootfs
volume based on the configuration in FIT (passing configuration via
device tree could be implemented easily at a later stage).

This new FIT partition parser works for NOR flash (on top of mtdblock),
NAND flash (on top of ubiblock) as well as classic block devices
(ie. eMMC, SDcard, SATA, NVME, ...).
It could even be used to mount such FIT images via `losetup -P` on a
user PC if this patch gets included in Linux upstream one day ;)

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2021-03-02 22:17:37 +08:00
..
base-files image: add support for building FIT image with filesystem 2021-03-02 22:17:37 +08:00
boot uboot-mediatek: rework support for Bananapi BPi-R64 board 2021-03-02 22:12:09 +08:00
ctcgfw Merge Mainline 2021-03-02 18:19:46 +08:00
devel Merge Mainline 2021-02-01 00:12:25 +08:00
firmware Merge Mainline 2021-03-02 18:19:46 +08:00
kernel kernel/zram: remove obsolete symbol 2021-03-02 12:17:09 +08:00
lean Merge Mainline 2021-03-02 18:19:46 +08:00
libs libunwind: Add MIPS64 dep check 2021-03-02 12:04:21 +08:00
lienol treewide: replace old domain with new one 2021-03-01 22:13:00 +08:00
network Merge Mainline 2021-03-02 18:19:46 +08:00
ntlf9t openwrt-dnsforwarder: removed 2021-02-25 21:27:33 +08:00
system Merge Mainline 2021-03-02 18:19:46 +08:00
utils Merge Mainline 2021-03-02 18:19:46 +08:00
Makefile build: always build package/kernel/linux 2020-10-16 19:11:21 +08:00