Unnamed
public text v1 · immutable echo "mounting main filesystem ..."
mkdir /jffs2
mount -t jffs2 $NAND_MTD /jffs2
mkdir /ubifs
mkdir /union
if ! mount -t ubifs ubi0:rootfs /ubifs; then
echo "Failed to mount mtd5 as ubifs, falling back to tmpfs for union mount"
mount -w -t tmpfs tmpfs /ubifs
fi
mount -t unionfs -o dirs=/ubifs=rw:/jffs2=ro unionfs /union
root_mount=/union
exec switch_root -c /dev/console $root_mount /sbin/init 5