mirror of
https://github.com/openwrt/openwrt.git
synced 2025-12-21 17:04:28 +04:00
scripts/mkits.sh: move out .pagesync generation for RootFS blob
It's expected the mkits.sh script to generate only the relevant DTS entry and have all the blob already prepared to use for mkimage. This is not the case for the RootFS case where the script generates a .pagesync with the dd command. To better handle this, drop the dd command and instead error out if the .pagesync blob is not found if RootFS is used. Adapt the generic fit build in image-commands.mk to call the dd for .pagesync right before mkits.sh. Link: https://github.com/openwrt/openwrt/pull/20492 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
@@ -82,6 +82,11 @@ if [ -z "${ARCH}" ] || [ -z "${COMPRESS}" ] || [ -z "${LOAD_ADDR}" ] || \
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ -n "${ROOTFS}" ] && [ ! -f "${ROOTFS}".pagesync ]; then
|
||||
echo "Missing .pagesync blob for RootFS blob '${ROOTFS}'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ARCH_UPPER=$(echo "$ARCH" | tr '[:lower:]' '[:upper:]')
|
||||
|
||||
if [ -n "${COMPATIBLE}" ]; then
|
||||
@@ -136,7 +141,6 @@ fi
|
||||
|
||||
|
||||
if [ -n "${ROOTFS}" ]; then
|
||||
dd if="${ROOTFS}" of="${ROOTFS}.pagesync" bs=4096 conv=sync
|
||||
ROOTFS_NODE="
|
||||
rootfs${REFERENCE_CHAR}$ROOTFSNUM {
|
||||
description = \"${ARCH_UPPER} OpenWrt ${DEVICE} rootfs\";
|
||||
|
||||
Reference in New Issue
Block a user