Skip to content

Commit

Permalink
New platform: delta_agcv208s
Browse files Browse the repository at this point in the history
GitHub pull request: 920

Signed-off-by: grace <[email protected]>
Signed-off-by: Alex Doyle <[email protected]>
  • Loading branch information
grace authored and alexdoyle committed Jun 15, 2020
1 parent cdfa419 commit ea6408c
Show file tree
Hide file tree
Showing 14 changed files with 497 additions and 0 deletions.
1 change: 1 addition & 0 deletions build-config/scripts/onie-build-targets.json
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@
{ "Vendor": "delta", "Platform": "delta_ag9064", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_agc7648a", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_agc7648s", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_agcv208s", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_agcv208sv1", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_ak7448", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
{ "Vendor": "delta", "Platform": "delta_common_bwde", "BuildEnv": "Debian9", "Release": "2020.05br", "Architecture": "amd64", "Notes": "No notes." },
Expand Down
86 changes: 86 additions & 0 deletions machine/delta/delta_agcv208s/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
================================================================================
Installing ONIE on DELTA agcv208s Switch (CPU Module : Intel Broadwell Xeon D CPU Module)
================================================================================

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

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

$ cd build-config
$ make -j4 MACHINEROOT=../machine/delta MACHINE=delta_agcv208s all

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

-rw-r--r-- 1 lsharma ncore 3903568 Dec 6 19:45 delta_agcv208s-r0.vmlinuz
-rw-r--r-- 1 lsharma ncore 5504404 May 28 15:31 9480204 Dec 6 19:41 delta_agcv208s-r0.initrd
-rw-r--r-- 1 lsharma ncore 13539191 Dec 6 19:45 onie-updater-x86_64-delta_agcv208s-r0
-rw-r--r-- 1 lsharma ncore 30670848 Dec 6 19:46 onie-recovery-x86_64-delta_agcv208s-r0.iso

Cross-Compiling the DEMO OS
===========================

To compile the demo OS first change directories to ``build-config``
and then type ``"make MACHINEROOT=../machine/delta MACHINE=delta_agcv208s demo"``. For example::

$ cd build-config
$ make -j4 MACHINEROOT=../machine/delta MACHINE=delta_agcv208s demo

When complete, the demo OS installer is located in ``build/images``::

-rw-r--r-- 13415688 Dec 6 19:50 demo-installer-x86_64-delta_agcv208s-r0.bin

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
------------------

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

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 the BIOS:

1. Insert the USB stick (needs to be in before configuring BIOS)

2. Power on the S6010 and enter the BIOS configuration

3. Set the USB device to "Hard Disk"::

Advanced-->USB Configuration-->Mass Storage Devices:
<Name of your device> [Hard Disk]

<Name of your device> might be something like "SanDisk 1.26".

4. Set the hard drive boot order::

Boot-->Hard Drive BBS Priorities-->Boot Option #1

In "Boot Option #1" select the device that corresponds to your
device.

5. Save and Exit the BIOS configuration

10 changes: 10 additions & 0 deletions machine/delta/delta_agcv208s/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_MAX_SIZE=16384
CONFIG_SYS_EEPROM_OFFSET=2048
CONFIG_SYS_EEPROM_SIZE=1024
CONFIG_SYS_EEPROM_I2C_DEVICE="/dev/i2c-1"
CONFIG_SYS_EEPROM_I2C_ADDR=0x56
CONFIG_SYS_EEPROM_I2C_MEM_ADDR_BITS=16
CONFIG_SYS_EEPROM_I2C_WRITE_3B_DELAY=4000
CONFIG_SYS_EEPROM_I2C_WRITE_2B_DELAY=4000
Empty file.
2 changes: 2 additions & 0 deletions machine/delta/delta_agcv208s/demo/platform.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# delta_agcv208s specific info

18 changes: 18 additions & 0 deletions machine/delta/delta_agcv208s/firmware/bios/update_bios.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

#
# Copyright (C) 2016 Curt Brune <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0
#

# This is a sample place holder script for updating a machine BIOS. A
# real BIOS update script would use a utility like flashrom.

for i in $(seq 1 10) ; do
echo -n "."
sleep 0.2
done

# No errors detected
exit 0
17 changes: 17 additions & 0 deletions machine/delta/delta_agcv208s/firmware/cpld/update_cpld.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

#
# Copyright (C) 2016 Curt Brune <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0
#

# This is a sample place holder script for updating a machine CPLD.

for i in $(seq 1 10) ; do
echo -n "."
sleep 0.2
done

# No errors detected
exit 0
38 changes: 38 additions & 0 deletions machine/delta/delta_agcv208s/firmware/fw-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/sh

#
# Copyright (C) 2016 Curt Brune <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0
#

# Demonstration of firmware update install script

# This script is the entry point of the of the ONIE firmware update
# mechanism.

# A machine uses this script to update "firmware", such as:
# - update BIOS
# - update CPLDs

# Simulate updating the BIOS
echo -n "Updating BIOS "
bios/update_bios.sh || {
echo "ERROR: Problems updating the BIOS"
exit 1
}
echo " done."

# Simulate updating CPLDs
for cpld in $(seq 1 3) ; do
echo -n "Updating CPLD $cpld "
cpld/update_cpld.sh || {
echo "ERROR: Problems updating CPLD $cpld"
exit 1
}
echo " done."
done

# No errors detected
echo "Update complete. No errors detected."
exit 0
10 changes: 10 additions & 0 deletions machine/delta/delta_agcv208s/firmware/fw-version.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (C) 2016 Curt Brune <[email protected]>
#
# SPDX-License-Identifier: GPL-2.0
#

# Demonstration of firmware version

# The firmware version is a free form string
FW_VERSION = DEMO-FW-1.2.3.4
39 changes: 39 additions & 0 deletions machine/delta/delta_agcv208s/installer.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Delta agcv208s
# CPU Module: Intel deverton

description="Delta agcv208s with Intel deverton CPU Module"

# Default ONIE block device
install_device_platform()
{
# search SATA SSD
for _device in /sys/block/*/device; do

# work for kernel 4.1.17
if 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

# search PCIe SSD
for _nvme_device in /sys/block/*/device; do

# work for kernel 4.1.17
if readlink -f $_nvme_device |egrep -q "pci0000:00\/0000:00:09.0\/0000:02:00.0"; then
_nvme_disk=`echo $_nvme_device | cut -f4 -d/`
echo /dev/$_nvme_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:
9 changes: 9 additions & 0 deletions machine/delta/delta_agcv208s/kernel/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

CONFIG_I2C_ALGOBIT=n
CONFIG_I2C_ALGOPCF=n
CONFIG_I2C_ALGOPCA=n
CONFIG_I2C_HELPER_AUTO=n
CONFIG_I2C_SMBUS=y
CONFIG_I2C_I801=y
CONFIG_I2C_ISMT=y
# CONFIG_BLK_DEV_NVME_SCSI is not set
Loading

0 comments on commit ea6408c

Please sign in to comment.