immortalwrt/scripts
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
..
config scripts: update SPDX license names 2020-09-27 13:21:52 +08:00
flashing scripts/flashing/flash.sh: remove trailing whitespaces 2020-05-24 22:45:18 +08:00
arm-magic.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
brcmImage.pl Merge branch 'master' of https://github.com/lede-project/source 2018-01-09 14:38:15 +08:00
bundle-libraries.sh scripts: bundle-libraries.sh: fix broken SDK compiler 2020-11-03 11:54:47 +08:00
cfe-bin-header.py scripts: cfe-bin-header: fix shebang 2020-05-19 18:03:46 +08:00
cfe-partition-tag.py scripts: add CFE Partition Tags support 2020-05-22 11:57:41 +08:00
cfe-wfi-tag.py scripts: cfe-wfi-tag: fix shebang 2020-05-19 18:06:04 +08:00
checkpatch.pl scripts: checkpatch.pl: suppress warnings about MAINTAINERS 2020-11-21 17:58:25 +08:00
clean-package.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
cleanfile update source 2017-09-06 19:19:45 +08:00
cleanpatch update source 2017-09-06 19:19:45 +08:00
combined-ext-image.sh update to R7.5.4 2018-01-15 18:26:41 +08:00
combined-image.sh update source 2017-09-06 19:19:45 +08:00
config.guess Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
config.rpath update source 2017-09-06 19:19:45 +08:00
config.sub Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
const_structs.checkpatch scripts: add const_structs.checkpatch for checkpatch.pl 2020-11-21 17:58:30 +08:00
deptest.sh update source 2017-09-06 19:19:45 +08:00
diffconfig.sh update source 2017-09-06 19:19:45 +08:00
dl_cleanup.py update source 2017-09-06 19:19:45 +08:00
dl_github_archive.py sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
download.pl download: add mirror alias for Debian 2021-02-27 12:11:33 +08:00
dump-target-info.pl scripts: Add Buildbot dump-target-info.pl script 2020-08-04 23:54:03 +08:00
env scripts/env: Fix 56f813674a scripts/env: use command -v instead of which 2020-07-12 23:11:33 +08:00
ext-toolchain.sh update source 2017-09-06 19:19:45 +08:00
feeds scripts/feed: no warn on toolchain/linux overwrite 2021-01-07 09:57:10 +08:00
fixup-makefile.pl sync with OpenWrt trunk 2018-09-07 13:43:55 +08:00
functions.sh images: Fix sysupgrade.tar for devices with NOR flash 2020-12-23 11:48:18 +08:00
gen_image_generic.sh scripts/gen_image_generic.sh: use /bin/sh 2020-07-12 12:17:33 +08:00
gen-dependencies.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
get_source_date_epoch.sh build: get_source_date_epoch allow external repos 2020-09-01 17:29:22 +08:00
getver.sh scripts/getver.sh: silence rev-list errors 2020-11-03 11:53:49 +08:00
ipkg-build scripts: ipkg-build: simplify uid/gid resolving 2020-09-15 11:37:24 +08:00
ipkg-make-index.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
ipkg-remove sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
json_add_image_info.py build/json: add filesystem information 2020-12-19 18:04:46 +08:00
json_overview_image_info.py build,json: fix compatibility with Python 3.5 2020-11-14 23:34:21 +08:00
kconfig.pl scripts/kconfig.pl: allow regex syntax in filtering out config entries 2020-11-14 13:51:51 +08:00
linksys-image.sh build: add a script for generating Linksys EA6350v3 factory image 2019-03-07 19:45:12 +08:00
make-ipkg-dir.sh update source 2017-09-06 19:19:45 +08:00
md5sum update source 2017-09-06 19:19:45 +08:00
metadata.pm build: drop ABI version from metadata 2021-02-15 12:17:04 +08:00
mkhash.c scripts: add -N option to mkhash for printing without newline 2020-12-23 11:34:20 +08:00
mkits-qsdk-ipq-image.sh ipq40xx: add G-DOCK 2.0 (P&W R619AC) support 2019-10-22 23:14:35 -07:00
mkits.sh image: add support for building FIT image with filesystem 2021-03-02 22:17:37 +08:00
om-fwupgradecfg-gen.sh ath79: Add support for Plasma Cloud PA300 2020-12-23 11:50:07 +08:00
package-metadata.pl build: drop ABI version from metadata 2021-02-15 12:17:04 +08:00
pad_image update source 2017-09-06 19:19:45 +08:00
patch-kernel.sh update source 2017-09-06 19:19:45 +08:00
patch-specs.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
portable_date.sh update source 2017-09-06 19:19:45 +08:00
qemustart Merge Mainline 2021-01-02 12:13:39 +08:00
redboot-script.pl update source 2017-09-06 19:19:45 +08:00
relink-lib.sh update source 2017-09-06 19:19:45 +08:00
remote-gdb sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
rstrip.sh Merge branch master of https://github.com/coolsnowwolf/lede 2019-01-03 19:29:28 +08:00
sercomm-crypto.py scripts: support Sercomm crypto 2020-06-02 18:08:36 +08:00
sercomm-partition-tag.py scripts: support Sercomm partition tags 2020-06-02 18:08:09 +08:00
sercomm-payload.py scripts: support Sercomm load tags 2020-06-03 11:42:15 +08:00
sign_images.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
size_compare.sh scripts: add size_compare.sh 2020-11-28 18:27:07 +08:00
slugimage.pl sync with OpenWrt trunk 2018-09-07 13:43:55 +08:00
spelling.txt scripts: add spelling.txt for checkpatch.pl 2020-11-14 13:45:59 +08:00
srecimage.pl update source 2017-09-06 19:19:45 +08:00
strip-kmod.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
symlink-tree.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
sysupgrade-tar.sh sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
target-metadata.pl scripts: target-metadata don't add PROFILES twice 2021-01-16 12:05:05 +08:00
time.pl sync build script for OpenWrt 19.07 2020-02-21 02:41:00 +08:00
timestamp.pl update source 2017-09-06 19:19:45 +08:00
ubinize-image.sh ramips: mt7621: add support for Netgear R6800 2019-12-13 08:25:54 -08:00