boot0: add support for Quicksilver
This commit is contained in:
parent
86a9ab6a7b
commit
f5ca0b2eae
@ -457,15 +457,23 @@ EOF
|
|||||||
chmod a+r "${target_path}/machine.conf"
|
chmod a+r "${target_path}/machine.conf"
|
||||||
}
|
}
|
||||||
|
|
||||||
read_system_eeprom() {
|
read_eeprom() {
|
||||||
if [ -x /bin/readprefdl ] && [ -f /tmp/.system-prefdl ]; then
|
if [ -x /bin/readprefdl ] && [ -f "$1" ]; then
|
||||||
readprefdl -f /tmp/.system-prefdl -d > $target_path/.system-prefdl
|
readprefdl -f "$1" -d > $target_path/.system-prefdl
|
||||||
elif [ -f /etc/prefdl ]; then
|
elif [ -f /etc/prefdl ]; then
|
||||||
cp /etc/prefdl $target_path/.system-prefdl
|
cp /etc/prefdl $target_path/.system-prefdl
|
||||||
chmod a+r $target_path/.system-prefdl
|
chmod a+r $target_path/.system-prefdl
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
read_switch_eeprom() {
|
||||||
|
read_eeprom /tmp/.switch-prefdl
|
||||||
|
}
|
||||||
|
|
||||||
|
read_system_eeprom() {
|
||||||
|
read_eeprom /tmp/.system-prefdl
|
||||||
|
}
|
||||||
|
|
||||||
write_platform_specific_cmdline() {
|
write_platform_specific_cmdline() {
|
||||||
local platform="$(cmdline_get platform)"
|
local platform="$(cmdline_get platform)"
|
||||||
local sid="$(cmdline_get sid | sed 's/Ssd$//')"
|
local sid="$(cmdline_get sid | sed 's/Ssd$//')"
|
||||||
@ -615,6 +623,9 @@ write_platform_specific_cmdline() {
|
|||||||
aboot_machine=arista_7280cr3mk_32p4
|
aboot_machine=arista_7280cr3mk_32p4
|
||||||
flash_size=7382
|
flash_size=7382
|
||||||
fi
|
fi
|
||||||
|
if in_array "$sid" "Shearwater4Mk2" "Shearwater4Mk2N" "Shearwater4Mk2QuicksilverDD" "Shearwater4Mk2NQuicksilverDD"; then
|
||||||
|
aboot_machine=arista_7060x6_64de
|
||||||
|
fi
|
||||||
|
|
||||||
# disable cpu c-state other than C1
|
# disable cpu c-state other than C1
|
||||||
local cpuvendor="$(sed -nr 's/vendor_id[\t ]*: (.*)/\1/p' /proc/cpuinfo | head -n 1)"
|
local cpuvendor="$(sed -nr 's/vendor_id[\t ]*: (.*)/\1/p' /proc/cpuinfo | head -n 1)"
|
||||||
@ -656,6 +667,13 @@ write_platform_specific_cmdline() {
|
|||||||
if in_array "$platform" "prairieisland"; then
|
if in_array "$platform" "prairieisland"; then
|
||||||
read_system_eeprom
|
read_system_eeprom
|
||||||
fi
|
fi
|
||||||
|
if in_array "$platform" "shearwater"; then
|
||||||
|
if [ -f /tmp/.switch-prefdl ]; then
|
||||||
|
read_switch_eeprom
|
||||||
|
else
|
||||||
|
read_system_eeprom
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $varlog_size -eq 0 ]; then
|
if [ $varlog_size -eq 0 ]; then
|
||||||
if [ $flash_size -ge 28000 ]; then
|
if [ $flash_size -ge 28000 ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user