1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-17 04:33:57 +02:00
openwrt/target/linux/layerscape/image/gen_sdcard_head_img.sh
Pawel Dembicki a254279a6c layerscape: Change to combined rootfs on sd images
At this moment layerscape images are ext4 only. It causes problem with
save changes durring sysupgrade and make "firstboot" and failsafe mode
useless.

This patch changes sd-card images to squashfs + f2fs combined images.
To make place, for saving config, kernel space ar now ext4 partition
with fit kernel.

This method of image generation is similar to rest of OpenWrt sd-card
targets.

Reviewed-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
[reword README, reword DEVICE_COMPAT_MESSAGE, keep original indent]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
2020-10-26 00:40:12 +01:00

25 lines
525 B
Bash
Executable File

#!/bin/sh
#
# Copyright 2018 NXP
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
set -x
[ $# -eq 5 ] || {
echo "SYNTAX: $0 <file> <kernel part offset> <kernel size> <rootfs part offset> <rootfs size>"
exit 1
}
OUTPUT="$1"
KERNELOFFSET="$(($2 * 1024))"
KERNELSIZE="$3"
ROOTFSOFFSET="$(($4 * 1024))"
ROOTFSSIZE="$5"
head=4
sect=63
set $(ptgen -o $OUTPUT -h $head -s $sect -t 83 -p ${KERNELSIZE}M@${KERNELOFFSET} -p ${ROOTFSSIZE}M@${ROOTFSOFFSET})