SONiC is designed to be portable to a variety of network devices. Among devices, the majority of platform-dependent code involves controlling the ASIC, which SONiC handles via the Switch Abstraction Interface (SAI).However, many devices share the same ASIC platform, and only differ in other device-specific hardware components which require custom device drivers and/or configuration files which are loaded when the system is initialized.This guide describes requirements and general guidelines to follow when porting SONiC to a new device which contains a supported ASIC platform. Therefore, the remainder of this document assumes the device you are porting for contains an ASIC platform which is already supported in SAI/SONiC.
As mentioned above, to port SONiC to a new device, you will need to provide device-specific hardware drivers as well as device-specific configuration files to initialize your device properly. All device-specific changes will be made in the sonic-buildimage repository.
You are required to provide drivers to expose your device-specific hardware via sysfs to allow SONiC to communicate with them. Below is a list of drivers that are required along with their required feature sets.
SONiC images are compiled for each ASIC vendor, and as such are designed to be installed on any supported device running that vendor's ASIC. For example, a sonic-broadcom.bin image is designed to be installed on all supported devices which implement a Broadcom ASIC. Therefore, all platform modules for all devices which implement that vendor's ASIC are compiled into one image. The appropriate platform drivers are installed on the first boot of the device upon detection of the device's SKU.
In your module's .mk makefile you are able to specify which Debian package(s) are built and compiled into the images for which platform (by ONIE platform string). Also note that the same platform driver can be installed on multiple platforms; simply specify each platform in your module's .mk makefile.
SONiC needs a way to interface with the unique configuration of peripheral hardware present in each platform (fans, LEDs, power supply units, SFP transceivers, thermal sensors, etc.). This is handled by the SONiC Platform API. SONiC contains a number of daemons and other applications which collect data from the peripheral devices and also write to the devices (e.g., read temperature data from thermal sensors and write new fan speeds to fans). This interaction is abstracted by the SONiC Platform API.
The SONiC Platform API is an object-oriented API which is designed to reflect the physical composition of a network device. At the root level of the API is the Platform object. The Platform contains a Chassis object. The Chassis object, in turn, can contain an array of other hardware devices (fans, LEDs, power supply units, SFP transceivers, thermal sensors, etc.). If the platform's chassis is modular, the Chassis can also contain objects which represent the various modules (line cards, fabric cards, etc.).
When porting SONiC to a new platform, one must create a concrete implementation of a sonic-platform Python 3 wheel package. The classes in this package must inherit from the abstract base classes defined in the sonic-platform-base Python package. The sonic-platform Python package is expected to be generated at the time of building the platform device drivers. The package file should be named sonic_platform-1.0-py3-none-any.whl and should contain a file hierarchy similar to the following (note that additional files may be added as necessary to hold any shared code and avoid code duplication):
After the sonic-platform package is built, it should be installed in the host OS by calling pip3 install sonic_platform-1.0-py3-none-any.whl, and then the sonic_platform-1.0-py3-none-any.whl file should be copied to the appropriate device/// directory. When the PMon (platform monitor) container starts up, it will look for the wheel file in that location and install it if it is not yet installed.
All files that contain configuration or diagnostic information that are specific to a particular platform or hardware SKU reside under the device/ subdirectory here. The hierarchy of which is described in the following section.
SONiC distinguishes devices by a hierarchy of two levels, Platform and Hardware SKU. Some devices share the majority of the same hardware and only differ in, for example, the number/type of front panel ports (due to breakout configurations, etc.). In other words, multiple hardware SKUs can be configured on top of the same platform. While the front panel port configurations of these devices may differ, they still share common platform hardware like fans, sensors and system EEPROMs. The SONiC directory structure for device-specific files reflects this hierarchy and is designed to reduce the need for duplicate files as follows:
You will want to choose the one for your platform and bootloader in the case of the aforementioned Dell Switch the latter is ONIE which i presume the -ON suffix is meant to denote and more specifically entry #49 says its for Dell S5212F.
Maybe interesting to some there is an ansible collection from Dell that i am using - albeit on a non-opensource Broadcom Enterprise SONiC version - that can be used for configuring the switch via either the SONiC http API or ssh.
I should mention that when configuring later SONiC versions with ansible you should use the klish cli ( -net/SONiC/blob/master/doc/mgmt/Management%20Framework.md#3221-cli ) accessible via the command sonic-cli for any additional changes as it shares code with the http REST API at least thats what the Broadcom Design Guide for their latest SONiC version is suggesting.
You are very likely to be able to recover it though. When you boot ONIE into Install mode, then the first thing it does is change the boot order so that ONIE is now first. When the new OS install is successful, the last thing it does it set that new OS to be the first boot order. You likely just need to fix your boot order.
The switch complains about the modular fan not spinning fast enough (or being missing), but works anyway. When I replaced the fan in one of my power supplies though, the power supply seems to kick out an internal error and just refuses to power the switch. So in the end I can run my S3048 at room temp on a single modified, modular fan, and my original piercing power supply fan.
hello, can someone explain me what does that mean for my switch? i bought i brand new from Italy, can i use it without that pesky 3 Day shutdown? i changed the Fans to 2x Noctua 40mm and one Artic 40mm Fan i had lying around. Had to change the Pins in the connector and the switch knows that something is off with the fan speed but boots just fine.
I saw a Tech Field Day video from Broadcom about a newer generation of ASICs from them that would start showing up in switches about now. Hopefully that means a newer version of this switch comes out and more of these hit the used market, but who knows .
In order to work through these training materials, you will need to download and install a freely available program called Sonic Visualiser, and also some files specifically for use with these materials. Links, files, and full instructions may be found here. A print-friendly version of this tutorial is also available in pdf format (2.1MB) (pdf file).
To take advantage of computer-based techniques of analysis you first need to copy the recording to your hard disc, for instance by ripping it from CD using a program such as Freerip; as mp3 files are significantly lower in quality than wav, use the latter format whenever possible.
Sometimes you will need to edit the sound file, for instance if you want to work on only part of it. For this you need a simple sound editor such as Audacity. If you don't have one, install Audacity now, and open any .wav or .mp3 file in it (there are several in the files you downloaded for this tutorial). Explore the program's various features, which include not only playing and editing the recording but also a number of other functions. One is file conversion: if you have a wav (CD quality) file and want to turn it into an mp3 (for emailing, or use in a mp3 player), select 'Export as MP3', while if you have a mp3 file and want to turn it into a wav file, then Audacity will do that for you too. (Remember however that when you turn a mp3 file into wav, the sound quality doesn't improve.) Again, you can turn a stereo recording into a mono one (there's no point in having stereo tracks if you're working on CD transfers from 78s): to do this, open up the drop-down list with the track name, select 'Split Stereo Track', delete one of the resulting mono tracks, and select Mono from the drop-down list. It will now look something like the screen shot below. And if you are working with a number of files recorded at different levels, you can use the 'Amplify' effect to change the volume (you'll find it under the 'Effect' menu). Audacity also offers a range of features for navigating and visualising recordings, but not as many as Sonic Visualiser, of which more shortly.
The standard waveform representation used in Audacity and other sound editors is a symmetrical graph of loudness (volume) against time. It's convenient for finding your way around a sound file, because you can often see note attacks or sectional breaks, but it's not very useful as a means of analysis; there are other ways of visualising music which reveal more about what we hear. This tutorial describes two basic approaches: the first involves extracting and displaying information about performance timing and dynamics, while the second involves the use of spectrograms to focus in on the detail of the music. Sonic Visualiser supports both of these approaches. But it also has major advantages as an environment for navigating recordings, so we shall begin by describing these.
Recently developed at Queen Mary, University of London, Sonic Visualiser is a program specifically designed for analysing recordings. (If you haven't yet installed it, follow the instructions in the text box at the top of this document.) Just to outline the basics, it's like Audacity in that it displays the waveform, and you have the usual stop, go, and pause functions for playback, together with some more sophisticated options. (You can explore them under the 'Playback' menu.) But Sonic Visualiser is not a sound editor: instead, as the name implies, it's designed to offer different ways of visualising the music as you hear it. It's based on the idea of transparent layers overlaid one on the other; one layer will be the sound wave, but others will be different visualisations, text associated with the music, and so on. (The tabs at the right of the screen bring different layers to the top, together with the controls associated with them. You can explore the different layers available by looking under the Layer menu.) Another key concept is panes: each set of layers is called a pane, and you can have two or more different panes arranged from the top to the bottom of the screen. (Again you can explore what is available by looking at the Panes menu.) Much of Sonic Visualiser's functionality derives from the plug-ins from third-party developers available for it (these are displayed under the Transform menu). Add the set of tools on the toolbar, and a range of import and export facilities, and the basics are covered. We can't replicate all the instructions for using Sonic Visualiser in this tutorial; instead, consult the Reference manual available on the Sonic Visualiser website (or via 'Help' from within the program).
c80f0f1006