diff --git a/build_image.sh b/build_image.sh
index a275c383c4..2d229c2d19 100755
--- a/build_image.sh
+++ b/build_image.sh
@@ -14,11 +14,8 @@
IMAGE_VERSION=$(. functions.sh && sonic_get_version)
-if [ "$IMAGE_TYPE" = "onie" ]; then
- echo "Build ONIE installer"
- mkdir -p `dirname $OUTPUT_ONIE_IMAGE`
- sudo rm -f $OUTPUT_ONIE_IMAGE
-
+generate_onie_installer_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/
@@ -27,6 +24,11 @@ if [ "$IMAGE_TYPE" = "onie" ]; then
if [ -f ./device/$VENDOR/$PLATFORM/installer.conf ]; then
cp ./device/$VENDOR/$PLATFORM/installer.conf ./installer/x86_64/platforms/$PLATFORM
fi
+
+ if [ "$IMAGE_TYPE" = "raw" ] && [ -f ./device/$VENDOR/$PLATFORM/nos_to_sonic_grub.cfg ]; then
+ sed -i -e "s/%%IMAGE_VERSION%%/$IMAGE_VERSION/g" ./device/$VENDOR/$PLATFORM/nos_to_sonic_grub.cfg
+ echo "IMAGE_VERSION is $IMAGE_VERSION"
+ fi
done
done
@@ -35,6 +37,50 @@ if [ "$IMAGE_TYPE" = "onie" ]; then
./onie-mk-demo.sh $TARGET_PLATFORM $TARGET_MACHINE $TARGET_PLATFORM-$TARGET_MACHINE-$ONIEIMAGE_VERSION \
installer platform/$TARGET_MACHINE/platform.conf $OUTPUT_ONIE_IMAGE OS $IMAGE_VERSION $ONIE_IMAGE_PART_SIZE \
$ONIE_INSTALLER_PAYLOAD
+}
+
+if [ "$IMAGE_TYPE" = "onie" ]; then
+ echo "Build ONIE installer"
+ mkdir -p `dirname $OUTPUT_ONIE_IMAGE`
+ sudo rm -f $OUTPUT_ONIE_IMAGE
+
+ generate_onie_installer_image
+
+## Build a raw partition dump image using the ONIE installer that can be
+## used to dd' in-lieu of using the onie-nos-installer. Used while migrating
+## into SONiC from other NOS.
+elif [ "$IMAGE_TYPE" = "raw" ]; then
+
+ echo "Build RAW image"
+ mkdir -p `dirname $OUTPUT_RAW_IMAGE`
+ sudo rm -f $OUTPUT_RAW_IMAGE
+
+ generate_onie_installer_image
+
+ echo "Creating SONiC raw partition : $OUTPUT_RAW_IMAGE of size $RAW_IMAGE_DISK_SIZE MB"
+ fallocate -l "$RAW_IMAGE_DISK_SIZE"M $OUTPUT_RAW_IMAGE
+
+ ## Generate a compressed 8GB partition dump that can be used to 'dd' in-lieu of using the onie-nos-installer
+ ## Run the installer
+ ## The 'build' install mode of the installer is used to generate this dump.
+ sudo chmod a+x $OUTPUT_ONIE_IMAGE
+ sudo ./$OUTPUT_ONIE_IMAGE
+
+ [ -r $OUTPUT_RAW_IMAGE ] || {
+ echo "Error : $OUTPUT_RAW_IMAGE not generated!"
+ exit 1
+ }
+
+ gzip $OUTPUT_RAW_IMAGE
+
+ [ -r $OUTPUT_RAW_IMAGE.gz ] || {
+ echo "Error : gzip $OUTPUT_RAW_IMAGE failed!"
+ exit 1
+ }
+
+ mv $OUTPUT_RAW_IMAGE.gz $OUTPUT_RAW_IMAGE
+ echo "The compressed raw image is in $OUTPUT_RAW_IMAGE"
+
## Use 'aboot' as target machine category which includes Aboot as bootloader
elif [ "$IMAGE_TYPE" = "aboot" ]; then
echo "Build Aboot installer"
diff --git a/device/accton/x86_64-accton_as5712_54x-r0/Accton-AS5712-54X/port_config.ini b/device/accton/x86_64-accton_as5712_54x-r0/Accton-AS5712-54X/port_config.ini
new file mode 100644
index 0000000000..61325e1ec4
--- /dev/null
+++ b/device/accton/x86_64-accton_as5712_54x-r0/Accton-AS5712-54X/port_config.ini
@@ -0,0 +1,74 @@
+# name lanes alias
+Ethernet0 13 tenGigE0
+Ethernet1 14 tenGigE1
+Ethernet2 15 tenGigE2
+Ethernet3 16 tenGigE3
+Ethernet4 21 tenGigE4
+Ethernet5 22 tenGigE5
+Ethernet6 23 tenGigE6
+Ethernet7 24 tenGigE7
+Ethernet8 25 tenGigE8
+Ethernet9 26 tenGigE9
+Ethernet10 27 tenGigE10
+Ethernet11 28 tenGigE11
+Ethernet12 29 tenGigE12
+Ethernet13 30 tenGigE13
+Ethernet14 31 tenGigE14
+Ethernet15 32 tenGigE15
+Ethernet16 45 tenGigE16
+Ethernet17 46 tenGigE17
+Ethernet18 47 tenGigE18
+Ethernet19 48 tenGigE19
+Ethernet20 49 tenGigE20
+Ethernet21 50 tenGigE21
+Ethernet22 51 tenGigE22
+Ethernet23 52 tenGigE23
+Ethernet24 53 tenGigE24
+Ethernet25 54 tenGigE25
+Ethernet26 55 tenGigE26
+Ethernet27 56 tenGigE27
+Ethernet28 57 tenGigE28
+Ethernet29 58 tenGigE29
+Ethernet30 59 tenGigE30
+Ethernet31 60 tenGigE31
+Ethernet32 61 tenGigE32
+Ethernet33 62 tenGigE33
+Ethernet34 63 tenGigE34
+Ethernet35 64 tenGigE35
+Ethernet36 65 tenGigE36
+Ethernet37 66 tenGigE37
+Ethernet38 67 tenGigE38
+Ethernet39 68 tenGigE39
+Ethernet40 69 tenGigE40
+Ethernet41 70 tenGigE41
+Ethernet42 71 tenGigE42
+Ethernet43 72 tenGigE43
+Ethernet44 73 tenGigE44
+Ethernet45 74 tenGigE45
+Ethernet46 75 tenGigE46
+Ethernet47 76 tenGigE47
+Ethernet48 97 tenGigE48
+Ethernet49 98 tenGigE49
+Ethernet50 99 tenGigE50
+Ethernet51 100 tenGigE51
+Ethernet52 101 tenGigE52
+Ethernet53 102 tenGigE53
+Ethernet54 103 tenGigE54
+Ethernet55 104 tenGigE55
+Ethernet56 81 tenGigE56
+Ethernet57 82 tenGigE57
+Ethernet58 83 tenGigE58
+Ethernet59 84 tenGigE59
+Ethernet60 105 tenGigE60
+Ethernet61 106 tenGigE61
+Ethernet62 107 tenGigE62
+Ethernet63 108 tenGigE63
+Ethernet64 109 tenGigE64
+Ethernet65 110 tenGigE65
+Ethernet66 111 tenGigE66
+Ethernet67 112 tenGigE67
+Ethernet68 77 tenGigE68
+Ethernet69 78 tenGigE69
+Ethernet70 79 tenGigE70
+Ethernet71 80 tenGigE71
+
diff --git a/device/accton/x86_64-accton_as5712_54x-r0/Accton-AS5712-54X/sai.profile b/device/accton/x86_64-accton_as5712_54x-r0/Accton-AS5712-54X/sai.profile
new file mode 100644
index 0000000000..7fafa54db9
--- /dev/null
+++ b/device/accton/x86_64-accton_as5712_54x-r0/Accton-AS5712-54X/sai.profile
@@ -0,0 +1,2 @@
+SAI_INIT_CONFIG_FILE=/etc/bcm/td2-as5712-72x10G.config.bcm
+
diff --git a/device/accton/x86_64-accton_as5712_54x-r0/installer.conf b/device/accton/x86_64-accton_as5712_54x-r0/installer.conf
new file mode 100644
index 0000000000..14404194ef
--- /dev/null
+++ b/device/accton/x86_64-accton_as5712_54x-r0/installer.conf
@@ -0,0 +1,3 @@
+CONSOLE_PORT=0x2f8
+CONSOLE_DEV=1
+CONSOLE_SPEED=115200
diff --git a/device/accton/x86_64-accton_as5712_54x-r0/led_proc_init.soc b/device/accton/x86_64-accton_as5712_54x-r0/led_proc_init.soc
new file mode 100644
index 0000000000..e27679db9a
--- /dev/null
+++ b/device/accton/x86_64-accton_as5712_54x-r0/led_proc_init.soc
@@ -0,0 +1,163 @@
+# LED setting for active
+# -----------------------------------------------------------------------------
+# for as5712_54x (48xg+6qxg)
+#
+# on green - if link up
+# off - if link down
+# blink - if active
+# -----------------------------------------------------------------------------
+m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=0
+m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_62=1
+m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_61=2
+m CMIC_LEDUP0_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3
+m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=4
+m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_58=5
+m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_57=6
+m CMIC_LEDUP0_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7
+m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=8
+m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_54=9
+m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_53=10
+m CMIC_LEDUP0_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11
+m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=12
+m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_50=13
+m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_49=14
+m CMIC_LEDUP0_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15
+m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=16
+m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_34=17
+m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_33=18
+m CMIC_LEDUP0_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=19
+m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=20
+m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_38=21
+m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_37=22
+m CMIC_LEDUP0_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=23
+m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=24
+m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_42=25
+m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_41=26
+m CMIC_LEDUP0_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=27
+m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=28
+m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_46=29
+m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_45=30
+m CMIC_LEDUP0_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=31
+m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=32
+m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_30=33
+m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_29=34
+m CMIC_LEDUP0_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=35
+m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=36
+m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_26=37
+m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_25=38
+m CMIC_LEDUP0_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=39
+m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=40
+m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_22=41
+m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_21=42
+m CMIC_LEDUP0_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=43
+m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=44
+m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_18=45
+m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_17=46
+m CMIC_LEDUP0_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=47
+m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=48
+m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_2=49
+m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_1=50
+m CMIC_LEDUP0_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=51
+m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=52
+m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_6=53
+m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_5=54
+m CMIC_LEDUP0_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=55
+m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=56
+m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_10=57
+m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_9=58
+m CMIC_LEDUP0_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=59
+m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=60
+m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_14=61
+m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_13=62
+m CMIC_LEDUP0_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63
+m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_63=0
+m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_62=1
+m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_61=2
+m CMIC_LEDUP1_PORT_ORDER_REMAP_60_63 REMAP_PORT_60=3
+m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_59=4
+m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_58=5
+m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_57=6
+m CMIC_LEDUP1_PORT_ORDER_REMAP_56_59 REMAP_PORT_56=7
+m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_55=8
+m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_54=9
+m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_53=10
+m CMIC_LEDUP1_PORT_ORDER_REMAP_52_55 REMAP_PORT_52=11
+m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_51=12
+m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_50=13
+m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_49=14
+m CMIC_LEDUP1_PORT_ORDER_REMAP_48_51 REMAP_PORT_48=15
+m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_35=16
+m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_34=17
+m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_33=18
+m CMIC_LEDUP1_PORT_ORDER_REMAP_32_35 REMAP_PORT_32=19
+m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_39=20
+m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_38=21
+m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_37=22
+m CMIC_LEDUP1_PORT_ORDER_REMAP_36_39 REMAP_PORT_36=23
+m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_43=24
+m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_42=25
+m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_41=26
+m CMIC_LEDUP1_PORT_ORDER_REMAP_40_43 REMAP_PORT_40=27
+m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_47=28
+m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_46=29
+m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_45=30
+m CMIC_LEDUP1_PORT_ORDER_REMAP_44_47 REMAP_PORT_44=31
+m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_31=32
+m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_30=33
+m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_29=34
+m CMIC_LEDUP1_PORT_ORDER_REMAP_28_31 REMAP_PORT_28=35
+m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_27=36
+m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_26=37
+m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_25=38
+m CMIC_LEDUP1_PORT_ORDER_REMAP_24_27 REMAP_PORT_24=39
+m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_23=40
+m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_22=41
+m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_21=42
+m CMIC_LEDUP1_PORT_ORDER_REMAP_20_23 REMAP_PORT_20=43
+m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_19=44
+m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_18=45
+m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_17=46
+m CMIC_LEDUP1_PORT_ORDER_REMAP_16_19 REMAP_PORT_16=47
+m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_3=48
+m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_2=49
+m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_1=50
+m CMIC_LEDUP1_PORT_ORDER_REMAP_0_3 REMAP_PORT_0=51
+m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_7=52
+m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_6=53
+m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_5=54
+m CMIC_LEDUP1_PORT_ORDER_REMAP_4_7 REMAP_PORT_4=55
+m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_11=56
+m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_10=57
+m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_9=58
+m CMIC_LEDUP1_PORT_ORDER_REMAP_8_11 REMAP_PORT_8=59
+m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_15=60
+m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_14=61
+m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_13=62
+m CMIC_LEDUP1_PORT_ORDER_REMAP_12_15 REMAP_PORT_12=63
+
+led 0 stop
+led 0 prog \
+ 06 FE 80 D2 19 71 08 E0 60 FE E9 D2 0F 75 10 81 \
+ 61 FD 02 3F 60 FF 28 32 0F 87 67 4A 96 FF 06 FF \
+ D2 2B 74 16 02 1F 60 FF 28 32 0F 87 67 4A 96 FF \
+ 06 FF D2 13 74 28 02 0F 60 FF 28 32 0F 87 67 4A \
+ 96 FF 06 FF D2 0B 74 3A 3A 48 32 07 32 08 C7 32 \
+ 04 C7 97 71 57 77 69 32 00 32 01 B7 97 71 63 32 \
+ 0E 77 6B 26 FD 97 27 77 6B 32 0F 87 57 00 00 00
+led 0 start
+
+led 1 stop
+led 1 prog \
+ 06 FE 80 D2 19 71 08 E0 60 FE E9 D2 0F 75 10 81 \
+ 61 FD 02 20 67 89 02 24 67 89 02 10 67 89 02 28 \
+ 67 89 02 2C 67 89 02 0C 67 89 02 2C 67 79 02 28 \
+ 67 79 02 24 67 79 02 20 67 79 02 10 67 79 02 0C \
+ 67 79 02 0B 60 FF 28 32 0F 87 67 56 96 FF 06 FF \
+ D2 FF 74 46 3A 36 32 07 32 08 C7 32 04 C7 97 71 \
+ 63 77 75 32 00 32 01 B7 97 71 6F 32 0E 77 77 26 \
+ FD 97 27 77 77 32 0F 87 57 12 A0 F8 15 1A 01 75 \
+ 85 28 67 56 57 32 0F 87 57 12 A0 F8 15 1A 01 71 \
+ A1 28 67 56 80 28 67 56 80 28 67 56 80 28 67 56 \
+ 57 32 0F 87 32 0F 87 32 0F 87 32 0F 87 57 00 00
+led 1 start
+
diff --git a/device/accton/x86_64-accton_as5712_54x-r0/minigraph.xml b/device/accton/x86_64-accton_as5712_54x-r0/minigraph.xml
new file mode 100644
index 0000000000..8d89f28b0d
--- /dev/null
+++ b/device/accton/x86_64-accton_as5712_54x-r0/minigraph.xml
@@ -0,0 +1,151 @@
+
+
+
+
+
+ OCPSCH0104001MS
+ 10.10.1.26
+ switch1
+ 10.10.1.25
+ 1
+ 10
+ 3
+
+
+ OCPSCH0104002MS
+ 10.10.2.26
+ switch1
+ 10.10.2.25
+ 1
+ 10
+ 3
+
+
+
+
+ 64536
+ switch1
+
+
+ 10.10.1.26
+
+
+
+
+ 10.10.2.26
+
+
+
+
+
+
+
+ 64542
+ OCPSCH0104001MS
+
+
+
+ 64543
+ OCPSCH0104002MS
+
+
+
+
+
+
+
+
+
+ HostIP
+ Loopback0
+
+ 100.0.0.9/32
+
+ 100.0.0.9/32
+
+
+
+
+
+
+
+ switch1
+
+
+
+
+
+ Ethernet48
+ 10.10.1.25/30
+
+
+
+ Ethernet52
+ 10.10.2.25/30
+
+
+
+
+
+
+
+
+
+
+
+ 40000
+ DeviceInterfaceLink
+ OCPSCH0104001MS
+ Ethernet24
+ switch1
+ Ethernet48
+
+
+ 40000
+ DeviceInterfaceLink
+ OCPSCH0104002MS
+ Ethernet24
+ switch1
+ Ethernet52
+
+
+
+
+ switch1
+ Accton-AS5712-54X
+
+
+
+
+
+
+ switch1
+
+
+ DhcpResources
+
+
+
+
+ NtpResources
+
+ 0.debian.pool.ntp.org;1.debian.pool.ntp.org;2.debian.pool.ntp.org;3.debian.pool.ntp.org
+
+
+ SyslogResources
+
+
+
+
+ ErspanDestinationIpv4
+
+ 2.2.2.2
+
+
+
+
+
+
+ switch1
+ Accton-AS5712-54X
+
diff --git a/device/accton/x86_64-accton_as5712_54x-r0/plugins/eeprom.py b/device/accton/x86_64-accton_as5712_54x-r0/plugins/eeprom.py
new file mode 100644
index 0000000000..7681caafee
--- /dev/null
+++ b/device/accton/x86_64-accton_as5712_54x-r0/plugins/eeprom.py
@@ -0,0 +1,24 @@
+#!/usr/bin/env python
+
+try:
+ import exceptions
+ import binascii
+ import time
+ import optparse
+ import warnings
+ import os
+ import sys
+ from sonic_eeprom import eeprom_base
+ from sonic_eeprom import eeprom_tlvinfo
+ import subprocess
+except ImportError, e:
+ raise ImportError (str(e) + "- required module not found")
+
+class board(eeprom_tlvinfo.TlvInfoDecoder):
+ _TLV_INFO_MAX_LEN = 256
+ def __init__(self, name, path, cpld_root, ro):
+ self.eeprom_path = "/sys/bus/i2c/devices/1-0057/eeprom"
+ #Two i2c buses might get flipped order, check them both.
+ if not os.path.exists(self.eeprom_path):
+ self.eeprom_path = "/sys/bus/i2c/devices/0-0057/eeprom"
+ super(board, self).__init__(self.eeprom_path, 0, '', True)
diff --git a/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py b/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py
new file mode 100644
index 0000000000..070b1da934
--- /dev/null
+++ b/device/accton/x86_64-accton_as5712_54x-r0/plugins/sfputil.py
@@ -0,0 +1,175 @@
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
+
+try:
+ import time
+ from sonic_sfp.sfputilbase import SfpUtilBase
+except ImportError as e:
+ raise ImportError("%s - required module not found" % str(e))
+
+
+class SfpUtil(SfpUtilBase):
+ """Platform-specific SfpUtil class"""
+
+ PORT_START = 0
+ PORT_END = 31
+ PORTS_IN_BLOCK = 32
+
+ EEPROM_OFFSET = 20
+
+ _port_to_eeprom_mapping = {}
+
+ @property
+ def port_start(self):
+ return self.PORT_START
+
+ @property
+ def port_end(self):
+ return self.PORT_END
+
+ @property
+ def qsfp_ports(self):
+ return range(0, self.PORTS_IN_BLOCK + 1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ def __init__(self):
+ eeprom_path = "/sys/class/i2c-adapter/i2c-{0}/{0}-0050/eeprom"
+
+ for x in range(0, self.port_end + 1):
+ self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET)
+
+ SfpUtilBase.__init__(self)
+
+ def get_presence(self, port_num):
+ # Check for invalid port_num
+ if port_num < self.port_start or port_num > self.port_end:
+ return False
+
+ try:
+ reg_file = open("/sys/devices/platform/accton/qsfp_modprs")
+ except IOError as e:
+ print "Error: unable to open file: %s" % str(e)
+ return False
+
+ content = reg_file.readline().rstrip()
+
+ # content is a string containing the hex representation of the register
+ reg_value = int(content, 16)
+
+ # Mask off the bit corresponding to our port
+ mask = (1 << port_num)
+
+ # ModPrsL is active low
+ if reg_value & mask == 0:
+ return True
+
+ return False
+
+ def get_low_power_mode(self, port_num):
+ # Check for invalid port_num
+ if port_num < self.port_start or port_num > self.port_end:
+ return False
+
+ try:
+ reg_file = open("/sys/devices/platform/accton/qsfp_lpmode")
+ except IOError as e:
+ print "Error: unable to open file: %s" % str(e)
+
+ content = reg_file.readline().rstrip()
+
+ # content is a string containing the hex representation of the register
+ reg_value = int(content, 16)
+
+ # Mask off the bit corresponding to our port
+ mask = (1 << port_num)
+
+ # LPMode is active high
+ if reg_value & mask == 0:
+ return False
+
+ return True
+
+ def set_low_power_mode(self, port_num, lpmode):
+ # Check for invalid port_num
+ if port_num < self.port_start or port_num > self.port_end:
+ return False
+
+ try:
+ reg_file = open("/sys/devices/platform/accton/qsfp_lpmode", "r+")
+ except IOError as e:
+ print "Error: unable to open file: %s" % str(e)
+ return False
+
+ content = reg_file.readline().rstrip()
+
+ # content is a string containing the hex representation of the register
+ reg_value = int(content, 16)
+
+ # Mask off the bit corresponding to our port
+ mask = (1 << port_num)
+
+ # LPMode is active high; set or clear the bit accordingly
+ if lpmode is True:
+ reg_value = reg_value | mask
+ else:
+ reg_value = reg_value & ~mask
+
+ # Convert our register value back to a hex string and write back
+ content = hex(reg_value)
+
+ reg_file.seek(0)
+ reg_file.write(content)
+ reg_file.close()
+
+ return True
+
+ def reset(self, port_num):
+ QSFP_RESET_REGISTER_DEVICE_FILE = "/sys/devices/platform/accton/qsfp_reset"
+
+ # Check for invalid port_num
+ if port_num < self.port_start or port_num > self.port_end:
+ return False
+
+ try:
+ reg_file = open(QSFP_RESET_REGISTER_DEVICE_FILE, "r+")
+ except IOError as e:
+ print "Error: unable to open file: %s" % str(e)
+ return False
+
+ content = reg_file.readline().rstrip()
+
+ # File content is a string containing the hex representation of the register
+ reg_value = int(content, 16)
+
+ # Mask off the bit corresponding to our port
+ mask = (1 << port_num)
+
+ # ResetL is active low
+ reg_value = reg_value & ~mask
+
+ # Convert our register value back to a hex string and write back
+ reg_file.seek(0)
+ reg_file.write(hex(reg_value))
+ reg_file.close()
+
+ # Sleep 1 second to allow it to settle
+ time.sleep(1)
+
+ # Flip the bit back high and write back to the register to take port out of reset
+ try:
+ reg_file = open(QSFP_RESET_REGISTER_DEVICE_FILE, "w")
+ except IOError as e:
+ print "Error: unable to open file: %s" % str(e)
+ return False
+
+ reg_value = reg_value | mask
+ reg_file.seek(0)
+ reg_file.write(hex(reg_value))
+ reg_file.close()
+
+ return True
diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-Q16S64/port_config.ini b/device/arista/x86_64-arista_7050_qx32/Arista-7050-Q16S64/port_config.ini
index 28edbeccf2..dea477b261 100644
--- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-Q16S64/port_config.ini
+++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-Q16S64/port_config.ini
@@ -1,57 +1,57 @@
-# name lanes alias
-Ethernet0 125,126,127,128 Ethernet1/1
-Ethernet4 121,122,123,124 Ethernet2/1
-Ethernet8 13,14,15,16 Ethernet3/1
-Ethernet12 9,10,11,12 Ethernet4/1
-Ethernet16 17,18,19,20 Ethernet5/1
-Ethernet20 21,22,23,24 Ethernet6/1
-Ethernet24 25,26,27,28 Ethernet7/1
-Ethernet28 29,30,31,32 Ethernet8/1
-Ethernet32 37,38,39,40 Ethernet9/1
-Ethernet36 33,34,35,36 Ethernet10/1
-Ethernet40 45,46,47,48 Ethernet11/1
-Ethernet44 41,42,43,44 Ethernet12/1
-Ethernet48 53,54,55,56 Ethernet13/1
-Ethernet52 49,50,51,52 Ethernet14/1
-Ethernet56 69,70,71,72 Ethernet15/1
-Ethernet60 65,66,67,68 Ethernet16/1
-Ethernet64 77 Ethernet17/1
-Ethernet65 78 Ethernet17/2
-Ethernet66 79 Ethernet17/3
-Ethernet67 80 Ethernet17/4
-Ethernet68 73 Ethernet18/1
-Ethernet69 74 Ethernet18/2
-Ethernet70 75 Ethernet18/3
-Ethernet71 76 Ethernet18/4
-Ethernet72 93 Ethernet19/1
-Ethernet73 94 Ethernet19/2
-Ethernet74 95 Ethernet19/3
-Ethernet75 96 Ethernet19/4
-Ethernet76 89 Ethernet20/1
-Ethernet77 90 Ethernet20/2
-Ethernet78 91 Ethernet20/3
-Ethernet79 92 Ethernet20/4
-Ethernet80 101 Ethernet21/1
-Ethernet81 102 Ethernet21/2
-Ethernet82 103 Ethernet21/3
-Ethernet83 104 Ethernet21/4
-Ethernet84 97 Ethernet22/1
-Ethernet85 98 Ethernet22/2
-Ethernet86 99 Ethernet22/3
-Ethernet87 100 Ethernet22/4
-Ethernet88 109 Ethernet23/1
-Ethernet89 110 Ethernet23/2
-Ethernet90 111 Ethernet23/3
-Ethernet91 112 Ethernet23/4
-Ethernet92 105 Ethernet24/1
-Ethernet93 106 Ethernet24/2
-Ethernet94 107 Ethernet24/3
-Ethernet95 108 Ethernet24/4
-Ethernet96 61,62,63,64 Ethernet25
-Ethernet100 57,58,59,60 Ethernet26
-Ethernet104 81,82,83,84 Ethernet27
-Ethernet108 85,86,87,88 Ethernet28
-Ethernet112 117,118,119,120 Ethernet29
-Ethernet116 113,114,115,116 Ethernet30
-Ethernet120 5,6,7,8 Ethernet31
-Ethernet124 1,2,3,4 Ethernet32
+# name lanes alias port
+Ethernet0 125,126,127,128 Ethernet1/1 1
+Ethernet4 121,122,123,124 Ethernet2/1 2
+Ethernet8 13,14,15,16 Ethernet3/1 3
+Ethernet12 9,10,11,12 Ethernet4/1 4
+Ethernet16 17,18,19,20 Ethernet5/1 5
+Ethernet20 21,22,23,24 Ethernet6/1 6
+Ethernet24 25,26,27,28 Ethernet7/1 7
+Ethernet28 29,30,31,32 Ethernet8/1 8
+Ethernet32 37,38,39,40 Ethernet9/1 9
+Ethernet36 33,34,35,36 Ethernet10/1 10
+Ethernet40 45,46,47,48 Ethernet11/1 11
+Ethernet44 41,42,43,44 Ethernet12/1 12
+Ethernet48 53,54,55,56 Ethernet13/1 13
+Ethernet52 49,50,51,52 Ethernet14/1 14
+Ethernet56 69,70,71,72 Ethernet15/1 15
+Ethernet60 65,66,67,68 Ethernet16/1 16
+Ethernet64 77 Ethernet17/1 17
+Ethernet65 78 Ethernet17/2 17
+Ethernet66 79 Ethernet17/3 17
+Ethernet67 80 Ethernet17/4 17
+Ethernet68 73 Ethernet18/1 18
+Ethernet69 74 Ethernet18/2 18
+Ethernet70 75 Ethernet18/3 18
+Ethernet71 76 Ethernet18/4 18
+Ethernet72 93 Ethernet19/1 19
+Ethernet73 94 Ethernet19/2 19
+Ethernet74 95 Ethernet19/3 19
+Ethernet75 96 Ethernet19/4 19
+Ethernet76 89 Ethernet20/1 20
+Ethernet77 90 Ethernet20/2 20
+Ethernet78 91 Ethernet20/3 20
+Ethernet79 92 Ethernet20/4 20
+Ethernet80 101 Ethernet21/1 21
+Ethernet81 102 Ethernet21/2 21
+Ethernet82 103 Ethernet21/3 21
+Ethernet83 104 Ethernet21/4 21
+Ethernet84 97 Ethernet22/1 22
+Ethernet85 98 Ethernet22/2 22
+Ethernet86 99 Ethernet22/3 22
+Ethernet87 100 Ethernet22/4 22
+Ethernet88 109 Ethernet23/1 23
+Ethernet89 110 Ethernet23/2 23
+Ethernet90 111 Ethernet23/3 23
+Ethernet91 112 Ethernet23/4 23
+Ethernet92 105 Ethernet24/1 24
+Ethernet93 106 Ethernet24/2 24
+Ethernet94 107 Ethernet24/3 24
+Ethernet95 108 Ethernet24/4 24
+Ethernet96 61,62,63,64 Ethernet25 25
+Ethernet100 57,58,59,60 Ethernet26 26
+Ethernet104 81,82,83,84 Ethernet27 27
+Ethernet108 85,86,87,88 Ethernet28 28
+Ethernet112 117,118,119,120 Ethernet29 29
+Ethernet116 113,114,115,116 Ethernet30 30
+Ethernet120 5,6,7,8 Ethernet31 31
+Ethernet124 1,2,3,4 Ethernet32 32
diff --git a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/port_config.ini b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/port_config.ini
index b9ab8854a2..32fa6885fa 100644
--- a/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/port_config.ini
+++ b/device/arista/x86_64-arista_7050_qx32/Arista-7050-QX32/port_config.ini
@@ -1,33 +1,33 @@
-# name lanes alias
-Ethernet0 125,126,127,128 Ethernet1/1
-Ethernet4 121,122,123,124 Ethernet2/1
-Ethernet8 13,14,15,16 Ethernet3/1
-Ethernet12 9,10,11,12 Ethernet4/1
-Ethernet16 17,18,19,20 Ethernet5/1
-Ethernet20 21,22,23,24 Ethernet6/1
-Ethernet24 25,26,27,28 Ethernet7/1
-Ethernet28 29,30,31,32 Ethernet8/1
-Ethernet32 37,38,39,40 Ethernet9/1
-Ethernet36 33,34,35,36 Ethernet10/1
-Ethernet40 45,46,47,48 Ethernet11/1
-Ethernet44 41,42,43,44 Ethernet12/1
-Ethernet48 53,54,55,56 Ethernet13/1
-Ethernet52 49,50,51,52 Ethernet14/1
-Ethernet56 69,70,71,72 Ethernet15/1
-Ethernet60 65,66,67,68 Ethernet16/1
-Ethernet64 77,78,79,80 Ethernet17/1
-Ethernet68 73,74,75,76 Ethernet18/1
-Ethernet72 93,94,95,96 Ethernet19/1
-Ethernet76 89,90,91,92 Ethernet20/1
-Ethernet80 101,102,103,104 Ethernet21/1
-Ethernet84 97,98,99,100 Ethernet22/1
-Ethernet88 109,110,111,112 Ethernet23/1
-Ethernet92 105,106,107,108 Ethernet24/1
-Ethernet96 61,62,63,64 Ethernet25
-Ethernet100 57,58,59,60 Ethernet26
-Ethernet104 81,82,83,84 Ethernet27
-Ethernet108 85,86,87,88 Ethernet28
-Ethernet112 117,118,119,120 Ethernet29
-Ethernet116 113,114,115,116 Ethernet30
-Ethernet120 5,6,7,8 Ethernet31
-Ethernet124 1,2,3,4 Ethernet32
+# name lanes alias port
+Ethernet0 125,126,127,128 Ethernet1/1 1
+Ethernet4 121,122,123,124 Ethernet2/1 2
+Ethernet8 13,14,15,16 Ethernet3/1 3
+Ethernet12 9,10,11,12 Ethernet4/1 4
+Ethernet16 17,18,19,20 Ethernet5/1 5
+Ethernet20 21,22,23,24 Ethernet6/1 6
+Ethernet24 25,26,27,28 Ethernet7/1 7
+Ethernet28 29,30,31,32 Ethernet8/1 8
+Ethernet32 37,38,39,40 Ethernet9/1 9
+Ethernet36 33,34,35,36 Ethernet10/1 10
+Ethernet40 45,46,47,48 Ethernet11/1 11
+Ethernet44 41,42,43,44 Ethernet12/1 12
+Ethernet48 53,54,55,56 Ethernet13/1 13
+Ethernet52 49,50,51,52 Ethernet14/1 14
+Ethernet56 69,70,71,72 Ethernet15/1 15
+Ethernet60 65,66,67,68 Ethernet16/1 16
+Ethernet64 77,78,79,80 Ethernet17/1 17
+Ethernet68 73,74,75,76 Ethernet18/1 18
+Ethernet72 93,94,95,96 Ethernet19/1 19
+Ethernet76 89,90,91,92 Ethernet20/1 20
+Ethernet80 101,102,103,104 Ethernet21/1 21
+Ethernet84 97,98,99,100 Ethernet22/1 22
+Ethernet88 109,110,111,112 Ethernet23/1 23
+Ethernet92 105,106,107,108 Ethernet24/1 24
+Ethernet96 61,62,63,64 Ethernet25 25
+Ethernet100 57,58,59,60 Ethernet26 26
+Ethernet104 81,82,83,84 Ethernet27 27
+Ethernet108 85,86,87,88 Ethernet28 28
+Ethernet112 117,118,119,120 Ethernet29 29
+Ethernet116 113,114,115,116 Ethernet30 30
+Ethernet120 5,6,7,8 Ethernet31 31
+Ethernet124 1,2,3,4 Ethernet32 32
diff --git a/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/port_config.ini b/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/port_config.ini
index b56d958499..cb36404ac4 100644
--- a/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/port_config.ini
+++ b/device/arista/x86_64-arista_7050_qx32s/Arista-7050-QX-32S/port_config.ini
@@ -1,33 +1,33 @@
-# name lanes alias
-Ethernet0 9,10,11,12 Ethernet5/1
-Ethernet4 13,14,15,16 Ethernet6/1
-Ethernet8 17,18,19,20 Ethernet7/1
-Ethernet12 21,22,23,24 Ethernet8/1
-Ethernet16 29,30,31,32 Ethernet9/1
-Ethernet20 25,26,27,28 Ethernet10/1
-Ethernet24 33,34,35,36 Ethernet11/1
-Ethernet28 37,38,39,40 Ethernet12/1
-Ethernet32 45,46,47,48 Ethernet13/1
-Ethernet36 41,42,43,44 Ethernet14/1
-Ethernet40 49,50,51,52 Ethernet15/1
-Ethernet44 53,54,55,56 Ethernet16/1
-Ethernet48 69,70,71,72 Ethernet17/1
-Ethernet52 65,66,67,68 Ethernet18/1
-Ethernet56 73,74,75,76 Ethernet19/1
-Ethernet60 77,78,79,80 Ethernet20/1
-Ethernet64 93,94,95,96 Ethernet21/1
-Ethernet68 89,90,91,92 Ethernet22/1
-Ethernet72 97,98,99,100 Ethernet23/1
-Ethernet76 101,102,103,104 Ethernet24/1
-Ethernet80 109,110,111,112 Ethernet25/1
-Ethernet84 105,106,107,108 Ethernet26/1
-Ethernet88 121,122,123,124 Ethernet27/1
-Ethernet92 125,126,127,128 Ethernet28/1
-Ethernet96 61,62,63,64 Ethernet29
-Ethernet100 57,58,59,60 Ethernet30
-Ethernet104 81,82,83,84 Ethernet31
-Ethernet108 85,86,87,88 Ethernet32
-Ethernet112 117,118,119,120 Ethernet33
-Ethernet116 113,114,115,116 Ethernet34
-Ethernet120 1,2,3,4 Ethernet35
-Ethernet124 5,6,7,8 Ethernet36
+# name lanes alias port
+Ethernet0 9,10,11,12 Ethernet5/1 5
+Ethernet4 13,14,15,16 Ethernet6/1 6
+Ethernet8 17,18,19,20 Ethernet7/1 7
+Ethernet12 21,22,23,24 Ethernet8/1 8
+Ethernet16 29,30,31,32 Ethernet9/1 9
+Ethernet20 25,26,27,28 Ethernet10/1 10
+Ethernet24 33,34,35,36 Ethernet11/1 11
+Ethernet28 37,38,39,40 Ethernet12/1 12
+Ethernet32 45,46,47,48 Ethernet13/1 13
+Ethernet36 41,42,43,44 Ethernet14/1 14
+Ethernet40 49,50,51,52 Ethernet15/1 15
+Ethernet44 53,54,55,56 Ethernet16/1 16
+Ethernet48 69,70,71,72 Ethernet17/1 17
+Ethernet52 65,66,67,68 Ethernet18/1 18
+Ethernet56 73,74,75,76 Ethernet19/1 19
+Ethernet60 77,78,79,80 Ethernet20/1 20
+Ethernet64 93,94,95,96 Ethernet21/1 21
+Ethernet68 89,90,91,92 Ethernet22/1 22
+Ethernet72 97,98,99,100 Ethernet23/1 23
+Ethernet76 101,102,103,104 Ethernet24/1 24
+Ethernet80 109,110,111,112 Ethernet25/1 25
+Ethernet84 105,106,107,108 Ethernet26/1 26
+Ethernet88 121,122,123,124 Ethernet27/1 27
+Ethernet92 125,126,127,128 Ethernet28/1 28
+Ethernet96 61,62,63,64 Ethernet29 29
+Ethernet100 57,58,59,60 Ethernet30 30
+Ethernet104 81,82,83,84 Ethernet31 31
+Ethernet108 85,86,87,88 Ethernet32 32
+Ethernet112 117,118,119,120 Ethernet33 33
+Ethernet116 113,114,115,116 Ethernet34 34
+Ethernet120 1,2,3,4 Ethernet35 35
+Ethernet124 5,6,7,8 Ethernet36 36
diff --git a/device/arista/x86_64-arista_7060_cx32s/Arista-7060-CX32S/port_config.ini b/device/arista/x86_64-arista_7060_cx32s/Arista-7060-CX32S/port_config.ini
index 414fb94efb..c1dbcfabd9 100644
--- a/device/arista/x86_64-arista_7060_cx32s/Arista-7060-CX32S/port_config.ini
+++ b/device/arista/x86_64-arista_7060_cx32s/Arista-7060-CX32S/port_config.ini
@@ -1,33 +1,33 @@
-# name lanes alias
-Ethernet0 33,34,35,36 Ethernet1/1
-Ethernet4 37,38,39,40 Ethernet2/1
-Ethernet8 41,42,43,44 Ethernet3/1
-Ethernet12 45,46,47,48 Ethernet4/1
-Ethernet16 49,50,51,52 Ethernet5/1
-Ethernet20 53,54,55,56 Ethernet6/1
-Ethernet24 57,58,59,60 Ethernet7/1
-Ethernet28 61,62,63,64 Ethernet8/1
-Ethernet32 65,66,67,68 Ethernet9/1
-Ethernet36 69,70,71,72 Ethernet10/1
-Ethernet40 73,74,75,76 Ethernet11/1
-Ethernet44 77,78,79,80 Ethernet12/1
-Ethernet48 81,82,83,84 Ethernet13/1
-Ethernet52 85,86,87,88 Ethernet14/1
-Ethernet56 89,90,91,92 Ethernet15/1
-Ethernet60 93,94,95,96 Ethernet16/1
-Ethernet64 97,98,99,100 Ethernet17/1
-Ethernet68 101,102,103,104 Ethernet18/1
-Ethernet72 105,106,107,108 Ethernet19/1
-Ethernet76 109,110,111,112 Ethernet20/1
-Ethernet80 113,114,115,116 Ethernet21/1
-Ethernet84 117,118,119,120 Ethernet22/1
-Ethernet88 121,122,123,124 Ethernet23/1
-Ethernet92 125,126,127,128 Ethernet24/1
-Ethernet96 1,2,3,4 Ethernet25/1
-Ethernet100 5,6,7,8 Ethernet26/1
-Ethernet104 9,10,11,12 Ethernet27/1
-Ethernet108 13,14,15,16 Ethernet28/1
-Ethernet112 17,18,19,20 Ethernet29/1
-Ethernet116 21,22,23,24 Ethernet30/1
-Ethernet120 25,26,27,28 Ethernet31/1
-Ethernet124 29,30,31,32 Ethernet32/1
+# name lanes alias port
+Ethernet0 33,34,35,36 Ethernet1/1 1
+Ethernet4 37,38,39,40 Ethernet2/1 2
+Ethernet8 41,42,43,44 Ethernet3/1 3
+Ethernet12 45,46,47,48 Ethernet4/1 4
+Ethernet16 49,50,51,52 Ethernet5/1 5
+Ethernet20 53,54,55,56 Ethernet6/1 6
+Ethernet24 57,58,59,60 Ethernet7/1 7
+Ethernet28 61,62,63,64 Ethernet8/1 8
+Ethernet32 65,66,67,68 Ethernet9/1 9
+Ethernet36 69,70,71,72 Ethernet10/1 10
+Ethernet40 73,74,75,76 Ethernet11/1 11
+Ethernet44 77,78,79,80 Ethernet12/1 12
+Ethernet48 81,82,83,84 Ethernet13/1 13
+Ethernet52 85,86,87,88 Ethernet14/1 14
+Ethernet56 89,90,91,92 Ethernet15/1 15
+Ethernet60 93,94,95,96 Ethernet16/1 16
+Ethernet64 97,98,99,100 Ethernet17/1 17
+Ethernet68 101,102,103,104 Ethernet18/1 18
+Ethernet72 105,106,107,108 Ethernet19/1 19
+Ethernet76 109,110,111,112 Ethernet20/1 20
+Ethernet80 113,114,115,116 Ethernet21/1 21
+Ethernet84 117,118,119,120 Ethernet22/1 22
+Ethernet88 121,122,123,124 Ethernet23/1 23
+Ethernet92 125,126,127,128 Ethernet24/1 24
+Ethernet96 1,2,3,4 Ethernet25/1 25
+Ethernet100 5,6,7,8 Ethernet26/1 26
+Ethernet104 9,10,11,12 Ethernet27/1 27
+Ethernet108 13,14,15,16 Ethernet28/1 28
+Ethernet112 17,18,19,20 Ethernet29/1 29
+Ethernet116 21,22,23,24 Ethernet30/1 30
+Ethernet120 25,26,27,28 Ethernet31/1 31
+Ethernet124 29,30,31,32 Ethernet32/1 32
diff --git a/device/arista/x86_64-arista_7060_cx32s/plugins/sfputil.py b/device/arista/x86_64-arista_7060_cx32s/plugins/sfputil.py
index b85e0f5365..9a6d770d46 100644
--- a/device/arista/x86_64-arista_7060_cx32s/plugins/sfputil.py
+++ b/device/arista/x86_64-arista_7060_cx32s/plugins/sfputil.py
@@ -1,9 +1,12 @@
-#!/usr/bin/env python
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
try:
import arista.utils.sonic_sfputil as arista_sfputil
-except ImportError, e:
- raise ImportError (str(e) + "- required module not found")
+except ImportError as e:
+ raise ImportError("%s - required module not found" % str(e))
-sfputil = arista_sfputil.getSfpUtil()
+SfpUtil = arista_sfputil.getSfpUtil()
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-64/port_config.ini b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-64/port_config.ini
deleted file mode 100644
index c0213576d0..0000000000
--- a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-64/port_config.ini
+++ /dev/null
@@ -1,67 +0,0 @@
-# name lanes alias port
-Ethernet0 77,78,79,80 Ethernet1/1 1
-Ethernet4 65,66,67,68 Ethernet2/1 2
-Ethernet8 85,86,87,88 Ethernet3/1 3
-Ethernet12 89,90,91,92 Ethernet4/1 4
-Ethernet16 109,110,111,112 Ethernet5/1 5
-Ethernet20 97,98,99,100 Ethernet6/1 6
-Ethernet24 117,118,119,120 Ethernet7/1 7
-Ethernet28 5,6,7,8 Ethernet8/1 8
-Ethernet32 17,18,19,20 Ethernet9/1 9
-Ethernet36 13,14,15,16 Ethernet10/1 10
-Ethernet40 29,30,31,32 Ethernet11/1 11
-Ethernet44 37,38,39,40 Ethernet12/1 12
-Ethernet48 49,50,51,52 Ethernet13/1 13
-Ethernet52 45,46,47,48 Ethernet14/1 14
-Ethernet56 61,62,63,64 Ethernet15/1 15
-Ethernet60 121,122,123,124 Ethernet16/1 16
-Ethernet64 193,194,195,196 Ethernet17/1 17
-Ethernet68 133,134,135,136 Ethernet18/1 18
-Ethernet72 205,206,207,208 Ethernet19/1 19
-Ethernet76 213,214,215,216 Ethernet20/1 20
-Ethernet80 225,226,227,228 Ethernet21/1 21
-Ethernet84 221,222,223,224 Ethernet22/1 22
-Ethernet88 237,238,239,240 Ethernet23/1 23
-Ethernet92 245,246,247,248 Ethernet24/1 24
-Ethernet96 141,142,143,144 Ethernet25/1 25
-Ethernet100 249,250,251,252 Ethernet26/1 26
-Ethernet104 149,150,151,152 Ethernet27/1 27
-Ethernet108 153,154,155,156 Ethernet28/1 28
-Ethernet112 173,174,175,176 Ethernet29/1 29
-Ethernet116 161,162,163,164 Ethernet30/1 30
-Ethernet120 181,182,183,184 Ethernet31/1 31
-Ethernet124 185,186,187,188 Ethernet32/1 32
-Ethernet128 69,70,71,72 Ethernet33/1 33
-Ethernet132 73,74,75,76 Ethernet34/1 34
-Ethernet136 93,94,95,96 Ethernet35/1 35
-Ethernet140 81,82,83,84 Ethernet36/1 36
-Ethernet144 101,102,103,104 Ethernet37/1 37
-Ethernet148 105,106,107,108 Ethernet38/1 38
-Ethernet152 1,2,3,4 Ethernet39/1 39
-Ethernet156 113,114,115,116 Ethernet40/1 40
-Ethernet160 9,10,11,12 Ethernet41/1 41
-Ethernet164 21,22,23,24 Ethernet42/1 42
-Ethernet168 33,34,35,36 Ethernet43/1 43
-Ethernet172 25,26,27,28 Ethernet44/1 44
-Ethernet176 41,42,43,44 Ethernet45/1 45
-Ethernet180 53,54,55,56 Ethernet46/1 46
-Ethernet184 125,126,127,128 Ethernet47/1 47
-Ethernet188 57,58,59,60 Ethernet48/1 48
-Ethernet192 129,130,131,132 Ethernet49/1 49
-Ethernet196 197,198,199,200 Ethernet50/1 50
-Ethernet200 209,210,211,212 Ethernet51/1 51
-Ethernet204 201,202,203,204 Ethernet52/1 52
-Ethernet208 217,218,219,220 Ethernet53/1 53
-Ethernet212 229,230,231,232 Ethernet54/1 54
-Ethernet216 241,242,243,244 Ethernet55/1 55
-Ethernet220 233,234,235,236 Ethernet56/1 56
-Ethernet224 253,254,255,256 Ethernet57/1 57
-Ethernet228 137,138,139,140 Ethernet58/1 58
-Ethernet232 157,158,159,160 Ethernet59/1 59
-Ethernet236 145,146,147,148 Ethernet60/1 60
-Ethernet240 165,166,167,168 Ethernet61/1 61
-Ethernet244 169,170,171,172 Ethernet62/1 62
-Ethernet248 189,190,191,192 Ethernet63/1 63
-Ethernet252 177,178,179,180 Ethernet64/1 64
-Ethernet256 257 Ethernet65 65
-Ethernet260 259 Ethernet66 66
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/port_config.ini b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/port_config.ini
new file mode 100644
index 0000000000..4f073e46dc
--- /dev/null
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/port_config.ini
@@ -0,0 +1,67 @@
+# name lanes alias port
+Ethernet0 77,78,79,80 Ethernet1/1 1
+Ethernet4 65,66,67,68 Ethernet2/1 2
+Ethernet8 85,86,87,88 Ethernet3/1 3
+Ethernet12 89,90,91,92 Ethernet4/1 4
+Ethernet16 109,110,111,112 Ethernet5/1 5
+Ethernet20 97,98,99,100 Ethernet6/1 6
+Ethernet24 5,6,7,8 Ethernet7/1 7
+Ethernet28 13,14,15,16 Ethernet8/1 8
+Ethernet32 25,26,27,28 Ethernet9/1 9
+Ethernet36 21,22,23,24 Ethernet10/1 10
+Ethernet40 37,38,39,40 Ethernet11/1 11
+Ethernet44 45,46,47,48 Ethernet12/1 12
+Ethernet48 57,58,59,60 Ethernet13/1 13
+Ethernet52 53,54,55,56 Ethernet14/1 14
+Ethernet56 117,118,119,120 Ethernet15/1 15
+Ethernet60 121,122,123,124 Ethernet16/1 16
+Ethernet64 141,142,143,144 Ethernet17/1 17
+Ethernet68 133,134,135,136 Ethernet18/1 18
+Ethernet72 197,198,199,200 Ethernet19/1 19
+Ethernet76 205,206,207,208 Ethernet20/1 20
+Ethernet80 217,218,219,220 Ethernet21/1 21
+Ethernet84 213,214,215,216 Ethernet22/1 22
+Ethernet88 229,230,231,232 Ethernet23/1 23
+Ethernet92 237,238,239,240 Ethernet24/1 24
+Ethernet96 249,250,251,252 Ethernet25/1 25
+Ethernet100 245,246,247,248 Ethernet26/1 26
+Ethernet104 149,150,151,152 Ethernet27/1 27
+Ethernet108 153,154,155,156 Ethernet28/1 28
+Ethernet112 173,174,175,176 Ethernet29/1 29
+Ethernet116 161,162,163,164 Ethernet30/1 30
+Ethernet120 181,182,183,184 Ethernet31/1 31
+Ethernet124 185,186,187,188 Ethernet32/1 32
+Ethernet128 69,70,71,72 Ethernet33/1 33
+Ethernet132 73,74,75,76 Ethernet34/1 34
+Ethernet136 93,94,95,96 Ethernet35/1 35
+Ethernet140 81,82,83,84 Ethernet36/1 36
+Ethernet144 101,102,103,104 Ethernet37/1 37
+Ethernet148 105,106,107,108 Ethernet38/1 38
+Ethernet152 9,10,11,12 Ethernet39/1 39
+Ethernet156 1,2,3,4 Ethernet40/1 40
+Ethernet160 17,18,19,20 Ethernet41/1 41
+Ethernet164 29,30,31,32 Ethernet42/1 42
+Ethernet168 41,42,43,44 Ethernet43/1 43
+Ethernet172 33,34,35,36 Ethernet44/1 44
+Ethernet176 49,50,51,52 Ethernet45/1 45
+Ethernet180 61,62,63,64 Ethernet46/1 46
+Ethernet184 125,126,127,128 Ethernet47/1 47
+Ethernet188 113,114,115,116 Ethernet48/1 48
+Ethernet192 129,130,131,132 Ethernet49/1 49
+Ethernet196 137,138,139,140 Ethernet50/1 50
+Ethernet200 201,202,203,204 Ethernet51/1 51
+Ethernet204 193,194,195,196 Ethernet52/1 52
+Ethernet208 209,210,211,212 Ethernet53/1 53
+Ethernet212 221,222,223,224 Ethernet54/1 54
+Ethernet216 233,234,235,236 Ethernet55/1 55
+Ethernet220 225,226,227,228 Ethernet56/1 56
+Ethernet224 241,242,243,244 Ethernet57/1 57
+Ethernet228 253,254,255,256 Ethernet58/1 58
+Ethernet232 157,158,159,160 Ethernet59/1 59
+Ethernet236 145,146,147,148 Ethernet60/1 60
+Ethernet240 165,166,167,168 Ethernet61/1 61
+Ethernet244 169,170,171,172 Ethernet62/1 62
+Ethernet248 189,190,191,192 Ethernet63/1 63
+Ethernet252 177,178,179,180 Ethernet64/1 64
+Ethernet256 257 Ethernet65 65
+Ethernet260 259 Ethernet66 66
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-64/sai.profile b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/sai.profile
similarity index 100%
rename from device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-64/sai.profile
rename to device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-C64/sai.profile
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/port_config.ini b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/port_config.ini
new file mode 100644
index 0000000000..b06d1c7575
--- /dev/null
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/port_config.ini
@@ -0,0 +1,121 @@
+# name lanes alias port
+Ethernet0 77,78 Ethernet1/1 1
+Ethernet2 79,80 Ethernet1/3 2
+Ethernet4 65,66 Ethernet2/1 3
+Ethernet6 67,68 Ethernet2/3 4
+Ethernet8 85,86 Ethernet3/1 5
+Ethernet10 87,88 Ethernet3/3 6
+Ethernet12 89,90 Ethernet4/1 7
+Ethernet14 91,92 Ethernet4/3 8
+Ethernet16 109,110 Ethernet5/1 9
+Ethernet18 111,112 Ethernet5/3 10
+Ethernet20 97,98 Ethernet6/1 11
+Ethernet22 99,100 Ethernet6/3 12
+Ethernet24 5,6 Ethernet7/1 13
+Ethernet26 7,8 Ethernet7/3 14
+Ethernet28 13,14 Ethernet8/1 15
+Ethernet30 15,16 Ethernet8/3 16
+Ethernet32 25,26 Ethernet9/1 17
+Ethernet34 27,28 Ethernet9/3 18
+Ethernet36 21,22 Ethernet10/1 19
+Ethernet38 23,24 Ethernet10/3 20
+Ethernet40 37,38 Ethernet11/1 21
+Ethernet42 39,40 Ethernet11/3 22
+Ethernet44 45,46 Ethernet12/1 23
+Ethernet46 47,48 Ethernet12/3 24
+Ethernet48 57,58 Ethernet13/1 25
+Ethernet50 59,60 Ethernet13/3 26
+Ethernet52 53,54 Ethernet14/1 27
+Ethernet54 55,56 Ethernet14/3 28
+Ethernet56 117,118 Ethernet15/1 29
+Ethernet58 119,120 Ethernet15/3 30
+Ethernet60 121,122 Ethernet16/1 31
+Ethernet62 123,124 Ethernet16/3 32
+Ethernet64 141,142 Ethernet17/1 33
+Ethernet66 143,144 Ethernet17/3 34
+Ethernet68 133,134,135,136 Ethernet18/1 35
+Ethernet72 197,198 Ethernet19/1 36
+Ethernet74 199,200 Ethernet19/3 37
+Ethernet76 205,206,207,208 Ethernet20/1 38
+Ethernet80 217,218 Ethernet21/1 39
+Ethernet82 219,220 Ethernet21/3 40
+Ethernet84 213,214 Ethernet22/1 41
+Ethernet86 215,216 Ethernet22/3 42
+Ethernet88 229,230 Ethernet23/1 43
+Ethernet90 231,232 Ethernet23/3 44
+Ethernet92 237,238 Ethernet24/1 45
+Ethernet94 239,240 Ethernet24/3 46
+Ethernet96 249,250 Ethernet25/1 47
+Ethernet98 251,252 Ethernet25/3 48
+Ethernet100 245,246 Ethernet26/1 49
+Ethernet102 247,248 Ethernet26/3 50
+Ethernet104 149,150 Ethernet27/1 51
+Ethernet106 151,152 Ethernet27/3 52
+Ethernet108 153,154 Ethernet28/1 53
+Ethernet110 155,156 Ethernet28/3 54
+Ethernet112 173,174 Ethernet29/1 55
+Ethernet114 175,176 Ethernet29/3 56
+Ethernet116 161,162 Ethernet30/1 57
+Ethernet118 163,164 Ethernet30/3 58
+Ethernet120 181,182 Ethernet31/1 59
+Ethernet122 183,184 Ethernet31/3 60
+Ethernet124 185,186 Ethernet32/1 61
+Ethernet126 187,188 Ethernet32/3 62
+Ethernet128 69,70 Ethernet33/1 63
+Ethernet130 71,72 Ethernet33/3 64
+Ethernet132 73,74 Ethernet34/1 65
+Ethernet134 75,76 Ethernet34/3 66
+Ethernet136 93,94 Ethernet35/1 67
+Ethernet138 95,96 Ethernet35/3 68
+Ethernet140 81,82 Ethernet36/1 69
+Ethernet142 83,84 Ethernet36/3 70
+Ethernet144 101,102 Ethernet37/1 71
+Ethernet146 103,104 Ethernet37/3 72
+Ethernet148 105,106 Ethernet38/1 73
+Ethernet150 107,108 Ethernet38/3 74
+Ethernet152 9,10 Ethernet39/1 75
+Ethernet154 11,12 Ethernet39/3 76
+Ethernet156 1,2 Ethernet40/1 77
+Ethernet158 3,4 Ethernet40/3 78
+Ethernet160 17,18 Ethernet41/1 79
+Ethernet162 19,20 Ethernet41/3 80
+Ethernet164 29,30 Ethernet42/1 81
+Ethernet166 31,32 Ethernet42/1 82
+Ethernet168 41,42 Ethernet43/1 83
+Ethernet170 43,44 Ethernet43/3 84
+Ethernet172 33,34 Ethernet44/1 85
+Ethernet174 35,36 Ethernet44/3 86
+Ethernet176 49,50,51,52 Ethernet45/1 87
+Ethernet180 61,62,63,64 Ethernet46/1 88
+Ethernet184 125,126,127,128 Ethernet47/1 89
+Ethernet188 113,114,115,116 Ethernet48/1 90
+Ethernet192 129,130,131,132 Ethernet49/1 91
+Ethernet196 137,138,139,140 Ethernet50/1 92
+Ethernet200 201,202,203,204 Ethernet51/1 93
+Ethernet204 193,194,195,196 Ethernet52/1 94
+Ethernet208 209,210 Ethernet53/1 95
+Ethernet210 211,212 Ethernet53/3 96
+Ethernet212 221,222 Ethernet54/1 97
+Ethernet214 223,224 Ethernet54/3 98
+Ethernet216 233,234 Ethernet55/1 99
+Ethernet218 235,236 Ethernet55/3 100
+Ethernet220 225,226 Ethernet56/1 101
+Ethernet222 227,228 Ethernet56/3 102
+Ethernet224 241,242 Ethernet57/1 103
+Ethernet226 243,244 Ethernet57/3 104
+Ethernet228 253,254 Ethernet58/1 105
+Ethernet230 255,256 Ethernet58/3 106
+Ethernet232 157,158 Ethernet59/1 107
+Ethernet234 159,160 Ethernet59/3 108
+Ethernet236 145,146 Ethernet60/1 109
+Ethernet238 147,148 Ethernet60/3 110
+Ethernet240 165,166 Ethernet61/1 111
+Ethernet242 167,168 Ethernet61/3 112
+Ethernet244 169,170 Ethernet62/1 113
+Ethernet246 171,172 Ethernet62/3 114
+Ethernet248 189,190 Ethernet63/1 115
+Ethernet250 191,192 Ethernet63/3 116
+Ethernet252 177,178 Ethernet64/1 117
+Ethernet254 179,180 Ethernet64/3 118
+Ethernet256 257 Ethernet257 119
+Ethernet260 259 Ethernet259 120
diff --git a/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/sai.profile b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/sai.profile
new file mode 100644
index 0000000000..030527daf9
--- /dev/null
+++ b/device/arista/x86_64-arista_7260cx3_64/Arista-7260CX3-D108C8/sai.profile
@@ -0,0 +1 @@
+SAI_INIT_CONFIG_FILE=/etc/bcm/th2-a7260cx3-64-108x50G+10x100G.config.bcm
diff --git a/device/arista/x86_64-arista_7260cx3_64/minigraph.xml b/device/arista/x86_64-arista_7260cx3_64/minigraph.xml
index 957b60822b..2c632dacc4 100644
--- a/device/arista/x86_64-arista_7260cx3_64/minigraph.xml
+++ b/device/arista/x86_64-arista_7260cx3_64/minigraph.xml
@@ -809,7 +809,7 @@
sonic
- Arista-7260CX3-64
+ Arista-7260CX3-C64
@@ -844,5 +844,5 @@
sonic
- Arista-7260CX3-64
+ Arista-7260CX3-C64
diff --git a/device/arista/x86_64-arista_7260cx3_64/plugins/sfputil.py b/device/arista/x86_64-arista_7260cx3_64/plugins/sfputil.py
index ce60de2b38..9a6d770d46 100644
--- a/device/arista/x86_64-arista_7260cx3_64/plugins/sfputil.py
+++ b/device/arista/x86_64-arista_7260cx3_64/plugins/sfputil.py
@@ -1,8 +1,12 @@
-#!/usr/bin/env python
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
try:
- import arista.utils.sonic_sfputil as arista_sfputil
-except ImportError, e:
- raise ImportError (str(e) + "- required module not found")
+ import arista.utils.sonic_sfputil as arista_sfputil
+except ImportError as e:
+ raise ImportError("%s - required module not found" % str(e))
-sfputil = arista_sfputil.getSfpUtil()
+
+SfpUtil = arista_sfputil.getSfpUtil()
diff --git a/device/dell/x86_64-dell_s6100_c2538-r0/nos_to_sonic_grub.cfg b/device/dell/x86_64-dell_s6100_c2538-r0/nos_to_sonic_grub.cfg
new file mode 100644
index 0000000000..058b1a9ea1
--- /dev/null
+++ b/device/dell/x86_64-dell_s6100_c2538-r0/nos_to_sonic_grub.cfg
@@ -0,0 +1,44 @@
+#
+# Grub config to launch SONiC
+# with ONIE boot option
+
+insmod serial
+# Initialize USB-Serial com2 port
+serial --unit=1 --speed=9600
+#Serial port config;Defaults: COM1,9600
+serial --unit=0 --speed=9600
+terminal_output serial_com0
+terminal_input serial_com0
+#terminfo added to prevent text wrap issue.
+terminfo -g 80x100 serial_com0
+terminfo -g 80x100 serial_com1
+
+echo -n "Press Esc to stop autoboot ... "
+if sleep --verbose --interruptible 5 ; then
+ insmod gzio
+ insmod part_msdos
+ insmod ext2
+ set root='(hd0,gpt8)'
+ linux /image-%%IMAGE_VERSION%%/boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda8 rw console=tty0 console=ttyS1,9600n8 loop=image-%%IMAGE_VERSION%%/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor
+ initrd /image-%%IMAGE_VERSION%%/boot/initrd.img-3.16.0-4-amd64
+ boot
+else
+ menuentry 'SONiC' {
+ insmod gzio
+ insmod part_msdos
+ insmod ext2
+ set root='(hd0,gpt8)'
+ linux /image-%%IMAGE_VERSION%%/boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda8 rw console=tty0 console=ttyS1,9600n8 loop=image-%%IMAGE_VERSION%%/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor
+ initrd /image-%%IMAGE_VERSION%%/boot/initrd.img-3.16.0-4-amd64
+ boot
+ }
+
+ menuentry 'ONIE' {
+ insmod force10
+ onieboot
+ }
+
+ menuentry 'DELL-DIAG' {
+ delldiagboot
+ }
+fi
diff --git a/device/dell/x86_64-dell_z9100_c2538-r0/nos_to_sonic_grub.cfg b/device/dell/x86_64-dell_z9100_c2538-r0/nos_to_sonic_grub.cfg
new file mode 100644
index 0000000000..058b1a9ea1
--- /dev/null
+++ b/device/dell/x86_64-dell_z9100_c2538-r0/nos_to_sonic_grub.cfg
@@ -0,0 +1,44 @@
+#
+# Grub config to launch SONiC
+# with ONIE boot option
+
+insmod serial
+# Initialize USB-Serial com2 port
+serial --unit=1 --speed=9600
+#Serial port config;Defaults: COM1,9600
+serial --unit=0 --speed=9600
+terminal_output serial_com0
+terminal_input serial_com0
+#terminfo added to prevent text wrap issue.
+terminfo -g 80x100 serial_com0
+terminfo -g 80x100 serial_com1
+
+echo -n "Press Esc to stop autoboot ... "
+if sleep --verbose --interruptible 5 ; then
+ insmod gzio
+ insmod part_msdos
+ insmod ext2
+ set root='(hd0,gpt8)'
+ linux /image-%%IMAGE_VERSION%%/boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda8 rw console=tty0 console=ttyS1,9600n8 loop=image-%%IMAGE_VERSION%%/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor
+ initrd /image-%%IMAGE_VERSION%%/boot/initrd.img-3.16.0-4-amd64
+ boot
+else
+ menuentry 'SONiC' {
+ insmod gzio
+ insmod part_msdos
+ insmod ext2
+ set root='(hd0,gpt8)'
+ linux /image-%%IMAGE_VERSION%%/boot/vmlinuz-3.16.0-4-amd64 root=/dev/sda8 rw console=tty0 console=ttyS1,9600n8 loop=image-%%IMAGE_VERSION%%/fs.squashfs loopfstype=squashfs apparmor=1 security=apparmor
+ initrd /image-%%IMAGE_VERSION%%/boot/initrd.img-3.16.0-4-amd64
+ boot
+ }
+
+ menuentry 'ONIE' {
+ insmod force10
+ onieboot
+ }
+
+ menuentry 'DELL-DIAG' {
+ delldiagboot
+ }
+fi
diff --git a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py
index c6628e66e4..ce0adde71a 100644
--- a/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py
+++ b/device/mellanox/x86_64-mlnx_msn2100-r0/plugins/sfputil.py
@@ -1,28 +1,62 @@
-#! /usr/bin/python
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
try:
- from sonic_sfp.sfputilbase import sfputilbase
-except ImportError, e:
- raise ImportError (str(e) + "- required module not found")
+ import time
+ from sonic_sfp.sfputilbase import SfpUtilBase
+except ImportError as e:
+ raise ImportError("%s - required module not found" % str(e))
-class sfputil(sfputilbase):
- """Platform specific sfputil class"""
+class SfpUtil(SfpUtilBase):
+ """Platform-specific SfpUtil class"""
- port_start = 0
- port_end = 15
- ports_in_block = 16
+ PORT_START = 0
+ PORT_END = 15
+ PORTS_IN_BLOCK = 16
- eeprom_offset = 1
+ EEPROM_OFFSET = 1
- port_to_eeprom_mapping = {}
+ _port_to_eeprom_mapping = {}
- _qsfp_ports = range(0, ports_in_block + 1)
+ @property
+ def port_start(self):
+ return self.PORT_START
+
+ @property
+ def port_end(self):
+ return self.PORT_END
+
+ @property
+ def qsfp_ports(self):
+ return range(0, self.PORTS_IN_BLOCK + 1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ def __init__(self):
+ eeprom_path = "/bsp/qsfp/qsfp{0}"
- def __init__(self, port_num):
- # Override port_to_eeprom_mapping for class initialization
- eeprom_path = '/bsp/qsfp/qsfp{0}'
for x in range(0, self.port_end + 1):
- self.port_to_eeprom_mapping[x] = eeprom_path.format(x + self.eeprom_offset)
- sfputilbase.__init__(self, port_num)
-
+ self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET)
+
+ SfpUtilBase.__init__(self)
+
+ def get_presence(self, port_num):
+
+ raise NotImplementedError
+
+ def get_low_power_mode(self, port_num):
+
+ raise NotImplementedError
+
+ def set_low_power_mode(self, port_num, lpmode):
+
+ raise NotImplementedError
+
+ def reset(self, port_num):
+
+ raise NotImplementedError
diff --git a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py
index 9d4474ac1e..db71cb4235 100644
--- a/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py
+++ b/device/mellanox/x86_64-mlnx_msn2410-r0/plugins/sfputil.py
@@ -1,28 +1,62 @@
-#! /usr/bin/python
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
try:
- from sonic_sfp.sfputilbase import sfputilbase
-except ImportError, e:
- raise ImportError (str(e) + "- required module not found")
+ import time
+ from sonic_sfp.sfputilbase import SfpUtilBase
+except ImportError as e:
+ raise ImportError("%s - required module not found" % str(e))
-class sfputil(sfputilbase):
- """Platform specific sfputil class"""
+class SfpUtil(SfpUtilBase):
+ """Platform-specific SfpUtil class"""
- port_start = 0
- port_end = 55
- ports_in_block = 56
+ PORT_START = 0
+ PORT_END = 55
+ PORTS_IN_BLOCK = 56
- eeprom_offset = 1
+ EEPROM_OFFSET = 1
- port_to_eeprom_mapping = {}
+ _port_to_eeprom_mapping = {}
- _qsfp_ports = range(0, ports_in_block + 1)
+ @property
+ def port_start(self):
+ return self.PORT_START
+
+ @property
+ def port_end(self):
+ return self.PORT_END
+
+ @property
+ def qsfp_ports(self):
+ return range(0, self.PORTS_IN_BLOCK + 1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ def __init__(self):
+ eeprom_path = "/bsp/qsfp/qsfp{0}"
- def __init__(self, port_num):
- # Override port_to_eeprom_mapping for class initialization
- eeprom_path = '/bsp/qsfp/qsfp{0}'
for x in range(0, self.port_end + 1):
- self.port_to_eeprom_mapping[x] = eeprom_path.format(x + self.eeprom_offset)
- sfputilbase.__init__(self, port_num)
-
+ self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET)
+
+ SfpUtilBase.__init__(self)
+
+ def get_presence(self, port_num):
+
+ raise NotImplementedError
+
+ def get_low_power_mode(self, port_num):
+
+ raise NotImplementedError
+
+ def set_low_power_mode(self, port_num, lpmode):
+
+ raise NotImplementedError
+
+ def reset(self, port_num):
+
+ raise NotImplementedError
diff --git a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
index 04e9a4eff8..b746af2199 100644
--- a/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
+++ b/device/mellanox/x86_64-mlnx_msn2700-r0/plugins/sfputil.py
@@ -1,28 +1,62 @@
-#! /usr/bin/python
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
try:
- from sonic_sfp.sfputilbase import sfputilbase
-except ImportError, e:
- raise ImportError (str(e) + "- required module not found")
+ import time
+ from sonic_sfp.sfputilbase import SfpUtilBase
+except ImportError as e:
+ raise ImportError("%s - required module not found" % str(e))
-class sfputil(sfputilbase):
- """Platform specific sfputil class"""
+class SfpUtil(SfpUtilBase):
+ """Platform-specific SfpUtil class"""
- port_start = 0
- port_end = 31
- ports_in_block = 32
+ PORT_START = 0
+ PORT_END = 31
+ PORTS_IN_BLOCK = 32
- eeprom_offset = 1
+ EEPROM_OFFSET = 1
- port_to_eeprom_mapping = {}
+ _port_to_eeprom_mapping = {}
- _qsfp_ports = range(0, ports_in_block + 1)
+ @property
+ def port_start(self):
+ return self.PORT_START
+
+ @property
+ def port_end(self):
+ return self.PORT_END
+
+ @property
+ def qsfp_ports(self):
+ return range(0, self.PORTS_IN_BLOCK + 1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ def __init__(self):
+ eeprom_path = "/bsp/qsfp/qsfp{0}"
- def __init__(self, port_num):
- # Override port_to_eeprom_mapping for class initialization
- eeprom_path = '/bsp/qsfp/qsfp{0}'
for x in range(0, self.port_end + 1):
- self.port_to_eeprom_mapping[x] = eeprom_path.format(x + self.eeprom_offset)
- sfputilbase.__init__(self, port_num)
-
+ self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET)
+
+ SfpUtilBase.__init__(self)
+
+ def get_presence(self, port_num):
+
+ raise NotImplementedError
+
+ def get_low_power_mode(self, port_num):
+
+ raise NotImplementedError
+
+ def set_low_power_mode(self, port_num, lpmode):
+
+ raise NotImplementedError
+
+ def reset(self, port_num):
+
+ raise NotImplementedError
diff --git a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py
index 04e9a4eff8..b746af2199 100644
--- a/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py
+++ b/device/mellanox/x86_64-mlnx_msn2740-r0/plugins/sfputil.py
@@ -1,28 +1,62 @@
-#! /usr/bin/python
+# sfputil.py
+#
+# Platform-specific SFP transceiver interface for SONiC
+#
try:
- from sonic_sfp.sfputilbase import sfputilbase
-except ImportError, e:
- raise ImportError (str(e) + "- required module not found")
+ import time
+ from sonic_sfp.sfputilbase import SfpUtilBase
+except ImportError as e:
+ raise ImportError("%s - required module not found" % str(e))
-class sfputil(sfputilbase):
- """Platform specific sfputil class"""
+class SfpUtil(SfpUtilBase):
+ """Platform-specific SfpUtil class"""
- port_start = 0
- port_end = 31
- ports_in_block = 32
+ PORT_START = 0
+ PORT_END = 31
+ PORTS_IN_BLOCK = 32
- eeprom_offset = 1
+ EEPROM_OFFSET = 1
- port_to_eeprom_mapping = {}
+ _port_to_eeprom_mapping = {}
- _qsfp_ports = range(0, ports_in_block + 1)
+ @property
+ def port_start(self):
+ return self.PORT_START
+
+ @property
+ def port_end(self):
+ return self.PORT_END
+
+ @property
+ def qsfp_ports(self):
+ return range(0, self.PORTS_IN_BLOCK + 1)
+
+ @property
+ def port_to_eeprom_mapping(self):
+ return self._port_to_eeprom_mapping
+
+ def __init__(self):
+ eeprom_path = "/bsp/qsfp/qsfp{0}"
- def __init__(self, port_num):
- # Override port_to_eeprom_mapping for class initialization
- eeprom_path = '/bsp/qsfp/qsfp{0}'
for x in range(0, self.port_end + 1):
- self.port_to_eeprom_mapping[x] = eeprom_path.format(x + self.eeprom_offset)
- sfputilbase.__init__(self, port_num)
-
+ self._port_to_eeprom_mapping[x] = eeprom_path.format(x + self.EEPROM_OFFSET)
+
+ SfpUtilBase.__init__(self)
+
+ def get_presence(self, port_num):
+
+ raise NotImplementedError
+
+ def get_low_power_mode(self, port_num):
+
+ raise NotImplementedError
+
+ def set_low_power_mode(self, port_num, lpmode):
+
+ raise NotImplementedError
+
+ def reset(self, port_num):
+
+ raise NotImplementedError
diff --git a/dockers/docker-config-engine/Dockerfile.j2 b/dockers/docker-config-engine/Dockerfile.j2
index 68555d4477..b4d924bddf 100644
--- a/dockers/docker-config-engine/Dockerfile.j2
+++ b/dockers/docker-config-engine/Dockerfile.j2
@@ -10,7 +10,7 @@ RUN apt-get install -y python-lxml python-yaml python-bitarray python-pip python
RUN pip install --upgrade pip
-RUN pip install netaddr ipaddr jinja2 pyangbind
+RUN pip install netaddr ipaddr jinja2 pyangbind==0.5.10
{% if docker_config_engine_debs.strip() %}
COPY \
diff --git a/dockers/docker-orchagent/Dockerfile.j2 b/dockers/docker-orchagent/Dockerfile.j2
index 73fb087401..587d8f4db2 100755
--- a/dockers/docker-orchagent/Dockerfile.j2
+++ b/dockers/docker-orchagent/Dockerfile.j2
@@ -30,5 +30,6 @@ COPY ["arp_update", "start.sh", "orchagent.sh", "swssconfig.sh", "/usr/bin/"]
COPY ["supervisord.conf", "/etc/supervisor/conf.d/"]
COPY ["ipinip.json.j2", "/usr/share/sonic/templates/"]
COPY ["mirror.json.j2", "/usr/share/sonic/templates/"]
+COPY ["ports.json.j2", "/usr/share/sonic/templates/"]
ENTRYPOINT ["/usr/bin/supervisord"]
diff --git a/dockers/docker-orchagent/ports.json.j2 b/dockers/docker-orchagent/ports.json.j2
new file mode 100644
index 0000000000..f59ee993ee
--- /dev/null
+++ b/dockers/docker-orchagent/ports.json.j2
@@ -0,0 +1,11 @@
+[
+{% for interface in ethernet_interfaces %}
+ {
+ "PORT_TABLE:{{ interface['name'] }}": {
+ "speed": "{{ interface['speed'] }}"
+ },
+ "OP": "SET"
+ }{% if not loop.last %},{% endif %}
+
+{% endfor %}
+]
diff --git a/dockers/docker-orchagent/start.sh b/dockers/docker-orchagent/start.sh
index 446b52852f..c2ad787cd3 100755
--- a/dockers/docker-orchagent/start.sh
+++ b/dockers/docker-orchagent/start.sh
@@ -4,6 +4,7 @@ mkdir -p /etc/swss/config.d/
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/ipinip.json.j2 > /etc/swss/config.d/ipinip.json
sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/mirror.json.j2 > /etc/swss/config.d/mirror.json
+sonic-cfggen -m /etc/sonic/minigraph.xml -t /usr/share/sonic/templates/ports.json.j2 > /etc/swss/config.d/ports.json
export platform=`sonic-cfggen -m /etc/sonic/minigraph.xml -v platform`
diff --git a/dockers/docker-orchagent/swssconfig.sh b/dockers/docker-orchagent/swssconfig.sh
index 329d1439d8..88ce239958 100755
--- a/dockers/docker-orchagent/swssconfig.sh
+++ b/dockers/docker-orchagent/swssconfig.sh
@@ -38,7 +38,7 @@ fast_reboot
HWSKU=`sonic-cfggen -m /etc/sonic/minigraph.xml -v minigraph_hwsku`
-SWSSCONFIG_ARGS="00-copp.config.json ipinip.json mirror.json "
+SWSSCONFIG_ARGS="00-copp.config.json ipinip.json mirror.json ports.json "
# FIXME: Temporarily disable QOS/buffer configurations for further debugging
# if [ "$HWSKU" == "Force10-S6000" ]; then
diff --git a/files/image_config/platform/rc.local b/files/image_config/platform/rc.local
index 49b2ed6e1b..8b8db4a261 100755
--- a/files/image_config/platform/rc.local
+++ b/files/image_config/platform/rc.local
@@ -11,6 +11,27 @@
#
# By default this script does nothing.
+# If the machine.conf is absent, it indicates that the unit booted
+# into SONiC from another NOS. Extract the machine.conf from ONIE.
+if [ ! -e /host/machine.conf ]; then
+ onie_dev=$(blkid | grep ONIE-BOOT | head -n 1 | awk '{print $1}' | sed -e 's/:.*$//')
+ mkdir -p /mnt/onie-boot
+ mount $onie_dev /mnt/onie-boot
+ onie_grub_cfg=/mnt/onie-boot/onie/grub/grub-machine.cfg
+
+ if [ ! -e $onie_grub_cfg ]; then
+ echo "$onie_grub_cfg not found" >> /etc/migration.log
+ else
+ . ./$onie_grub_cfg
+ grep = $onie_grub_cfg | sed -e 's/onie_//' -e 's/=.*$//' | while read var ; do
+ eval val='$'onie_$var
+ echo "onie_${var}=${val}" >> /host/machine.conf
+ done
+ fi
+
+ umount /mnt/onie-boot
+fi
+
. /host/machine.conf
echo "install platform dependent packages at the first boot time"
diff --git a/installer/sharch_body.sh b/installer/sharch_body.sh
index 8260d0fd00..d22fe26b69 100644
--- a/installer/sharch_body.sh
+++ b/installer/sharch_body.sh
@@ -27,6 +27,7 @@ echo " OK."
# Untar and launch install script in a tmpfs
cur_wd=$(pwd)
+export cur_wd
archive_path=$(realpath "$0")
tmp_dir=$(mktemp -d)
if [ "$(id -u)" = "0" ] ; then
diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh
index ca8c4d3e47..ad1cc3691f 100755
--- a/installer/x86_64/install.sh
+++ b/installer/x86_64/install.sh
@@ -24,8 +24,25 @@ _trap_push true
set -e
cd $(dirname $0)
+if [ -d "/etc/sonic" ]; then
+ echo "Installing SONiC in SONiC"
+ install_env="sonic"
+elif grep -Fxqs "DISTRIB_ID=onie" /etc/lsb-release > /dev/null
+then
+ echo "Installing SONiC in ONIE"
+ install_env="onie"
+else
+ echo "Installing SONiC in BUILD"
+ install_env="build"
+fi
+
+if [ -r ./machine.conf ]; then
. ./machine.conf
+fi
+
+if [ -r ./onie-image.conf ]; then
. ./onie-image.conf
+fi
echo "ONIE Installer: platform: $platform"
@@ -40,7 +57,7 @@ if [ -r /etc/machine.conf ]; then
. /etc/machine.conf
elif [ -r /host/machine.conf ]; then
. /host/machine.conf
-else
+elif [ "$install_env" != "build" ]; then
echo "cannot find machine.conf"
exit 1
fi
@@ -58,26 +75,20 @@ ONIE_PLATFORM_EXTRA_CMDLINE_LINUX=""
# Default var/log device size in MB
VAR_LOG_SIZE=4096
-if [ -d "/etc/sonic" ]; then
- echo "Installing SONiC in SONiC"
- install_env="sonic"
-else
- echo "Installing SONiC in ONIE"
- install_env="onie"
-fi
-
[ -r platforms/$onie_platform ] && . platforms/$onie_platform
# Install demo on same block device as ONIE
-onie_dev=$(blkid | grep ONIE-BOOT | head -n 1 | awk '{print $1}' | sed -e 's/:.*$//')
-blk_dev=$(echo $onie_dev | sed -e 's/[1-9][0-9]*$//' | sed -e 's/\([0-9]\)\(p\)/\1/')
-# Note: ONIE has no mount setting for / with device node, so below will be empty string
-cur_part=$(cat /proc/mounts | awk "{ if(\$2==\"/\") print \$1 }" | grep $blk_dev || true)
+if [ "$install_env" != "build" ]; then
+ onie_dev=$(blkid | grep ONIE-BOOT | head -n 1 | awk '{print $1}' | sed -e 's/:.*$//')
+ blk_dev=$(echo $onie_dev | sed -e 's/[1-9][0-9]*$//' | sed -e 's/\([0-9]\)\(p\)/\1/')
+ # Note: ONIE has no mount setting for / with device node, so below will be empty string
+ cur_part=$(cat /proc/mounts | awk "{ if(\$2==\"/\") print \$1 }" | grep $blk_dev || true)
-[ -b "$blk_dev" ] || {
- echo "Error: Unable to determine block device of ONIE install"
- exit 1
-}
+ [ -b "$blk_dev" ] || {
+ echo "Error: Unable to determine block device of ONIE install"
+ exit 1
+ }
+fi
# If running in ONIE
if [ "$install_env" = "onie" ]; then
@@ -108,7 +119,7 @@ else
firmware="bios"
fi
-if [ "$install_env" != "sonic" ]; then
+if [ "$install_env" = "onie" ]; then
# determine ONIE partition type
onie_partition_type=$(${onie_bin} onie-sysinfo -t)
# demo partition size in MB
@@ -310,6 +321,7 @@ demo_install_grub()
cat $grub_install_log && rm -f $grub_install_log
exit 1
}
+
rm -f $grub_install_log
# restore immutable flag on the core.img file as discussed
@@ -374,7 +386,7 @@ demo_install_uefi_grub()
image_dir="image-$image_version"
-if [ "$install_env" != "sonic" ]; then
+if [ "$install_env" = "onie" ]; then
eval $create_demo_partition $blk_dev
demo_dev=$(echo $blk_dev | sed -e 's/\(mmcblk[0-9]\)/\1p/')$demo_part
@@ -391,7 +403,8 @@ if [ "$install_env" != "sonic" ]; then
echo "Error: Unable to mount $demo_dev on $demo_mnt"
exit 1
}
-else
+
+elif [ "$install_env" = "sonic" ]; then
demo_mnt="/host"
running_sonic_revision=$(cat /etc/sonic/sonic_version.yml | grep build_version | cut -f2 -d" ")
# Prevent installing existing SONiC if it is running
@@ -406,6 +419,15 @@ else
rm -rf $f
fi
done
+else
+ demo_mnt="build_raw_image_mnt"
+ demo_dev=$cur_wd/"%%OUTPUT_RAW_IMAGE%%"
+
+ mkfs.ext4 $demo_dev
+
+ echo "Mounting $demo_dev on $demo_mnt..."
+ mkdir $demo_mnt
+ mount -t auto -o loop $demo_dev $demo_mnt
fi
echo "Installing SONiC to $demo_mnt/$image_dir"
@@ -446,7 +468,7 @@ if [ "$VAR_LOG_SIZE" != "0" ]; then
mkfs.ext4 -q $demo_mnt/disk-img/var-log.ext4 -F
fi
-if [ "$install_env" != "sonic" ]; then
+if [ "$install_env" = "onie" ]; then
# Store machine description in target file system
cp /etc/machine.conf $demo_mnt
@@ -547,7 +569,7 @@ menuentry '$demo_grub_entry' {
}
EOF
-if [ "$install_env" != "sonic" ]; then
+if [ "$install_env" = "onie" ]; then
# Add menu entries for ONIE -- use the grub fragment provided by the
# ONIE distribution.
$onie_root_dir/grub.d/50_onie_grub >> $grub_cfg
@@ -559,7 +581,11 @@ $onie_menuentry
EOF
fi
-cp $grub_cfg $onie_initrd_tmp/$demo_mnt/grub/grub.cfg
+if [ "$install_env" = "build" ]; then
+ umount $demo_mnt
+else
+ cp $grub_cfg $onie_initrd_tmp/$demo_mnt/grub/grub.cfg
+fi
cd /
diff --git a/onie-image.conf b/onie-image.conf
index f12e23f741..b6564feb1a 100644
--- a/onie-image.conf
+++ b/onie-image.conf
@@ -27,6 +27,12 @@ DOCKERFS_DIR=docker
## Output file name for onie installer
OUTPUT_ONIE_IMAGE=target/sonic-$TARGET_MACHINE.bin
+### Output file name for raw image
+OUTPUT_RAW_IMAGE=target/sonic-$TARGET_MACHINE.raw
+
+### Raw image size in MB
+RAW_IMAGE_DISK_SIZE=8192
+
## Output file name for aboot installer
OUTPUT_ABOOT_IMAGE=target/sonic-aboot-$TARGET_MACHINE.swi
diff --git a/onie-mk-demo.sh b/onie-mk-demo.sh
index 91d6d1b3ce..b8418d79a6 100755
--- a/onie-mk-demo.sh
+++ b/onie-mk-demo.sh
@@ -83,11 +83,16 @@ cp onie-image.conf $tmp_installdir
# sed. Special chars are: \ / &
EXTRA_CMDLINE_LINUX=`echo $EXTRA_CMDLINE_LINUX | sed -e 's/[\/&]/\\\&/g'`
+output_raw_image=$(cat onie-image.conf | grep OUTPUT_RAW_IMAGE | cut -f2 -d"=")
+[ -z "$TARGET_MACHINE" ] && output_raw_image=$(echo $output_raw_image | sed -e 's/$TARGET_MACHINE/$machine/g')
+output_raw_image=$(eval echo $output_raw_image)
+
# Tailor the demo installer for OS mode or DIAG mode
sed -i -e "s/%%DEMO_TYPE%%/$demo_type/g" \
-e "s/%%IMAGE_VERSION%%/$image_version/g" \
-e "s/%%ONIE_IMAGE_PART_SIZE%%/$onie_image_part_size/" \
-e "s/%%EXTRA_CMDLINE_LINUX%%/$EXTRA_CMDLINE_LINUX/" \
+ -e "s@%%OUTPUT_RAW_IMAGE%%@$output_raw_image@" \
$tmp_installdir/install.sh || clean_up 1
echo -n "."
cp -r $* $tmp_installdir || clean_up 1
diff --git a/platform/broadcom/raw-image.mk b/platform/broadcom/raw-image.mk
new file mode 100644
index 0000000000..ae93683c54
--- /dev/null
+++ b/platform/broadcom/raw-image.mk
@@ -0,0 +1,9 @@
+# sonic broadcom raw image installer
+
+SONIC_RAW_IMAGE = sonic-broadcom.raw
+$(SONIC_RAW_IMAGE)_MACHINE = broadcom
+$(SONIC_RAW_IMAGE)_IMAGE_TYPE = raw
+$(SONIC_RAW_IMAGE)_DEPENDS += $(BRCM_OPENNSL_KERNEL)
+$(SONIC_RAW_IMAGE)_INSTALLS += $($(SONIC_ONE_IMAGE)_INSTALLS)
+$(SONIC_RAW_IMAGE)_DOCKERS += $(SONIC_INSTALL_DOCKER_IMAGES)
+SONIC_INSTALLERS += $(SONIC_RAW_IMAGE)
diff --git a/platform/broadcom/rules.mk b/platform/broadcom/rules.mk
index 4ee7fa9130..529919d63e 100755
--- a/platform/broadcom/rules.mk
+++ b/platform/broadcom/rules.mk
@@ -11,6 +11,7 @@ include $(PLATFORM_PATH)/docker-orchagent-brcm.mk
include $(PLATFORM_PATH)/docker-syncd-brcm.mk
include $(PLATFORM_PATH)/docker-syncd-brcm-rpc.mk
include $(PLATFORM_PATH)/one-image.mk
+include $(PLATFORM_PATH)/raw-image.mk
include $(PLATFORM_PATH)/one-aboot.mk
include $(PLATFORM_PATH)/libsaithrift-dev.mk
include $(PLATFORM_PATH)/python-saithrift.mk
diff --git a/platform/broadcom/sonic-platform-modules-arista b/platform/broadcom/sonic-platform-modules-arista
index 51bbe2cd86..7c505290bb 160000
--- a/platform/broadcom/sonic-platform-modules-arista
+++ b/platform/broadcom/sonic-platform-modules-arista
@@ -1 +1 @@
-Subproject commit 51bbe2cd86af7df20b27e0cd1f02c2ad08ab2f03
+Subproject commit 7c505290bb26babdef604a377e71b3df702897a8
diff --git a/platform/broadcom/sonic-platform-modules-dell b/platform/broadcom/sonic-platform-modules-dell
index 6cff8248fa..5ab014c0d4 160000
--- a/platform/broadcom/sonic-platform-modules-dell
+++ b/platform/broadcom/sonic-platform-modules-dell
@@ -1 +1 @@
-Subproject commit 6cff8248fa8c772a077bf3dcb5c86a376357f261
+Subproject commit 5ab014c0d4f9ad71d7791e7d4da0645d2b2d493b
diff --git a/platform/cavium/cavm-sai.mk b/platform/cavium/cavm-sai.mk
index c52c4960b9..0008135729 100644
--- a/platform/cavium/cavm-sai.mk
+++ b/platform/cavium/cavm-sai.mk
@@ -1,6 +1,6 @@
# Cavium SAI
-CAVM_SAI_GITHUB = https://github.com/XPliant/OpenXPS/raw/eedd0b8bb7e7a09602a24418a462a5c10792a145/SAI/cavm-sai/
+CAVM_SAI_GITHUB = https://github.com/XPliant/OpenXPS/raw/13a7eaf10f523e7887964ca235f19095fcc88537/SAI/cavm-sai/
CAVM_LIBSAI = libsai.deb
CAVM_SAI = sai.deb
diff --git a/platform/cavium/cavm-xpnet.mk b/platform/cavium/cavm-xpnet.mk
index 613fa94335..ed86558a36 100644
--- a/platform/cavium/cavm-xpnet.mk
+++ b/platform/cavium/cavm-xpnet.mk
@@ -1,4 +1,4 @@
-CAVM_SAI_URL = https://github.com/XPliant/OpenXPS/raw/092461a1cf57a11132fbf8e74fa79bab3ab00f2a/SAI
+CAVM_SAI_URL = https://github.com/XPliant/OpenXPS/raw/c26aea6a7098936ab3692e148238d73fa8962585/SAI
CAVM_XPNET_DEB = xp80-Pcie-Endpoint.deb
$(CAVM_XPNET_DEB)_URL = $(CAVM_SAI_URL)/netdev/$(CAVM_XPNET_DEB)
diff --git a/sonic-slave/Dockerfile b/sonic-slave/Dockerfile
index 826a7129a7..f194bf604c 100644
--- a/sonic-slave/Dockerfile
+++ b/sonic-slave/Dockerfile
@@ -221,7 +221,7 @@ RUN pip install \
RUN pip install j2cli
# For sonic config engine testing
-RUN pip install pyangbind
+RUN pip install pyangbind==0.5.10
# For supervisor build
RUN pip install meld3 mock
diff --git a/src/sonic-config-engine/minigraph.py b/src/sonic-config-engine/minigraph.py
index 6dbf0d570d..1877e55285 100644
--- a/src/sonic-config-engine/minigraph.py
+++ b/src/sonic-config-engine/minigraph.py
@@ -325,6 +325,19 @@ def parse_meta(meta, hname):
deployment_id = value
return syslog_servers, dhcp_servers, ntp_servers, mgmt_routes, erspan_dst, deployment_id
+def parse_deviceinfo(meta, hwsku):
+ ethernet_interfaces = []
+
+ for device_info in meta.findall(str(QName(ns, "DeviceInfo"))):
+ dev_sku = device_info.find(str(QName(ns, "HwSku"))).text
+ if dev_sku == hwsku:
+ interfaces = device_info.find(str(QName(ns, "EthernetInterfaces")))
+ for interface in interfaces.findall(str(QName(ns1, "EthernetInterface"))):
+ name = interface.find(str(QName(ns, "InterfaceName"))).text
+ speed = interface.find(str(QName(ns, "Speed"))).text
+ ethernet_interfaces.append({ 'name':name, 'speed':speed })
+
+ return ethernet_interfaces
def get_console_info(devices, dev, port):
for k, v in devices.items():
@@ -411,6 +424,7 @@ def parse_xml(filename, platform=None, port_config_file=None):
neighbors = None
devices = None
hostname = None
+ ethernet_interfaces = []
syslog_servers = []
dhcp_servers = []
ntp_servers = []
@@ -440,6 +454,8 @@ def parse_xml(filename, platform=None, port_config_file=None):
(u_neighbors, u_devices, _, _, _, _) = parse_png(child, hostname)
elif child.tag == str(QName(ns, "MetadataDeclaration")):
(syslog_servers, dhcp_servers, ntp_servers, mgmt_routes, erspan_dst, deployment_id) = parse_meta(child, hostname)
+ elif child.tag == str(QName(ns, "DeviceInfos")):
+ ethernet_interfaces = parse_deviceinfo(child, hwsku)
results = {}
results['minigraph_hwsku'] = hwsku
@@ -488,6 +504,7 @@ def parse_xml(filename, platform=None, port_config_file=None):
results['forced_mgmt_routes'] = mgmt_routes
results['erspan_dst'] = erspan_dst
results['deployment_id'] = deployment_id
+ results['ethernet_interfaces'] = ethernet_interfaces
return results
diff --git a/src/sonic-config-engine/tests/simple-sample-graph.xml b/src/sonic-config-engine/tests/simple-sample-graph.xml
index 20bfb07f00..7daae24f49 100644
--- a/src/sonic-config-engine/tests/simple-sample-graph.xml
+++ b/src/sonic-config-engine/tests/simple-sample-graph.xml
@@ -200,6 +200,68 @@
+
+
+ true
+
+
+ DeviceInterface
+
+ true
+ true
+ 1
+ fortyGigE0/0
+
+ false
+ 0
+ 0
+ 10000
+
+
+ DeviceInterface
+
+ true
+ true
+ 1
+ fortyGigE0/4
+
+ false
+ 0
+ 0
+ 25000
+
+
+ DeviceInterface
+
+ true
+ true
+ 1
+ fortyGigE0/8
+
+ false
+ 0
+ 0
+ 40000
+
+
+ DeviceInterface
+
+ true
+ true
+ 1
+ fortyGigE0/12
+
+ false
+ 0
+ 0
+ 1000000
+
+
+ true
+ 0
+ Force10-S6000
+
+
switch-t0
Force10-S6000
diff --git a/src/sonic-config-engine/tests/test_cfggen.py b/src/sonic-config-engine/tests/test_cfggen.py
index d3ff3e8b9f..153b0bb14f 100644
--- a/src/sonic-config-engine/tests/test_cfggen.py
+++ b/src/sonic-config-engine/tests/test_cfggen.py
@@ -119,3 +119,8 @@ class TestCfgGen(TestCase):
argument = '-m "' + self.sample_graph_bgp_speaker + '" -p "' + self.port_config + '" -v deployment_id'
output = self.run_script(argument)
self.assertEqual(output.strip(), "1")
+
+ def test_minigraph_ethernet_interfaces(self):
+ argument = '-m "' + self.sample_graph_simple + '" -p "' + self.port_config + '" -v ethernet_interfaces'
+ output = self.run_script(argument)
+ self.assertEqual(output.strip(), "[{'speed': '10000', 'name': 'fortyGigE0/0'}, {'speed': '25000', 'name': 'fortyGigE0/4'}, {'speed': '40000', 'name': 'fortyGigE0/8'}, {'speed': '1000000', 'name': 'fortyGigE0/12'}]")