apm821xx: build squashfs-rootfs images for the MBL
authorChristian Lamparter <[email protected]>
Sun, 29 Jul 2018 09:55:15 +0000 (11:55 +0200)
committerJo-Philipp Wich <[email protected]>
Tue, 18 Dec 2018 16:47:37 +0000 (17:47 +0100)
commitb8737dba9dc432e7106ae228c65283308bc709a1
treeb21d931c5f3a676f75a5758e30abc5ddbf8e83a7
parent8a44e889afad58cf11ce7f6cbf74c7e5ca9503dc
apm821xx: build squashfs-rootfs images for the MBL

This patch adds support for squashfs as the root filesystem.

advantages:
 - migrate from a existing -ext4 installation and back
   with the sysupgrade utility
 - existing partition layout will not be lost during switch
 - slightly smaller image size as compared to the -ext4 image.

disadvantages:
 - needs f2fs + tools. This is because fstools rootdisk.c decides based
   on the partition size (currently root partitions > 100 MiB) f2fs is
   used as the rootfs_data filesystem.
 - rootfs_data is placed into the rootfs partition after the squashfs.
   This makes it difficult for tools that expect a /dev/sda${X} device.
   It also makes it difficult for data recovery tools as they might not
   expect to find a embedded partition or will be slightly confused.
   ... or will not support f2fs.

For people with existing build configurations: make sure to include mkf2fs
and f2fsck packages into the image. Otherwise the new -squashfs image will
only boot from the ram-overlay.

Note:
All overlay data (configurations/all installed packages/...) will be
placed in inside the rootfs partition (i.e. /dev/sda2) just after the
squashfs image.

Signed-off-by: Christian Lamparter <[email protected]>
(backported from aed4799d6d05d89dbca1bd5f14cc3d09ac563f3b)
target/linux/apm821xx/image/Makefile
target/linux/apm821xx/image/mbl_gen_hdd_img.sh
target/linux/apm821xx/sata/config-default
target/linux/apm821xx/sata/target.mk