[device] Misc fixes for Arista platforms (#1844)

* Update sensors.conf for 7050QX-32 and 7050QX-32S

These two platforms were using a previous version of a kernel driver.
The new one names the i2c buses differently.
We therefore need to rename them here.

* Fix the default minigraph for the 7050QX-32S

The interface offset is invalid which makes sonic-cfggen generate an
invalid config_db.jon in rc.local.
This config then silently makes orchagent/syncd fail.

* Use the partition on which sonic-aboot.swi is

Instead of always assuming /mnt/flash, use the partition where the image
to be installed lies.
This allow for the image to be on any partition.
This commit is contained in:
Samuel Angebault 2018-07-05 14:30:57 -07:00 committed by lguohan
parent 3950da10e0
commit 26afa348ea
4 changed files with 50 additions and 886 deletions

View File

@ -2,11 +2,11 @@
# ------------------------------------------------
#
bus "i2c-2" "SCD SMBus master 0 bus 0"
bus "i2c-3" "SCD SMBus master 0 bus 1"
bus "i2c-5" "SCD SMBus master 0 bus 3"
bus "i2c-6" "SCD SMBus master 0 bus 4"
bus "i2c-7" "SCD SMBus master 0 bus 5"
bus "i2c-2" "SCD 0000:04:00.0 SMBus master 0 bus 0"
bus "i2c-3" "SCD 0000:04:00.0 SMBus master 0 bus 1"
bus "i2c-5" "SCD 0000:04:00.0 SMBus master 0 bus 3"
bus "i2c-6" "SCD 0000:04:00.0 SMBus master 0 bus 4"
bus "i2c-7" "SCD 0000:04:00.0 SMBus master 0 bus 5"
chip "k10temp-pci-00c3"
label temp1 "Cpu temp sensor"

File diff suppressed because it is too large Load Diff

View File

@ -2,11 +2,11 @@
# ------------------------------------------------
#
bus "i2c-2" "SCD SMBus master 0 bus 0"
bus "i2c-3" "SCD SMBus master 0 bus 1"
bus "i2c-5" "SCD SMBus master 0 bus 3"
bus "i2c-6" "SCD SMBus master 0 bus 4"
bus "i2c-7" "SCD SMBus master 0 bus 5"
bus "i2c-2" "SCD 0000:02:00.0 SMBus master 0 bus 0"
bus "i2c-3" "SCD 0000:02:00.0 SMBus master 0 bus 1"
bus "i2c-5" "SCD 0000:02:00.0 SMBus master 0 bus 3"
bus "i2c-6" "SCD 0000:02:00.0 SMBus master 0 bus 4"
bus "i2c-7" "SCD 0000:02:00.0 SMBus master 0 bus 5"
chip "k10temp-pci-00c3"
label temp1 "Cpu temp sensor"

View File

@ -105,6 +105,7 @@ for x in "$@"; do
loop=*)
x1="${x#loop=}"
image_dir="${x1%/*}"
;;
esac
done
root_dev="$ROOT"
@ -168,12 +169,14 @@ umount "$root_mnt"
#### Lines below will modify the root file system, so any failure will be trapped to shell for manual interventions.
# Create a new partition table (content in flash_dev will be deleted)
err_msg="Error: repartitioning $flash_dev failed"
cmd="echo ';' | sfdisk $flash_dev || (sleep 3; blockdev --rereadpt $flash_dev && fdisk -l $flash_dev | grep -q ${root_dev}.*Linux)"
run_cmd "$cmd" "$err_msg"
if [ $(echo -n "$root_dev" | tail -c 1) == "1" ]; then
# Create a new partition table (content in flash_dev will be deleted)
err_msg="Error: repartitioning $flash_dev failed"
cmd="echo ';' | sfdisk $flash_dev || (sleep 3; blockdev --rereadpt $flash_dev && fdisk -l $flash_dev | grep -q ${root_dev}.*Linux)"
run_cmd "$cmd" "$err_msg"
fi
sleep 5
sleep 2
err_msg="Error: timeout in waiting for $root_dev after repartition"
cmd="wait_for_root_dev"
run_cmd "$cmd" "$err_msg"