mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
Installer fixes.
This commit is contained in:
@@ -198,39 +198,39 @@ installer_platform_loader() {
|
||||
local blockdev=$1
|
||||
local partno=$2
|
||||
|
||||
|
||||
if [ -f "${installer_dir}/${installer_platform}.itb" ]; then
|
||||
# Platform-specfic FIT Image
|
||||
#
|
||||
# Platform-specfic FIT Image already provided.
|
||||
#
|
||||
local loader="${installer_dir}/${installer_platform}.itb"
|
||||
|
||||
elif [ -f "${installer_dir}/onl-loader-fit.itb" ]; then
|
||||
# Common FIT Image
|
||||
#
|
||||
# Common FIT image.
|
||||
#
|
||||
local loader="${installer_dir}/onl-loader-fit.itb";
|
||||
elif [ "${platform_loader}" ]; then
|
||||
# Platform specific override
|
||||
local loader="${platform_loader}"
|
||||
else
|
||||
# Default platform loader
|
||||
local loader="${installer_dir}/switchlight.${installer_platform}.loader"
|
||||
fi
|
||||
|
||||
if [ "${platform_loader_dst_name}" ]; then
|
||||
local loaderdst="${platform_loader_dst_name}"
|
||||
else
|
||||
local loaderdst="switchlight-loader"
|
||||
fi
|
||||
|
||||
|
||||
if [ -f "${loader}" ]; then
|
||||
installer_say "Installing the Switchlight Loader..."
|
||||
|
||||
if [ "${platform_loader_raw}" ]; then
|
||||
installer_partition_dd ${blockdev} ${partno} ${loader}
|
||||
else
|
||||
installer_partition_cp ${blockdev} ${partno} ${loader} ${loaderdst}
|
||||
fi
|
||||
else
|
||||
installer_say "The platform loader file is missing. This is unexpected - ${loader}"
|
||||
installer_say "There is not FIT image available in the installer. This is a bug."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Cannonical name for all ITB files for each platform
|
||||
# is <platform>.itb.
|
||||
#
|
||||
# This allows you to use the ONL platform configuration settings
|
||||
# with your own initrd with constant and consistent naming.
|
||||
#
|
||||
loaderdst="${installer_platform}.itb"
|
||||
|
||||
installer_say "Installing the Open Network Linux Loader..."
|
||||
|
||||
if [ "${platform_loader_raw}" ]; then
|
||||
installer_partition_dd ${blockdev} ${partno} ${loader}
|
||||
else
|
||||
installer_partition_cp ${blockdev} ${partno} ${loader} ${loaderdst}
|
||||
fi
|
||||
}
|
||||
|
||||
############################################################
|
||||
@@ -286,10 +286,10 @@ installer_platform_swi() {
|
||||
if [ ! ${SWIDST} ]; then
|
||||
SWIDST="$(basename ${SWISRC})"
|
||||
fi
|
||||
installer_say "Installing SwitchLight Software Image (${SWIDST})..."
|
||||
installer_say "Installing Open Network Linux Software Image (${SWIDST})..."
|
||||
installer_partition_cp ${blockdev} ${partno} ${SWISRC} ${SWIDST}
|
||||
else
|
||||
installer_say "No SwitchLight Software Image available for installation. Post-install ZTN installation will be required."
|
||||
installer_say "No Open Network Linux Software Image available for installation. Post-install ZTN installation will be required."
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ mount -o remount,size=1024M /tmp || true
|
||||
|
||||
|
||||
# Unpack our distribution
|
||||
installer_say "Unpacking SwitchLight installer files..."
|
||||
installer_say "Unpacking Open Network Linux installer files..."
|
||||
installer_dir=`pwd`
|
||||
if test "$SFX_PAD"; then
|
||||
# ha ha, busybox cannot exclude multiple files
|
||||
@@ -75,6 +75,7 @@ installer_say "Detected platform: ${installer_platform}"
|
||||
installer_platform_dir="${installer_dir}/lib/platform-config/${installer_platform}"
|
||||
if [ -d "${installer_platform_dir}" ]; then
|
||||
# Source the installer scriptlet
|
||||
ONL_PLATFORM=${installer_platform}
|
||||
. "${installer_platform_dir}/onl/install/${installer_platform}.sh"
|
||||
else
|
||||
installer_say "This installer does not support the ${installer_platform} platform."
|
||||
@@ -88,11 +89,12 @@ fi
|
||||
# The platform script must provide this function. This performs the actual install for the platform.
|
||||
platform_installer
|
||||
|
||||
installer_say "Setting ONIE nos_bootcmd to boot Switch Light"
|
||||
installer_say "Configuring system to boot Open Network Linux..."
|
||||
envf=/tmp/.env
|
||||
cp /dev/null "${envf}"
|
||||
echo "nos_bootcmd ${platform_bootcmd}" >> "${envf}"
|
||||
installer_say "Install finished. Rebooting to Switch Light."
|
||||
fw_setenv_f_s "${envf}"
|
||||
installer_say "Install finished. Rebooting to Open Network Linux."
|
||||
sleep 3
|
||||
reboot
|
||||
exit
|
||||
|
||||
Reference in New Issue
Block a user