-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Andrew Sapronov <andrew.sapronov@gmail.com> Signed-off-by: Michael Shych <michaelsh@nvidia.com>
- Loading branch information
1 parent
9859878
commit 8c87c37
Showing
11 changed files
with
468 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
===================================== | ||
Installing ONIE on Netberg Aurora 621 | ||
===================================== | ||
|
||
Cross-Compiling ONIE | ||
==================== | ||
|
||
To compile ONIE first change directories to ``build-config`` and then | ||
type ``"make MACHINEROOT=../machine/netberg MACHINE=netberg_aurora_621 all"``. For example:: | ||
|
||
$ cd build-config | ||
$ make MACHINEROOT=../machine/netberg MACHINE=netberg_aurora_621 all | ||
|
||
When complete, the ONIE binaries are located in | ||
``build/images``:: | ||
|
||
-rw-rw-r-- 1 asapronov asapronov 10925880 Dec 5 21:22 netberg_aurora_621-r0.initrd | ||
-rw-rw-r-- 1 asapronov asapronov 3883088 Dec 5 21:21 netberg_aurora_621-r0.vmlinuz | ||
-rw-rw-r-- 1 asapronov asapronov 33488896 Dec 5 21:23 onie-recovery-x86_64-netberg_aurora_621-r0.iso | ||
-rw-rw-r-- 1 asapronov asapronov 14778362 Dec 5 21:22 onie-updater-x86_64-netberg_aurora_621-r0 | ||
|
||
netberg_aurora_621-r0.vmlinuz -- This is the ONIE kernel image | ||
|
||
netberg_aurora_621-r0.initrd -- This is the ONIE initramfs (filesystem) | ||
|
||
onie-updater-x86_64-netberg_aurora_621-r0 -- This is the ONIE self-update image. | ||
This image is a self-extracting archive used for installing ONIE. | ||
|
||
onie-recovery-x86_64-netberg_aurora_621-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 Netberg Aurora 621 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 | ||
|
||
+----------------------------------------------------------------------------+ | ||
|*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. | ||
|
||
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CONFIG_STATIC=y | ||
CONFIG_SYS_EEPROM=y | ||
CONFIG_SYS_EEPROM_DEVICE_I2C=y | ||
CONFIG_SYS_EEPROM_I2C_DEVICE="/dev/i2c-5" | ||
CONFIG_SYS_EEPROM_I2C_ADDR=0x53 | ||
CONFIG_SYS_EEPROM_I2C_MEM_ADDR_BITS=16 | ||
CONFIG_SYS_EEPROM_I2C_WRITE_1B_DELAY=4000 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# Aurora 621 specific info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Netberg Aurora 621 | ||
# CPU Module: Intel Denverton-NS | ||
|
||
|
||
description="Netberg Aurora 621" | ||
|
||
# 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/sd*/device; do | ||
|
||
# Intel Denverton-NS SATA Controller 1 Registers (D20:F0) | ||
if echo $(readlink -f $_device)|egrep -q "pci0000:00\/0000:00:14.0"; then | ||
_disk=`echo $_device | cut -f4 -d/` | ||
echo /dev/$_disk | ||
return 0 | ||
fi | ||
done | ||
|
||
for _device in /sys/block/mmc*/device; do | ||
# Intel Denverton-NS PCI Controller 1 Registers (D28:F0) | ||
if echo $(readlink -f $_device)|egrep -q "pci0000:00\/0000:00:1c.0"; 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CONFIG_IGB=y | ||
CONFIG_I2C_I801=y | ||
CONFIG_I2C_SMBUS =y | ||
CONFIG_I2C_ISMT=y | ||
CONFIG_I2C_ALGOBIT=n | ||
CONFIG_I2C_ALGOPCF=n | ||
CONFIG_I2C_ALGOPCA=n | ||
CONFIG_I2C_HELPER_AUTO=n | ||
CONFIG_USB_XHCI_PLATFORM=y | ||
CONFIG_USB_XHCI_HCD=y | ||
CONFIG_USB_XHCI_PCI=y | ||
|
||
CONFIG_IPMI_HANDLER=y | ||
CONFIG_IPMI_DEVICE_INTERFACE=y | ||
CONFIG_IPMI_SI=y | ||
CONFIG_USB_STORAGE=y | ||
CONFIG_CHR_DEV_SG=y | ||
|
||
CONFIG_IO_DELAY_0XED=y | ||
CONFIG_DEFAULT_IO_DELAY_TYPE=1 | ||
# CONFIG_IO_DELAY_0X80 is not set | ||
|
||
CONFIG_X86_X2APIC=y | ||
CONFIG_I2C_MUX_PCA954x=y | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Netberg Aurora 621 | ||
# CPU Module: Intel Denvertion-NS | ||
|
||
ONIE_ARCH ?= x86_64 | ||
SWITCH_ASIC_VENDOR = bcm | ||
|
||
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. | ||
# ONIE Version = onie-release version + VENDOR_VERSION | ||
VENDOR_VERSION = v02 | ||
|
||
# Enable UEFI support | ||
UEFI_ENABLE = yes | ||
|
||
# This platform requires the PXE_EFI64 installer | ||
PXE_EFI64_ENABLE = yes | ||
|
||
# Vendor ID -- IANA Private Enterprise Number: | ||
# http://www.iana.org/assignments/enterprise-numbers | ||
# Open Compute Project IANA number | ||
VENDOR_ID = 50424 | ||
|
||
# Enable the i2ctools | ||
I2CTOOLS_ENABLE = yes | ||
IPMITOOL_ENABLE = yes | ||
|
||
# Enable ioget/ioset tools | ||
IOACCESS_ENABLE = yes | ||
|
||
EXTRA_CMDLINE_LINUX = earlycon=uart8250,io,0x3f8 acpi_osi="Linux" | ||
|
||
# | ||
# 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.9 | ||
LINUX_MINOR_VERSION = 95 | ||
|
||
# Older GCC required for older 3.2 kernel | ||
GCC_VERSION = 8.3.0 | ||
|
||
#------------------------------------------------------------------------------- | ||
# | ||
# Local Variables: | ||
# mode: makefile-gmake | ||
# End: |
26 changes: 26 additions & 0 deletions
26
machine/netberg/netberg_aurora_621/rootconf/sysroot-lib-onie/init-platform
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This script fragment is sourced by /etc/init.d/init-arch.sh, | ||
# which in turn executes the init_platform_pre_arch() and | ||
# init_platform_post_arch() functions. | ||
|
||
init_platform_post_arch() | ||
{ | ||
# | ||
# Init the iO-expander PCA9548 and | ||
# wait for the EEPROM to come up. | ||
# | ||
sleep 1 | ||
|
||
[ -w /sys/bus/i2c/devices/i2c-5/new_device ] || { | ||
[ -w /sys/bus/i2c/devices/i2c-1/new_device ] && { | ||
echo pca9548 0x70 > /sys/bus/i2c/devices/i2c-1/new_device | ||
} | ||
} | ||
|
||
if onie-syseeprom >/dev/null 2>&1; then | ||
echo "Info: EEPROM device found." | ||
else | ||
echo "Error: EEPROM device not found!!!" | ||
fi | ||
|
||
sleep 1 | ||
} |
Oops, something went wrong.