From 005e932d7600444f1b8a3c0d2ed4ed6932af111a Mon Sep 17 00:00:00 2001 From: Jeffrey Townsend Date: Fri, 18 Dec 2015 13:44:52 -0800 Subject: [PATCH] Installer fixes. --- .../installer/legacy/builds/ppc-install-lib | 56 +++++++++---------- .../installer/legacy/builds/ppc-installer.sh | 8 ++- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/builds/powerpc/installer/legacy/builds/ppc-install-lib b/builds/powerpc/installer/legacy/builds/ppc-install-lib index 2b4ca708..504cc0bc 100644 --- a/builds/powerpc/installer/legacy/builds/ppc-install-lib +++ b/builds/powerpc/installer/legacy/builds/ppc-install-lib @@ -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 .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 } diff --git a/builds/powerpc/installer/legacy/builds/ppc-installer.sh b/builds/powerpc/installer/legacy/builds/ppc-installer.sh index 67594c2f..2407b0fa 100644 --- a/builds/powerpc/installer/legacy/builds/ppc-installer.sh +++ b/builds/powerpc/installer/legacy/builds/ppc-installer.sh @@ -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