Skip to content

Commit

Permalink
Add ONIE support on a new Ingrasys S9130-32X platform
Browse files Browse the repository at this point in the history
Adding a new Ingrasys S9130-32X platform.  The machine has
32x40GbE/100GbE QSFP28 ports on MediaTek/Nephos NP8367 switch
ASIC. CPU module is Intel Xeon D-1518.

Signed-off-by: Wade He <[email protected]>
Signed-off-by: Curt Brune <[email protected]>
  • Loading branch information
wadelnn authored and Curt Brune committed Aug 8, 2017
1 parent deb2f83 commit 121cc7d
Show file tree
Hide file tree
Showing 8 changed files with 214 additions and 0 deletions.
99 changes: 99 additions & 0 deletions machine/ingrasys/ingrasys_s9130_32x/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
================================================================================
Installing ONIE on Ingrasys S9130 Series w/ Intel Xeon Broadwell-DE CPU Module
================================================================================

Cross-Compiling ONIE
====================

To compile ONIE first change directories to ``build-config`` and then
type ``"make MACHINEROOT=../machine/ingrasys MACHINE=ingrasys_s9130_32x all"``. For example::

$ cd build-config
$ make MACHINEROOT=../machine/ingrasys MACHINE=ingrasys_s9130_32x all

When complete, the ONIE binaries are located in
``build/images``::

-rw-r--r-- 1 feng feng 6132992 Mar 21 16:21 ingrasys_s9130_32x-r0.initrd
-rw-r--r-- 1 feng feng 3545776 Mar 21 16:21 ingrasys_s9130_32x-r0.vmlinuz
-rw-r--r-- 1 feng feng 22020096 Mar 21 16:21 onie-recovery-x86_64-ingrasys_s9130_32x-r0.iso
-rw-r--r-- 1 feng feng 9729911 Mar 21 16:21 onie-updater-x86_64-ingrasys_s9130_32x-r0

ingrasys_s9130_32x-r0.vmlinuz -- This is the ONIE kernel image

ingrasys_s9130_32x-r0.initrd -- This is the ONIE initramfs (filesystem)

onie-updater-x86_64-ingrasys_s9130_32x-r0 -- This is the ONIE self-update image.
This image is a self-extracting archive used for installing ONIE.

onie-recovery-x86_64-ingrasys_s9130_32x-r0.iso -- This is iso image containing ONIE kernel + ONIE initramfs with ONIE self-update image already included inside.
This might be very useful as it can be easily placed on USB/CD and one can boot from this to install/reinstall/repair ONIE


Installing ONIE on a Blank Machine
==================================

To install ONIE on a new machine use one of the onie-recovery images.

Overview
--------

An "ONIE recovery image" is used for:

1. installing ONIE on a blank machine, i.e. what manufacturing would
use.

2. recovering a destroyed ONIE system.

The recovery image is:

. <machine>.iso -- a hybrid ISO image.

ISO Recovery Image
------------------

The .iso image is used to create the usb recovery disk.

You can use the .iso image to create a bootable USB memory stick.
Use ``dd`` to copy the .iso image to a USB stick and boot from that::

dd if=<machine>.iso of=/dev/sdX bs=10M

For can find the correct ``/dev/sdX`` by inspecing the ``dmesg``
output after inserting the USB stick into your work station.

To enable booting from USB in BIOS:

1. Insert the USB stick

2. Power on the Ingrasys Switch

3. Press ECS to get into the BIOS and set USB as boot device

4. Wait for scanning USB disk grub.cfg

GNU GRUB version 2.02~beta2-4b8b913+

+----------------------------------------------------------------------------+
|*ONIE: Rescue |
| ONIE: Embed ONIE |
| |
| |
| |
| |
| |
| |
| |
| |
| |
+----------------------------------------------------------------------------+

Use the ^ and v keys to select which entry is highlighted.
Press enter to boot the selected OS, `e' to edit the commands
before booting or `c' for a command-line. ESC to return
previous menu.

5. Choose ``ONIE: Embed ONIE``, then ONIE will be ready after reboot.

