installer: squashfs: add fallback option to flash squashfs images
If the default r/w rootfs is not found it will try to do a fallback to the squashfs image. In the nand devices additionally we need to set the rootfstype to squashfs. https://onedigi.atlassian.net/browse/DEL-8638 Signed-off-by: Francisco Gil <francisco.gilmartinez@digi.com>
This commit is contained in:
parent
dbf1db98cf
commit
1e513f89a7
|
|
@ -56,12 +56,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the SD card
|
# Check for presence of firmware files on the SD card
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
|
||||||
|
|
@ -56,12 +56,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the USB
|
# Check for presence of firmware files on the USB
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
|
||||||
|
|
@ -164,8 +164,8 @@ if [ -f ${COMPRESSED_ROOTFS_IMAGE} ] && [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; the
|
||||||
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify existance of files before starting the update
|
# Verify existence of files before starting the update
|
||||||
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}"
|
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}"
|
||||||
for f in ${FILES}; do
|
for f in ${FILES}; do
|
||||||
if [ ! -f ${f} ]; then
|
if [ ! -f ${f} ]; then
|
||||||
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
||||||
|
|
@ -173,6 +173,17 @@ for f in ${FILES}; do
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.squashfs"
|
||||||
|
echo "\033[32m[INFO] Trying with file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
if [ ! -f "${INSTALL_ROOTFS_FILENAME}" ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
ABORT=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the SD card
|
# Check for presence of firmware files on the SD card
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
|
||||||
|
|
@ -67,12 +67,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the USB
|
# Check for presence of firmware files on the USB
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
|
||||||
|
|
@ -182,8 +182,8 @@ if [ -f ${COMPRESSED_ROOTFS_IMAGE} ] && [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; the
|
||||||
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify existance of files before starting the update
|
# Verify existence of files before starting the update
|
||||||
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}"
|
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}"
|
||||||
for f in ${FILES}; do
|
for f in ${FILES}; do
|
||||||
if [ ! -f ${f} ]; then
|
if [ ! -f ${f} ]; then
|
||||||
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
||||||
|
|
@ -191,6 +191,17 @@ for f in ${FILES}; do
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.squashfs"
|
||||||
|
echo "\033[32m[INFO] Trying with file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
if [ ! -f "${INSTALL_ROOTFS_FILENAME}" ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
ABORT=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,24 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.ubifs
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ubifs
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ubifs
|
||||||
|
|
||||||
# Check for presence of firmware files on the SD card
|
# Check for presence of firmware files on the SD card
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
else
|
||||||
|
setenv rootfstype squashfs
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
@ -148,6 +160,7 @@ setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv singlemtdsys ${singlemtdsys};
|
setenv singlemtdsys ${singlemtdsys};
|
||||||
setenv dualboot ${dualboot};
|
setenv dualboot ${dualboot};
|
||||||
|
setenv rootfstype ${rootfstype};
|
||||||
setenv install_dualboot ${install_dualboot};
|
setenv install_dualboot ${install_dualboot};
|
||||||
run partition_nand_linux;
|
run partition_nand_linux;
|
||||||
saveenv;
|
saveenv;
|
||||||
|
|
|
||||||
|
|
@ -60,12 +60,26 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.ubifs
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ubifs
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ubifs
|
||||||
|
|
||||||
# Check for presence of firmware files on the USB
|
# Check for presence of firmware files on the USB
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
else
|
||||||
|
setenv rootfstype squashfs
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
setenv rootfstype
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
@ -148,6 +162,7 @@ setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv singlemtdsys ${singlemtdsys};
|
setenv singlemtdsys ${singlemtdsys};
|
||||||
setenv dualboot ${dualboot};
|
setenv dualboot ${dualboot};
|
||||||
|
setenv rootfstype ${rootfstype};
|
||||||
setenv install_dualboot ${install_dualboot};
|
setenv install_dualboot ${install_dualboot};
|
||||||
run partition_nand_linux;
|
run partition_nand_linux;
|
||||||
saveenv;
|
saveenv;
|
||||||
|
|
|
||||||
|
|
@ -171,8 +171,8 @@ INSTALL_LINUX_FILENAME="${BASEFILENAME}-##MACHINE##.boot.ubifs"
|
||||||
INSTALL_RECOVERY_FILENAME="${BASEFILENAME}-##MACHINE##.recovery.ubifs"
|
INSTALL_RECOVERY_FILENAME="${BASEFILENAME}-##MACHINE##.recovery.ubifs"
|
||||||
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.ubifs"
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.ubifs"
|
||||||
|
|
||||||
# Verify existance of files before starting the update
|
# Verify existence of files before starting the update
|
||||||
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}"
|
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}"
|
||||||
for f in ${FILES}; do
|
for f in ${FILES}; do
|
||||||
if [ ! -f ${f} ]; then
|
if [ ! -f ${f} ]; then
|
||||||
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
||||||
|
|
@ -180,6 +180,19 @@ for f in ${FILES}; do
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.squashfs"
|
||||||
|
echo "\033[32m[INFO] Trying with file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
if [ -f "${INSTALL_ROOTFS_FILENAME}" ]; then
|
||||||
|
SQUASHFS=true
|
||||||
|
else
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
ABORT=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -303,6 +316,12 @@ if [ "${DUALBOOT}" != true ]; then
|
||||||
uuu fb: ucmd setenv boot_recovery yes
|
uuu fb: ucmd setenv boot_recovery yes
|
||||||
uuu fb: ucmd setenv recovery_command wipe_update
|
uuu fb: ucmd setenv recovery_command wipe_update
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set the rootfstype if squashfs
|
||||||
|
if [ "${SQUASHFS}" = true ]; then
|
||||||
|
uuu fb: ucmd setenv rootfstype squashfs
|
||||||
|
fi
|
||||||
|
|
||||||
uuu fb: ucmd saveenv
|
uuu fb: ucmd saveenv
|
||||||
|
|
||||||
# Reset the target
|
# Reset the target
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the SD card
|
# Check for presence of firmware files on the SD card
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the USB
|
# Check for presence of firmware files on the USB
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
|
||||||
|
|
@ -130,8 +130,8 @@ if [ -f ${COMPRESSED_ROOTFS_IMAGE} ] && [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; the
|
||||||
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify existance of files before starting the update
|
# Verify existence of files before starting the update
|
||||||
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}"
|
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}"
|
||||||
for f in ${FILES}; do
|
for f in ${FILES}; do
|
||||||
if [ ! -f ${f} ]; then
|
if [ ! -f ${f} ]; then
|
||||||
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
||||||
|
|
@ -139,6 +139,17 @@ for f in ${FILES}; do
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.squashfs"
|
||||||
|
echo "\033[32m[INFO] Trying with file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
if [ ! -f "${INSTALL_ROOTFS_FILENAME}" ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
ABORT=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the SD card
|
# Check for presence of firmware files on the SD card
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
|
||||||
|
|
@ -39,12 +39,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the USB
|
# Check for presence of firmware files on the USB
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
|
||||||
|
|
@ -137,8 +137,8 @@ if [ -f ${COMPRESSED_ROOTFS_IMAGE} ] && [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; the
|
||||||
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify existance of files before starting the update
|
# Verify existence of files before starting the update
|
||||||
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}"
|
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}"
|
||||||
for f in ${FILES}; do
|
for f in ${FILES}; do
|
||||||
if [ ! -f ${f} ]; then
|
if [ ! -f ${f} ]; then
|
||||||
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
||||||
|
|
@ -146,6 +146,17 @@ for f in ${FILES}; do
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.squashfs"
|
||||||
|
echo "\033[32m[INFO] Trying with file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
if [ ! -f "${INSTALL_ROOTFS_FILENAME}" ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
ABORT=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the SD card
|
# Check for presence of firmware files on the SD card
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "Aborted.";
|
echo "Aborted.";
|
||||||
exit;
|
exit;
|
||||||
|
|
|
||||||
|
|
@ -27,12 +27,22 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.vfat
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ext4
|
||||||
|
|
||||||
# Check for presence of firmware files on the USB
|
# Check for presence of firmware files on the USB
|
||||||
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "Aborted.";
|
echo "Aborted.";
|
||||||
exit;
|
exit;
|
||||||
|
|
|
||||||
|
|
@ -130,8 +130,8 @@ if [ -f ${COMPRESSED_ROOTFS_IMAGE} ] && [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; the
|
||||||
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
gzip -d -k -f "${COMPRESSED_ROOTFS_IMAGE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Verify existance of files before starting the update
|
# Verify existence of files before starting the update
|
||||||
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}"
|
FILES="${INSTALL_UBOOT_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}"
|
||||||
for f in ${FILES}; do
|
for f in ${FILES}; do
|
||||||
if [ ! -f ${f} ]; then
|
if [ ! -f ${f} ]; then
|
||||||
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
||||||
|
|
@ -139,6 +139,17 @@ for f in ${FILES}; do
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.squashfs"
|
||||||
|
echo "\033[32m[INFO] Trying with file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
if [ ! -f "${INSTALL_ROOTFS_FILENAME}" ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
ABORT=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,24 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.ubifs
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ubifs
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ubifs
|
||||||
|
|
||||||
# Check for presence of firmware files on the SD card
|
# Check for presence of firmware files on the SD card
|
||||||
for install_f in ${INSTALL_ATF_FILENAME} ${INSTALL_FIP_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_ATF_FILENAME} ${INSTALL_FIP_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
if test ! -e mmc ${INSTALL_MMCDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e mmc ${INSTALL_MMCDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
else
|
||||||
|
setenv rootfstype squashfs
|
||||||
|
fi
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
@ -147,6 +159,7 @@ fi
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot ${dualboot};
|
setenv dualboot ${dualboot};
|
||||||
|
setenv rootfstype ${rootfstype};
|
||||||
setenv install_dualboot ${install_dualboot};
|
setenv install_dualboot ${install_dualboot};
|
||||||
run ubivolscript;
|
run ubivolscript;
|
||||||
if test \"\$\{dualboot\}\" = yes; then
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
|
|
|
||||||
|
|
@ -28,12 +28,26 @@ setenv INSTALL_RECOVERY_FILENAME ${BASEFILENAME}-##MACHINE##.recovery.ubifs
|
||||||
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ubifs
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.ubifs
|
||||||
|
|
||||||
# Check for presence of firmware files on the USB
|
# Check for presence of firmware files on the USB
|
||||||
for install_f in ${INSTALL_ATF_FILENAME} ${INSTALL_FIP_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}; do
|
for install_f in ${INSTALL_ATF_FILENAME} ${INSTALL_FIP_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}; do
|
||||||
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
if test ! -e usb ${INSTALL_USBDEV} ${install_f}; then
|
||||||
echo "ERROR: Could not find file ${install_f}";
|
echo "ERROR: Could not find file ${install_f}";
|
||||||
install_abort=1;
|
install_abort=1;
|
||||||
fi;
|
fi;
|
||||||
done
|
done
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
setenv INSTALL_ROOTFS_FILENAME ${BASEFILENAME}-##MACHINE##.squashfs
|
||||||
|
echo "INFO: Trying with file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
if test ! -e usb ${INSTALL_USBDEV} ${INSTALL_ROOTFS_FILENAME}; then
|
||||||
|
echo "ERROR: Could not find file ${INSTALL_ROOTFS_FILENAME}";
|
||||||
|
install_abort=1;
|
||||||
|
else
|
||||||
|
setenv rootfstype squashfs
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
setenv rootfstype
|
||||||
|
fi
|
||||||
if test "${install_abort}" = "1"; then
|
if test "${install_abort}" = "1"; then
|
||||||
echo "To install a different image, set variable 'image-name', e.g.:"
|
echo "To install a different image, set variable 'image-name', e.g.:"
|
||||||
echo " => setenv image-name core-image-base"
|
echo " => setenv image-name core-image-base"
|
||||||
|
|
@ -147,6 +161,7 @@ fi
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot ${dualboot};
|
setenv dualboot ${dualboot};
|
||||||
|
setenv rootfstype ${rootfstype};
|
||||||
setenv install_dualboot ${install_dualboot};
|
setenv install_dualboot ${install_dualboot};
|
||||||
run ubivolscript;
|
run ubivolscript;
|
||||||
usb start;
|
usb start;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#===============================================================================
|
#===============================================================================
|
||||||
#
|
#
|
||||||
# Copyright (C) 2022 by Digi International Inc.
|
# Copyright (C) 2022-2023 by Digi International Inc.
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify it
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
|
@ -141,8 +141,8 @@ INSTALL_LINUX_FILENAME="${BASEFILENAME}-##MACHINE##.boot.ubifs"
|
||||||
INSTALL_RECOVERY_FILENAME="${BASEFILENAME}-##MACHINE##.recovery.ubifs"
|
INSTALL_RECOVERY_FILENAME="${BASEFILENAME}-##MACHINE##.recovery.ubifs"
|
||||||
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.ubifs"
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.ubifs"
|
||||||
|
|
||||||
# Verify existance of files before starting the update
|
# Verify existence of files before starting the update
|
||||||
FILES="${INSTALL_ATF_FILENAME} ${INSTALL_FIP_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME} ${INSTALL_ROOTFS_FILENAME}"
|
FILES="${INSTALL_ATF_FILENAME} ${INSTALL_FIP_FILENAME} ${INSTALL_LINUX_FILENAME} ${INSTALL_RECOVERY_FILENAME}"
|
||||||
for f in ${FILES}; do
|
for f in ${FILES}; do
|
||||||
if [ ! -f ${f} ]; then
|
if [ ! -f ${f} ]; then
|
||||||
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
echo "\033[31m[ERROR] Could not find file '${f}'\033[0m"
|
||||||
|
|
@ -150,6 +150,19 @@ for f in ${FILES}; do
|
||||||
fi
|
fi
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
# Verify what kind of rootfs is going to be programmed
|
||||||
|
if [ ! -f ${INSTALL_ROOTFS_FILENAME} ]; then
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
INSTALL_ROOTFS_FILENAME="${BASEFILENAME}-##MACHINE##.squashfs"
|
||||||
|
echo "\033[32m[INFO] Trying with file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
if [ -f "${INSTALL_ROOTFS_FILENAME}" ]; then
|
||||||
|
SQUASHFS=true
|
||||||
|
else
|
||||||
|
echo "\033[31m[ERROR] Could not find file '${INSTALL_ROOTFS_FILENAME}'\033[0m"
|
||||||
|
ABORT=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
[ "${ABORT}" = true ] && exit 1
|
[ "${ABORT}" = true ] && exit 1
|
||||||
|
|
||||||
# parts names
|
# parts names
|
||||||
|
|
@ -278,6 +291,12 @@ else
|
||||||
uuu fb: ucmd saveenv
|
uuu fb: ucmd saveenv
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set the rootfstype if squashfs
|
||||||
|
if [ "${SQUASHFS}" = true ]; then
|
||||||
|
uuu fb: ucmd setenv rootfstype squashfs
|
||||||
|
uuu fb: ucmd saveenv
|
||||||
|
fi
|
||||||
|
|
||||||
# Reset the target
|
# Reset the target
|
||||||
uuu fb: ucmd bootcount reset
|
uuu fb: ucmd bootcount reset
|
||||||
uuu fb: acmd reset
|
uuu fb: acmd reset
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue