Skip to content

Commit c518311

Browse files
david56mshych
authored andcommitted
Accton AS9926_24DB: add to support ONIE
Signed-off-by: david_yang <[email protected]> Signed-off-by: Michael Shych <[email protected]>
1 parent 73d9885 commit c518311

File tree

11 files changed

+306
-0
lines changed

11 files changed

+306
-0
lines changed

build-config/scripts/onie-build-targets.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
{ "Vendor": "accton", "Platform": "accton_as9716_32d", "BuildEnv": "Debian10", "Release": "2023.05br", "Architecture": "amd64", "Notes": "No notes." },
6666
{ "Vendor": "accton", "Platform": "accton_as7946_30xb", "BuildEnv": "Debian10", "Release": "2023.05br", "Architecture": "amd64", "Notes": "No notes." },
6767
{ "Vendor": "accton", "Platform": "accton_as7946_74xkb", "BuildEnv": "Debian10", "Release": "2023.05br", "Architecture": "amd64", "Notes": "No notes." },
68+
{ "Vendor": "accton", "Platform": "accton_as9926_24db", "BuildEnv": "Debian10", "Release": "2023.05br", "Architecture": "amd64", "Notes": "No notes." },
6869
{ "Vendor": "accton", "Platform": "accton_as_28t_ops", "BuildEnv": "Debian9", "Release": "2021.08br", "Architecture": "armv7", "Notes": "No notes." },
6970
{ "Vendor": "accton", "Platform": "accton_asgvolt64", "BuildEnv": "Debian10", "Release": "2023.05br", "Architecture": "amd64", "Notes": "No notes." },
7071
{ "Vendor": "accton", "Platform": "accton_asxvolt16", "BuildEnv": "Debian10", "Release": "2023.05br", "Architecture": "amd64", "Notes": "No notes." },
Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
=====================================
2+
Installing ONIE on Accton AS9926_24DB
3+
=====================================
4+
5+
Cross-Compiling ONIE
6+
====================
7+
8+
Change directories to ``build-config`` to compile ONIE.
9+
10+
To compile ONIE first change directories to ``build-config`` and then
11+
type ``"make MACHINEROOT=../machine/accton MACHINE=accton_as9926_24db all"``.
12+
For example::
13+
14+
$ cd build-config
15+
$ make -j4 MACHINEROOT=../machine/accton MACHINE=accton_as9926_24db all
16+
17+
When complete, the ONIE binaries are located in
18+
``build/images``::
19+
20+
-rw-rw-r-- 1 8217496 Sep 17 14:24 accton_as9926_24db-r0.initrd
21+
-rw-rw-r-- 1 3445024 Sep 17 14:23 accton_as9926_24db-r0.vmlinuz
22+
-rw-rw-r-- 1 25952256 Sep 17 14:25 onie-recovery-x86_64-accton_as9926_24db-r0.iso
23+
-rw-rw-r-- 1 11695991 Sep 17 14:24 onie-updater-x86_64-accton_as9926_24db-r0
24+
25+
accton_as9926_24db-r0.vmlinuz -- This is the ONIE kernel image
26+
27+
accton_as9926_24db-r0.initrd -- This is the ONIE initramfs (filesystem)
28+
29+
onie-recovery-x86_64-accton_as9926_24db-r0.iso -- This is the ONIE recovery
30+
ISO image. This image can be used to create a bootable USB memory stick
31+
for installing/recovery ONIE.
32+
33+
onie-updater-x86_64-accton_as9926_24db-r0 -- This is the ONIE self-update
34+
image. This image is a self-extracting archive used for installing ONIE.
35+
36+
Installing ONIE on a Blank Machine
37+
==================================
38+
39+
To install ONIE on a new machine, you can use the recovery ISO image to
40+
create a bootable USB memory stick.
41+
42+
Creating bootable USB stick
43+
---------------------------
44+
45+
Use ``dd`` to copy the .iso image to a USB stick and boot from that::
46+
47+
dd if=<machine>.iso of=/dev/sdX bs=10M
48+
49+
You can find the correct ``/dev/sdX`` by inspecing the ``dmesg``
50+
output after inserting the USB stick into your work station.
51+
52+
Booting from USB stick
53+
----------------------
54+
55+
To enable booting from USB in the BIOS:
56+
57+
1. Insert the USB stick
58+
59+
2. Power on the switch and enter the BIOS configuration
60+
61+
3. Set the hard drive boot order:
62+
63+
In "Boot Option #1" select the device that corresponds to your
64+
device::
65+
66+
Boot-->Boot Option Priorities-->Boot Option #1
67+
68+
If the device name is not listed in "Boot Option #1", please
69+
check the priorities in the hard drive boot order::
70+
71+
Boot-->Hard Drive BBS Priorities-->Boot Option #1
72+
73+
Taking ``JetFlashTranscend 8GB 8.07`` as an example, the boot
74+
order will look like following::
75+
76+
Boot Option Priorities
77+
Boot Option #1 [JetFlashTranscend 8...]
78+
Boot Option #2 [ATP ATP IG eUSB 1100]
79+
Boot Option #3 [IBA GE Slot 00A0 v1543]
80+
Boot Option #4 [UEFI: Built-in EFI ...]
81+
82+
4. Save and Exit the BIOS configuration
83+
84+
5. After several seconds, you should see:
85+
86+
GNU GRUB version 2.02~beta2+e4a1fe391
87+
88+
+----------------------------------------------------------------------------+
89+
|*ONIE: Rescue |
90+
| ONIE: Embed ONIE |
91+
| |
92+
| |
93+
| |
94+
| |
95+
| |
96+
| |
97+
| |
98+
| |
99+
| |
100+
| |
101+
+----------------------------------------------------------------------------+
102+
103+
Use the ^ and v keys to select which entry is highlighted.
104+
Press enter to boot the selected OS, `e' to edit the commands
105+
before booting or `c' for a command-line.
106+
107+
- Choose ``ONIE: Embed ONIE`` for creating a fresh partition layout and
108+
installing ONIE automatically. All data on the mass storage will be
109+
erased.
110+
- Choose ``ONIE: Rescue`` for entering ONIE recovery command-line shell.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CONFIG_SYS_EEPROM=y
2+
CONFIG_SYS_EEPROM_DEVICE_I2C=y
3+
CONFIG_SYS_EEPROM_I2C_DEVICE="/dev/i2c-0"
4+
CONFIG_SYS_EEPROM_I2C_ADDR=0x55
5+
CONFIG_SYS_EEPROM_I2C_MEM_ADDR_BITS=16
6+
CONFIG_SYS_EEPROM_I2C_WRITE_2B_DELAY=4000
7+
CONFIG_SYS_EEPROM_I2C_WRITE_3B_DELAY=4000
8+
CONFIG_SYS_EEPROM_OFFSET=0
9+
CONFIG_SYS_EEPROM_SIZE=256
10+
CONFIG_SYS_EEPROM_MAX_SIZE=256
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
onie-syseeprom-ipmi.patch
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# as9926_24db specific info
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Accton as9926_24db ONIE installer configuration
2+
3+
description="Accton, as9926_24db"
4+
5+
mass_dev="storage-not-found"
6+
discover_mass_storage()
7+
{
8+
mass_bus="$1"
9+
for i in a b c d e ; do
10+
if $(ls -l /sys/block/sd$i/device 2>/dev/null | grep -q "$mass_bus") ; then
11+
mass_dev="/dev/sd$i"
12+
return 0
13+
fi
14+
done
15+
return 1
16+
}
17+
18+
# Default ONIE block device
19+
install_device_platform()
20+
{
21+
discover_mass_storage "target0:0:0" ||
22+
discover_mass_storage "target1:0:0"
23+
ret=$?
24+
echo "$mass_dev"
25+
return $ret
26+
}
27+
28+
# Local Variables:
29+
# mode: shell-script
30+
# eval: (sh-set-shell "/bin/sh" t nil)
31+
# End:
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
CONFIG_IGB=y
2+
CONFIG_I2C_I801=y
3+
CONFIG_USB_XHCI_HCD=y
4+
# CONFIG_USB_XHCI_PLATFORM is not set
5+
CONFIG_USB_USBNET=y
6+
# CONFIG_USB_NET_AX8817X is not set
7+
# CONFIG_USB_NET_AX88179_178A is not set
8+
CONFIG_USB_NET_CDCETHER=y
9+
# CONFIG_USB_NET_CDC_EEM is not set
10+
CONFIG_USB_NET_CDC_NCM=y
11+
# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set
12+
# CONFIG_USB_NET_CDC_MBIM is not set
13+
# CONFIG_USB_NET_DM9601 is not set
14+
# CONFIG_USB_NET_SR9700 is not set
15+
# CONFIG_USB_NET_SR9800 is not set
16+
# CONFIG_USB_NET_SMSC75XX is not set
17+
# CONFIG_USB_NET_SMSC95XX is not set
18+
# CONFIG_USB_NET_GL620A is not set
19+
# CONFIG_USB_NET_NET1080 is not set
20+
# CONFIG_USB_NET_PLUSB is not set
21+
# CONFIG_USB_NET_MCS7830 is not set
22+
# CONFIG_USB_NET_RNDIS_HOST is not set
23+
# CONFIG_USB_NET_CDC_SUBSET is not set
24+
# CONFIG_USB_NET_ZAURUS is not set
25+
# CONFIG_USB_NET_CX82310_ETH is not set
26+
# CONFIG_USB_NET_KALMIA is not set
27+
# CONFIG_USB_NET_QMI_WWAN is not set
28+
# CONFIG_USB_NET_INT51X1 is not set
29+
# CONFIG_USB_SIERRA_NET is not set
30+
# CONFIG_USB_VL600 is not set
31+
# CONFIG_USB_NET_CH9200 is not set
32+
# CONFIG_USB_NET_AQC111 is not set
33+
CONFIG_USB_ACM=y
34+
# CONFIG_DCB is not set
35+
CONFIG_IXGBE=y
36+
CONFIG_IXGBE_HWMON=y
37+
CONFIG_IPMI_HANDLER=y
38+
# CONFIG_IPMI_PANIC_EVENT is not set
39+
CONFIG_IPMI_DEVICE_INTERFACE=y
40+
CONFIG_IPMI_SI=y
41+
CONFIG_IPMI_SI_PROBE_DEFAULTS=y
42+
# CONFIG_IPMI_SSIF is not set
43+
# CONFIG_IPMI_WATCHDOG is not set
44+
# CONFIG_IPMI_POWEROFF is not set
45+
# CONFIG_ACPI_IPMI is not set
46+
# CONFIG_SENSORS_IBMAEM is not set
47+
# CONFIG_SENSORS_IBMPEX is not set
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
driver-ixgbe-phy.patch
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Accton AS9926_24DB
2+
3+
# Vendor's version number can be defined here.
4+
# Available variable is 'VENDOR_VERSION'.
5+
# e.g.,
6+
# VENDOR_VERSION = .00.01
7+
8+
ONIE_ARCH ?= x86_64
9+
SWITCH_ASIC_VENDOR = bcm
10+
11+
VENDOR_REV ?= 0
12+
13+
# Translate hardware revision to ONIE hardware revision
14+
ifeq ($(VENDOR_REV),0)
15+
MACHINE_REV = 0
16+
else
17+
$(warning Unknown VENDOR_REV '$(VENDOR_REV)' for MACHINE '$(MACHINE)')
18+
$(error Unknown VENDOR_REV)
19+
endif
20+
21+
# Vendor ID -- IANA Private Enterprise Number:
22+
# http://www.iana.org/assignments/enterprise-numbers
23+
# Accton Technology Corporation IANA number
24+
VENDOR_ID = 259
25+
26+
IPMITOOL_ENABLE = yes
27+
SKIP_ETHMGMT_MACS = yes
28+
29+
UEFI_ENABLE = yes
30+
PXE_EFI64_ENABLE = yes
31+
32+
# Console parameters
33+
CONSOLE_DEV = 0
34+
35+
# Set Linux kernel version
36+
LINUX_VERSION = 5.4
37+
LINUX_MINOR_VERSION = 86
38+
39+
GCC_VERSION = 8.3.0
40+
41+
#-------------------------------------------------------------------------------
42+
#
43+
# Local Variables:
44+
# mode: makefile-gmake
45+
# End:
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# -*- shell-script -*-
2+
3+
# Demonstration of the init-platform functionality
4+
5+
# This script fragment is sourced by /etc/init.d/init-arch.sh, which
6+
# in turn executes the init_platform_pre_arch() and
7+
# init_platform_post_arch() functions.
8+
9+
# A machine can use this feature to run any early boot scripts needed
10+
# by the machine. A typical usage would be to initialize specific
11+
# hardware devices.
12+
13+
# Use this function to perform any initializations required by the
14+
# architecture specific initialization. This function executes before
15+
# the architecture initializations.
16+
init_platform_pre_arch()
17+
{
18+
local cnt=0
19+
local max_cnt=20
20+
while [ $cnt -lt $max_cnt ] ; do
21+
if ipmitool mc info >/dev/null 2>&1 ; then
22+
break
23+
fi
24+
echo "remove,kcs,i/o,0xca2" > /sys/module/ipmi_si/parameters/hotmod
25+
echo "add,kcs,i/o,0xca2" > /sys/module/ipmi_si/parameters/hotmod
26+
cnt=$(( $cnt + 1 ))
27+
sleep 3
28+
done
29+
local status=$(ipmitool raw 0x34 0x95 2>/dev/null | awk '{print $1}')
30+
if [ "$status" = "01" ] ; then
31+
ipmitool raw 0x34 0x60 >/dev/null 2>&1
32+
sleep 7
33+
fi
34+
_log_info_msg "Info: Setting TX-Enable on OOBF ports... "
35+
i2cset -y -f 0 0x77 0x01 >/dev/null 2>&1
36+
i2cset -y -f 0 0x76 0x10 >/dev/null 2>&1
37+
i2cset -y -f 0 0x62 0x21 0x00 >/dev/null 2>&1
38+
if [ $? -eq 0 ] ; then
39+
_log_info_msg "done.\n"
40+
else
41+
_log_info_msg "failed.\n"
42+
fi
43+
if [ "$status" = "01" ] ; then
44+
ipmitool raw 0x34 0x61 >/dev/null 2>&1
45+
sleep 4
46+
fi
47+
}

0 commit comments

Comments
 (0)