6. ``ONIE: Rescue`` for ONIE rescue mode on USB disk shall also provide
an debugging environment.
10 changes: 10 additions & 0 deletions machine/ingrasys/ingrasys_s9130_32x/busybox/conf/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
CONFIG_SYS_EEPROM=y
CONFIG_SYS_EEPROM_DEVICE_I2C=y
CONFIG_SYS_EEPROM_I2C_DEVICE="/dev/i2c-0"
CONFIG_SYS_EEPROM_I2C_ADDR=0x55
CONFIG_SYS_EEPROM_I2C_MEM_ADDR_BITS=16
CONFIG_SYS_EEPROM_I2C_WRITE_2B_DELAY=4000
CONFIG_SYS_EEPROM_I2C_WRITE_3B_DELAY=4000
CONFIG_SYS_EEPROM_OFFSET=0
CONFIG_SYS_EEPROM_SIZE=512
CONFIG_SYS_EEPROM_MAX_SIZE=512
1 change: 1 addition & 0 deletions machine/ingrasys/ingrasys_s9130_32x/demo/platform.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# s9130-32x specific info
34 changes: 34 additions & 0 deletions machine/ingrasys/ingrasys_s9130_32x/installer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Ingrasys S9130 Series
# CPU Module: Intel Xeon Broadwell-DE


description="Ingrasys S9130-32X"

# Default ONIE block device
install_device_platform()
{
# find ata device on the systme, return the 1st one.

##
# find the sata dom
##

for _device in /sys/block/*/device; do

# work for kernel 4.1.17
if echo $(readlink -f $_device)|egrep -q "pci0000:00\/0000:00:1f.2"; then
_disk=`echo $_device | cut -f4 -d/`
echo /dev/$_disk
return 0
fi
done

# nothing found, just return /dev/sda
echo /dev/sda
return 1
}

# Local Variables:
# mode: shell-script
# eval: (sh-set-shell "/bin/sh" t nil)
# End:
11 changes: 11 additions & 0 deletions machine/ingrasys/ingrasys_s9130_32x/kernel/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
CONFIG_IGB=y
CONFIG_I2C_I801=y
CONFIG_I2C_ISMT=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_PCI=y
# CONFIG_USB_XHCI_HCD_DEBUGGING is not set
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
# CONFIG_USB_EHCI_TT_NEWSCHED is not set
# CONFIG_USB_EHCI_PCI is not set
# CONFIG_USB_EHCI_HCD_PLATFORM is not set
Empty file.
47 changes: 47 additions & 0 deletions machine/ingrasys/ingrasys_s9130_32x/machine.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Ingrasys S9130 Series
# CPU Module: Intel Xeon Broadwell-DE

ONIE_ARCH ?= x86_64
SWITCH_ASIC_VENDOR = nephos

VENDOR_REV ?= 0

# Translate hardware revision to ONIE hardware revision
ifeq ($(VENDOR_REV),0)
MACHINE_REV = 0
else
$(warning Unknown VENDOR_REV '$(VENDOR_REV)' for MACHINE '$(MACHINE)')
$(error Unknown VENDOR_REV)
endif

# The VENDOR_VERSION string is appended to the overal ONIE version
# string. HW vendors can use this to appended their own versioning
# information to the base ONIE version string.

# Vendor ID -- IANA Private Enterprise Number:
# http://www.iana.org/assignments/enterprise-numbers
# Open Compute Project IANA number
VENDOR_ID = 2468

# Enable the i2ctools
I2CTOOLS_ENABLE = yes

#
# Console parameters can be defined here (default values are in
# build-config/arch/x86_64.make).
#
CONSOLE_SPEED = 115200
CONSOLE_DEV = 0

# Set Linux kernel version
LINUX_VERSION = 4.1
LINUX_MINOR_VERSION = 38

# Older GCC required for older 3.2 kernel
GCC_VERSION = 4.9.2

#-------------------------------------------------------------------------------
#
# Local Variables:
# mode: makefile-gmake
# End:
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@

# Use the contents of /sys/class/net/eth0/address

get_ethaddr()
{
[ -r /sys/class/net/eth0/address ] && cat /sys/class/net/eth0/address
}

# Local Variables:
# mode: shell-script
# eval: (sh-set-shell "/bin/sh" t nil)
# End:

0 comments on commit 121cc7d

Please sign in to comment.