aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86/base-files
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/x86/base-files')
-rw-r--r--target/linux/x86/base-files/etc/board.d/01_leds4
-rw-r--r--target/linux/x86/base-files/etc/board.d/02_network3
-rw-r--r--target/linux/x86/base-files/lib/upgrade/platform.sh10
3 files changed, 17 insertions, 0 deletions
diff --git a/target/linux/x86/base-files/etc/board.d/01_leds b/target/linux/x86/base-files/etc/board.d/01_leds
index 79e1191080..74ad2d59fe 100644
--- a/target/linux/x86/base-files/etc/board.d/01_leds
+++ b/target/linux/x86/base-files/etc/board.d/01_leds
@@ -7,6 +7,10 @@
board_config_update
case "$(board_name)" in
+cisco-mx100-hw)
+ ucidef_set_led_usbport "usb" "USB" "mx100:green:usb" "1-1-port2"
+ ucidef_set_led_default "diag" "DIAG" "mx100:green:tricolor" "1"
+ ;;
pc-engines-apu1|pc-engines-apu2|pc-engines-apu3)
ucidef_set_led_netdev "wan" "WAN" "apu:green:3" "eth0"
ucidef_set_led_netdev "lan" "LAN" "apu:green:2" "br-lan"
diff --git a/target/linux/x86/base-files/etc/board.d/02_network b/target/linux/x86/base-files/etc/board.d/02_network
index 30035dcbe9..2a07518096 100644
--- a/target/linux/x86/base-files/etc/board.d/02_network
+++ b/target/linux/x86/base-files/etc/board.d/02_network
@@ -8,6 +8,9 @@
board_config_update
case "$(board_name)" in
+cisco-mx100-hw)
+ ucidef_set_interfaces_lan_wan "eth0 eth1 eth2 eth3 eth4 eth5 eth7 eth8 eth9 eth10 eth11" "eth6"
+ ;;
pc-engines-apu1|pc-engines-apu2|pc-engines-apu3)
ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
;;
diff --git a/target/linux/x86/base-files/lib/upgrade/platform.sh b/target/linux/x86/base-files/lib/upgrade/platform.sh
index d8f2eba97e..94bf80b144 100644
--- a/target/linux/x86/base-files/lib/upgrade/platform.sh
+++ b/target/linux/x86/base-files/lib/upgrade/platform.sh
@@ -65,6 +65,16 @@ platform_do_bootloader_upgrade() {
"/dev/$diskdev" \
&& touch /tmp/boot/boot/grub/upgraded
+ case "$(board_name)" in
+ cisco-mx100-hw)
+ # If the MX100 is booted UEFI AND the SATA HDD exists, we need to change
+ # grub's root= to hd1 for it to boot correctly, otherwise we can keep it hd0.
+ if [ -d /sys/firmware/efi ] && [ "$(ls -a /dev/sd[a-z] | wc -w)" -gt 1 ] ; then
+ sed -i "s|hd0,${parttable}1|hd1,${parttable}1|g" /tmp/boot/boot/grub/grub.cfg
+ fi
+ ;;
+ esac
+
umount /tmp/boot
fi
}