ccmp1: remove usage of $singlemtdsys variable
On the CCMP1 SOMs, we only consider a single system partition called UBI, with many UBI volumes. The variable 'singlemtdsys' allowed to change between this and a system with multiple MTD partitions with one UBI volume each (old approach on CC6UL). This commit removes the variable and uses the logic as if it was set. Signed-off-by: Hector Palacios <hector.palacios@digi.com>
This commit is contained in:
parent
30022f556b
commit
e346958131
|
|
@ -128,7 +128,7 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Restore 'singlemtdsys' and 'dualboot' if previously set
|
# - Restore 'dualboot' if previously set
|
||||||
# - Run 'partition_nand_linux' script to re-partition the NAND if needed
|
# - Run 'partition_nand_linux' script to re-partition the NAND if needed
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
|
|
@ -140,15 +140,10 @@ fi
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv singlemtdsys ${singlemtdsys};
|
|
||||||
setenv dualboot ${dualboot};
|
setenv dualboot ${dualboot};
|
||||||
run partition_nand_linux;
|
run partition_nand_linux;
|
||||||
saveenv;
|
saveenv;
|
||||||
if test \"\$\{singlemtdsys\}\" = yes; then
|
run ubivolscript;
|
||||||
run ubivolscript;
|
|
||||||
else
|
|
||||||
force_erase="-e";
|
|
||||||
fi;
|
|
||||||
if test \"\$\{dualboot\}\" = yes; then
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -236,9 +231,6 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
if test \"\$\{singlemtdsys\}\" != yes; then
|
|
||||||
nand erase.part update;
|
|
||||||
fi;
|
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
fi;
|
fi;
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ fi
|
||||||
|
|
||||||
# Set 'bootcmd' to the second part of the script that will
|
# Set 'bootcmd' to the second part of the script that will
|
||||||
# - Reset environment to defaults
|
# - Reset environment to defaults
|
||||||
# - Restore 'singlemtdsys' and 'dualboot' if previously set
|
# - Restore 'dualboot' if previously set
|
||||||
# - Run 'partition_nand_linux' script to re-partition the NAND if needed
|
# - Run 'partition_nand_linux' script to re-partition the NAND if needed
|
||||||
# - Save the environment
|
# - Save the environment
|
||||||
# - If Dual Boot
|
# - If Dual Boot
|
||||||
|
|
@ -140,15 +140,10 @@ fi
|
||||||
# - Run 'recovery' and let the system boot after
|
# - Run 'recovery' and let the system boot after
|
||||||
setenv bootcmd "
|
setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv singlemtdsys ${singlemtdsys};
|
|
||||||
setenv dualboot ${dualboot};
|
setenv dualboot ${dualboot};
|
||||||
run partition_nand_linux;
|
run partition_nand_linux;
|
||||||
saveenv;
|
saveenv;
|
||||||
if test \"\$\{singlemtdsys\}\" = yes; then
|
run ubivolscript;
|
||||||
run ubivolscript;
|
|
||||||
else
|
|
||||||
force_erase="-e";
|
|
||||||
fi;
|
|
||||||
usb start;
|
usb start;
|
||||||
if test \"\$\{dualboot\}\" = yes; then
|
if test \"\$\{dualboot\}\" = yes; then
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -237,9 +232,6 @@ setenv bootcmd "
|
||||||
exit;
|
exit;
|
||||||
fi;
|
fi;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
if test \"\$\{singlemtdsys\}\" != yes; then
|
|
||||||
nand erase.part update;
|
|
||||||
fi;
|
|
||||||
setenv boot_recovery yes;
|
setenv boot_recovery yes;
|
||||||
setenv recovery_command wipe_update;
|
setenv recovery_command wipe_update;
|
||||||
fi;
|
fi;
|
||||||
|
|
|
||||||
|
|
@ -58,14 +58,6 @@ part_update()
|
||||||
echo "====================================================================================="
|
echo "====================================================================================="
|
||||||
echo "\033[0m"
|
echo "\033[0m"
|
||||||
|
|
||||||
# When in Multi-MTD mode, pass -e to update command to force the erase
|
|
||||||
# of the MTD partition before programming. This is usually done by
|
|
||||||
# 'update' command except when a UBI volume is already found.
|
|
||||||
# On the install script, the MTD partition table may have changed, so
|
|
||||||
# we'd better clean the partition.
|
|
||||||
if [ "${SINGLEMTDSYS}" != true ]; then
|
|
||||||
ERASE="-e"
|
|
||||||
fi
|
|
||||||
uuu fb: download -f "${2}"
|
uuu fb: download -f "${2}"
|
||||||
uuu "fb[-t ${3}]:" ucmd update "${1}" ram \${fastboot_buffer} \${fastboot_bytes} ${ERASE}
|
uuu "fb[-t ${3}]:" ucmd update "${1}" ram \${fastboot_buffer} \${fastboot_bytes} ${ERASE}
|
||||||
}
|
}
|
||||||
|
|
@ -97,12 +89,6 @@ if [ "${dualboot}" = "yes" ]; then
|
||||||
DUALBOOT=true;
|
DUALBOOT=true;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check if singlemtdsys variable is active
|
|
||||||
singlemtdsys=$(getenv "singlemtdsys")
|
|
||||||
if [ "${singlemtdsys}" = "yes" ]; then
|
|
||||||
SINGLEMTDSYS=true;
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Determining image files to use..."
|
echo "Determining image files to use..."
|
||||||
|
|
||||||
|
|
@ -238,7 +224,6 @@ part_update "uboot" "${INSTALL_UBOOT_FILENAME}" 5000
|
||||||
uuu fb: ucmd setenv bootcmd "
|
uuu fb: ucmd setenv bootcmd "
|
||||||
env default -a;
|
env default -a;
|
||||||
setenv dualboot \${dualboot};
|
setenv dualboot \${dualboot};
|
||||||
setenv singlemtdsys \${singlemtdsys};
|
|
||||||
saveenv;
|
saveenv;
|
||||||
echo \"\";
|
echo \"\";
|
||||||
echo \"\";
|
echo \"\";
|
||||||
|
|
@ -260,10 +245,8 @@ uuu fb: ucmd setenv fastboot_buffer \${loadaddr}
|
||||||
# Create partition table
|
# Create partition table
|
||||||
uuu "fb[-t 10000]:" ucmd run partition_nand_linux
|
uuu "fb[-t 10000]:" ucmd run partition_nand_linux
|
||||||
|
|
||||||
if [ "${SINGLEMTDSYS}" = true ]; then
|
uuu "fb[-t 30000]:" ucmd nand erase.part system
|
||||||
uuu "fb[-t 30000]:" ucmd nand erase.part system
|
uuu "fb[-t 10000]:" ucmd run ubivolscript
|
||||||
uuu "fb[-t 10000]:" ucmd run ubivolscript
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${DUALBOOT}" = true ]; then
|
if [ "${DUALBOOT}" = true ]; then
|
||||||
# Update Linux A
|
# Update Linux A
|
||||||
|
|
@ -283,7 +266,7 @@ else
|
||||||
part_update "${ROOTFS_NAME}" "${INSTALL_ROOTFS_FILENAME}" 90000
|
part_update "${ROOTFS_NAME}" "${INSTALL_ROOTFS_FILENAME}" 90000
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${SINGLEMTDSYS}" != true ] && [ "${DUALBOOT}" != true ]; then
|
if [ "${DUALBOOT}" != true ]; then
|
||||||
# Erase the 'Update' partition
|
# Erase the 'Update' partition
|
||||||
uuu "fb[-t 20000]:" ucmd nand erase.part update
|
uuu "fb[-t 20000]:" ucmd nand erase.part update
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,6 @@ else
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
SINGLEMTDSYS="$(fw_printenv -n singlemtdsys 2>/dev/null)"
|
|
||||||
|
|
||||||
# Create mount point if needed
|
# Create mount point if needed
|
||||||
MOUNTPOINT="/mnt/${PARTNAME}"
|
MOUNTPOINT="/mnt/${PARTNAME}"
|
||||||
[ -d "${MOUNTPOINT}" ] || mkdir -p ${MOUNTPOINT}
|
[ -d "${MOUNTPOINT}" ] || mkdir -p ${MOUNTPOINT}
|
||||||
|
|
@ -93,7 +91,7 @@ elif [ "${SUBSYSTEM}" = "mtd" ]; then
|
||||||
logger -t udev "ERROR: Could not mount '${PARTNAME}' partition, volume not found"
|
logger -t udev "ERROR: Could not mount '${PARTNAME}' partition, volume not found"
|
||||||
rmdir --ignore-fail-on-non-empty ${MOUNTPOINT}
|
rmdir --ignore-fail-on-non-empty ${MOUNTPOINT}
|
||||||
fi
|
fi
|
||||||
elif [ "${SUBSYSTEM}" = "ubi" ] && [ "${SINGLEMTDSYS}" = "yes" ]; then
|
elif [ "${SUBSYSTEM}" = "ubi" ]; then
|
||||||
# In the case of a 'system' partition with many UBI volumes, the device
|
# In the case of a 'system' partition with many UBI volumes, the device
|
||||||
# is always /dev/ubi0
|
# is always /dev/ubi0
|
||||||
# Mount the volume.
|
# Mount the volume.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue