Merge pull request #5764 from ToKe79/le-master/install2emmc

install2emmc: use SYSTEM_SIZE and DISTRONAME in script
This commit is contained in:
Christian Hewitt 2021-11-15 06:34:43 +04:00 committed by GitHub
commit e94229e318
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 4 deletions

View File

@ -5,7 +5,7 @@
TMP=/tmp/mnt/
SYSTEM_SIZE=512
SYSTEM_SIZE=@SYSTEM_SIZE@
UUID_SYSTEM="$(date '+%d%m')-$(date '+%M%S')"
UUID_STORAGE="$(uuidgen)"
BOOT=$(grep /flash /proc/mounts | awk '{print $1}' | sed 's/p[012]//g')
@ -30,7 +30,7 @@ fi
echo ""
echo -e "\033[36m==============================="
echo "Installing LibreELEC to eMMC"
echo "Installing @DISTRONAME@ to eMMC"
echo -e "===============================\033[37m"
echo ""
echo "eMMC found at ${DISK}"

View File

@ -5,7 +5,7 @@
TMP=/tmp/mnt/
SYSTEM_SIZE=512
SYSTEM_SIZE=@SYSTEM_SIZE@
UUID_SYSTEM="$(date '+%d%m')-$(date '+%M%S')"
UUID_STORAGE="$(uuidgen)"
BOOT=$(grep /flash /proc/mounts | awk '{print $1}' | sed 's/p[012]//g')
@ -37,7 +37,7 @@ fi
echo ""
echo -e "\033[36m==============================="
echo "Installing LibreELEC to eMMC"
echo "Installing @DISTRONAME@ to eMMC"
echo -e "===============================\033[37m"
echo ""
echo "eMMC found at ${DISK}"

View File

@ -203,6 +203,14 @@ if [ -n "${DEVICE}" -a -d "${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/filesyste
done
fi
# Replace placeholders with values in install script to eMMC
if [ -f ${INSTALL}/usr/bin/install2emmc ]; then
sed -e "s%@SYSTEM_SIZE@%${SYSTEM_SIZE}%g" \
-i ${INSTALL}/usr/bin/install2emmc
sed -e "s%@DISTRONAME@%${DISTRONAME}%g" \
-i ${INSTALL}/usr/bin/install2emmc
fi
# Run depmod for base overlay modules
MODVER=$(basename $(ls -d ${INSTALL}/usr/lib/kernel-overlays/base/lib/modules/*))
find ${INSTALL}/usr/lib/kernel-overlays/base/lib/modules/${MODVER}/ -name *.ko | \