diff --git a/.gitignore b/.gitignore index 81a7535baec7..00f97edcec97 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,5 @@ # Build system related .platform -.sku # Build artifacts fsroot/ @@ -39,3 +38,5 @@ dockers/docker-base/Dockerfile platform/*/docker-syncd-*/Dockerfile platform/*/docker-syncd-*-rpc/Dockerfile +# Installer-related files and directories +installer/x86_64/platforms/ diff --git a/build_image.sh b/build_image.sh index ab2e85b4836d..2da70ad57cf9 100755 --- a/build_image.sh +++ b/build_image.sh @@ -27,6 +27,18 @@ if [ "$IMAGE_TYPE" = "onie" ]; then echo "Build ONIE installer" mkdir -p `dirname $OUTPUT_ONIE_IMAGE` sudo rm -f $OUTPUT_ONIE_IMAGE + + # Copy platform-specific ONIE installer config files where onie-mk-demo.sh expects them + rm -rf ./installer/x86_64/platforms/ + mkdir -p ./installer/x86_64/platforms/ + for VENDOR in `ls ./device`; do + for PLATFORM in `ls ./device/$VENDOR`; do + if [ -f ./device/$VENDOR/$PLATFORM/installer.conf ]; then + cp ./device/$VENDOR/$PLATFORM/installer.conf ./installer/x86_64/platforms/$PLATFORM + fi + done + done + ## Generate an ONIE installer image ## Note: Don't leave blank between lines. It is single line command. ./onie-mk-demo.sh $TARGET_PLATFORM $TARGET_MACHINE $TARGET_PLATFORM-$TARGET_MACHINE-$ONIEIMAGE_VERSION \ diff --git a/installer/x86_64/platforms/x86_64-accton_as7512_32x-r0 b/device/accton/x86_64-accton_as7512_32x-r0/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-accton_as7512_32x-r0 rename to device/accton/x86_64-accton_as7512_32x-r0/installer.conf diff --git a/installer/x86_64/platforms/x86_64-centec_e582_48x6q-r0 b/device/centec/x86_64-centec_e582_48x6q-r0/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-centec_e582_48x6q-r0 rename to device/centec/x86_64-centec_e582_48x6q-r0/installer.conf diff --git a/installer/x86_64/dell-s6000-replace-reboot.sh b/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf old mode 100755 new mode 100644 similarity index 87% rename from installer/x86_64/dell-s6000-replace-reboot.sh rename to device/dell/x86_64-dell_s6000_s1220-r0/installer.conf index 5854133cc4a4..eb135bee0ff1 --- a/installer/x86_64/dell-s6000-replace-reboot.sh +++ b/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf @@ -1,4 +1,4 @@ -#!/bin/sh +ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="processor.max_cstate=1 intel_idle.max_cstate=0" echo "Replace ONIE reboot with Dell reset commands" diff --git a/installer/x86_64/platforms/x86_64-dell_s6100_c2538-r0 b/device/dell/x86_64-dell_s6100_c2538-r0/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-dell_s6100_c2538-r0 rename to device/dell/x86_64-dell_s6100_c2538-r0/installer.conf diff --git a/installer/x86_64/platforms/x86_64-dell_z9100_c2538-r0 b/device/dell/x86_64-dell_z9100_c2538-r0/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-dell_z9100_c2538-r0 rename to device/dell/x86_64-dell_z9100_c2538-r0/installer.conf diff --git a/installer/x86_64/platforms/x86_64-ew_es6220_x48q2h4-r0 b/device/embedway/x86_64-ew_es6220_x48q2h4-r0/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-ew_es6220_x48q2h4-r0 rename to device/embedway/x86_64-ew_es6220_x48q2h4-r0/installer.conf diff --git a/installer/x86_64/platforms/x86_64-facebook_wedge100-r0 b/device/facebook/x86_64-facebook_wedge100-r0/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-facebook_wedge100-r0 rename to device/facebook/x86_64-facebook_wedge100-r0/installer.conf diff --git a/installer/x86_64/platforms/x86_64-ingrasys_s9100-r0 b/device/ingrasys/x86_64-ingrasys_s9100-r0/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-ingrasys_s9100-r0 rename to device/ingrasys/x86_64-ingrasys_s9100-r0/installer.conf diff --git a/installer/x86_64/platforms/x86_64-mlnx_msn2700-r0 b/device/mellanox/x86_64-mlnx_msn2700-r0/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-mlnx_msn2700-r0 rename to device/mellanox/x86_64-mlnx_msn2700-r0/installer.conf diff --git a/installer/x86_64/platforms/x86_64-mlnx_x86-r5.0.1400 b/device/mellanox/x86_64-mlnx_x86-r5.0.1400/installer.conf similarity index 100% rename from installer/x86_64/platforms/x86_64-mlnx_x86-r5.0.1400 rename to device/mellanox/x86_64-mlnx_x86-r5.0.1400/installer.conf diff --git a/installer/x86_64/platforms/x86_64-dell_s6000_s1220-r0 b/installer/x86_64/platforms/x86_64-dell_s6000_s1220-r0 deleted file mode 100644 index f778372ded1e..000000000000 --- a/installer/x86_64/platforms/x86_64-dell_s6000_s1220-r0 +++ /dev/null @@ -1,2 +0,0 @@ -ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="processor.max_cstate=1 intel_idle.max_cstate=0" -./dell-s6000-replace-reboot.sh