Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
toh:mellanox:spectrum_sn2000_series [2024/07/18 10:59] – Adjust installation steps tk154toh:mellanox:spectrum_sn2000_series [2024/10/29 20:46] (current) – Delete device page because it was moved tk154
Line 1: Line 1:
-====== Mellanox Spectrum SN2000 Series ====== 
  
-/* This template is intended to be used via https://openwrt.org/meta/create_new_device_page ONLY.  */ 
-/* DO NOT CREATE NEW DEVICEPAGES VIA COPY & PASTE! */ 
-/* USE https://openwrt.org/meta/create_new_device_page */ 
- 
-The Mellanox Spectrum SN2000 Series Switches are Managed Ethernet Switches with a maximum speed of 100Gb/s and up to 56 ports.\\ 
-They use the switchdev API to offload the kernel's forwarding plane to its ASICs, allowing for more network throughput.\\ 
-More info: https://github.com/Mellanox/mlxsw/wiki 
- 
-/*****/ 
-/* How to add images ========> http://openwrt.org/meta/adding_images_to_openwrt_wiki */ 
-/*****/ 
- 
-{{media:example:genericrouter1.png?200|Generic Router}} 
- 
-\\ 
- 
-===== Supported Versions ===== 
- 
-<!-- ToH: { 
-  "source": "json", 
-  "dom": "t", 
-  "paging": false, 
-  "rotate": true, 
-  "shownColumns": ["brand", "model", "supportedcurrentrel", "oemdevicehomepageurl", "forumsearch", "deviceid"], 
-  "filterColumns": {"brand": "^Mellanox$", "model": "^Spectrum SN2.*$"} 
-} --> 
- 
-\\ 
- 
-===== Hardware Highlights ===== 
-<!-- ToH: { 
-  "source": "json", 
-  "dom": "t", 
-  "paging": false, 
-  "rotate": true, 
-  "shownColumns": ["model", "cpu", "cpumhz", "cpucores", "rammb", "flashmb", "ethernet100mports", "ethernet1gports", "commentsnetworkports", "usbports", "commentsusbsataports"], 
-  "filterColumns": {"brand": "^Mellanox$", "model": "^Spectrum SN2.*$"} 
-} --> 
- 
-\\ 
- 
-===== Installation ===== 
-/* stable release */ 
-/* uncomment once stable release is available 
-<!-- ToH: { 
-  "source": "json", 
-  "dom": "t", 
-  "paging": false, 
-  "rotate": true, 
-  "shownColumns": ["model", "version", "supportedcurrentrel", "firmwareopenwrtinstallurl", "firmwareopenwrtupgradeurl", "firmwareoemstockurl"], 
-  "filterColumns": {"brand": "^Mellanox$", "model": "^Spectrum SN2000 Series$", "version": "^$"} 
-} --> 
-*/ 
- 
-/* snapshot */ 
-/* delete once stable release is available */ 
-<!-- ToH: { 
-  "source": "json", 
-  "dom": "t", 
-  "paging": false, 
-  "shownColumns": ["model", "supportedcurrentrel", "firmwareopenwrtsnapshotinstallurl", "firmwareopenwrtsnapshotupgradeurl"], 
-  "filterColumns": {"brand": "^Mellanox$", "model": "^Spectrum SN2.*$"} 
-} --> 
- 
-Unfortunately, there is currently no pre-built OpenWrt image for this target in the Firmware Selector. There are two options to obtain an image and set up a working OpenWrt system on this device: 
-  * You can build your image manually following the instructions described [[:toh:mellanox:spectrum_sn2000_series#image_configuration|here]]. 
-  * You can also obtain a generic x86_64 snapshot image from the Firmware Selector [[https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-x86-64-generic-ext4-combined-efi.img.gz|here]]. After you have installed the image on the device and after every ''sysupgrade'', you need to install the required packages as described [[:toh:mellanox:spectrum_sn2000_series#install_required_packages|here]]. 
-\\ 
-Flashing the image is done as you do it with any other x86 target: https://openwrt.org/docs/guide-user/installation/openwrt_x86#installation.\\ 
-The instructions on this page will show you how to install OpenWrt on the switch by flashing it from a USB device. You have to connect the host PC to the serial port of the network switch to navigate through the BIOS and the installation steps. The parameters of the serial connection can be found [[:toh:mellanox:spectrum_sn2000_series#serial|here]]. 
- 
-<WRAP center round info 60%> 
-This will erase the complete disk and flash OpenWrt, removing existing operating systems, including the commonly pre-installed ONIE or Onyx. 
-</WRAP> 
- 
-\\ 
- 
-=== Preparing the USB device === 
- 
-<WRAP center round info 60%> 
-The USB device will serve as a kind of Live USB. If you already have a Live USB from another Linux distribution, you can also use that and skip to the [[:toh:mellanox:spectrum_sn2000_series#copying_and_flashing_the_image|next step]]. 
-</WRAP> 
-\\ 
-First, plug the USB device into your PC, identify your USB device (e.g., by running ''fdisk -l''; the instructions here will use ''/dev/sdx''), and flash the OpenWrt image to it. 
-:!: This will erase all your data on the USB device. 
- 
-<code> 
-gunzip -k openwrt-x86-64-generic-ext4-combined-efi.img.gz 
- 
-# Replace sdx with your device 
-dd if=openwrt-x86-64-generic-ext4-combined-efi.img of=/dev/sdx 
-</code> 
-\\ 
-If you are using an x86_64 image with a default root partition size of 104MiB, we must enlarge it and its filesystem. :!: Some Linux distributions automatically mount the root partition, so you may have to unmount it before. 
-<code> 
-parted -s /dev/sdx resizepart 2 100% 
-resize2fs -f /dev/sdx2 
-</code> 
- 
-\\ 
- 
-=== Copying and flashing the image === 
- 
-Mount the root partition of the USB device and copy the OpenWrt image on it. 
-<code> 
-mkdir /mnt/usb 
- 
-# This is for OpenWrt. If you used another distributions Live USB, adjust the paths accordingly. 
-mount /dev/sdx2 /mnt/usb/ 
-cp openwrt-x86-64-generic-ext4-combined-efi.img.gz /mnt/usb/root/ 
- 
-umount /dev/sdx2 
-rmdir /mnt/usb 
-</code> 
-\\ 
-Next, (safely) unplug the USB device, plug it into the Mellanox switch, and connect your PC to its serial port. 
-To enter the BIOS, reboot the switch and press **''CTRL+B''** while you see the BIOS information text (American Megatrends …).\\ 
-The default password to enter the BIOS is **''admin''**.\\ 
-Switch to the **''Save & Exit''** tab and select your USB device from the Boot Override options.\\ 
-When booted, press **''Enter''** on your keyboard to activate the console and start flashing the image. 
- 
-<code> 
-cd ~ 
-gunzip openwrt-x86-64-generic-ext4-combined-efi.img.gz 
- 
-# The SSD should be '/dev/sda', verify before flashing! 
-dd if=openwrt-x86-64-generic-ext4-combined-efi.img of=/dev/sda 
-</code> 
-\\ 
-Finally, if the flashing process is successful, reboot, and the switch should boot into the newly installed OpenWrt system. 
- 
-As mentioned, the root partition size might be only 104 MiB if you used a default x86_64 image (configuration). To increase it and the filesystem, please follow the steps of the following link: https://openwrt.org/docs/guide-user/installation/openwrt_x86#expanding_root_partition_and_filesystem. 
- 
-If you haven't used a manually built image for the installation, you must proceed with the following [[:toh:mellanox:spectrum_sn2000_series#install_required_packages|section]] to install all required packages. 
- 
-\\ 
- 
-===== Install required packages ===== 
-The following steps are needed if you haven't built your image manually and used the generic x86_64 snapshot image from the Firmware Selector. You must also repeat those steps if you do a ''sysupgrade'' on the device. 
- 
-First, plug in an ethernet cable into the management port and make sure that it has internet access. By default, the port has the IPv4 address ''192.168.1.1/24'', but you can change it by following the steps provided here: https://openwrt.org/docs/guide-user/network/network_configuration. 
- 
-After you have gained internet access, you can install the required package through the ''opkg'' package manager. Before you can do that, update the list of available packages: 
-<code>opkg update</code> 
-\\ 
-After that, you can install the packages required for the QSFP ports, LEDs, and hardware watchdog to work: 
-<code>opkg install mlxsw_spectrum-firmware kmod-mlxfw kmod-mlxsw-core kmod-mlxsw-i2c kmod-mlxsw-minimal kmod-mlxsw-pci kmod-mlxsw-spectrum kmod-mlx_wdt kmod-leds-mlxcpld</code> 
-\\ 
-If you also want to monitor the temperature of the CPU, RAM, and SSD drive, install the following additional packages: 
-<code>opkg install kmod-hwmon-coretemp kmod-hwmon-drivetemp kmod-hwmon-jc42 kmod-i2c-i801 kmod-mlxreg</code> 
-\\ 
-If you have a Mellanox Spectrum SN2201 or SN4800, I also recommend the following package for hardware monitoring: 
-<code> 
-# For SN2201 
-opkg install kmod-mlxreg-sn2201 
- 
-# For SN4800 
-opkg install kmod-mlxreg-lc 
-</code> 
-\\ 
-Finally, reboot the device, and the QSFP ports of the switch should be functional now. 
- 
-\\ 
- 
-===== Image Configuration ===== 
-If you want to build your image manually for this device, follow the steps provided on this page: https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem. 
- 
-When you are inside the build system configuration interface (**''make menuconfig''**), select the following target configuration: 
-  * **Target System**: ''x86'' 
-  * **Subtarget**: ''x86_64'' 
-  * **Target Profile**: ''Generic x86/64'' 
-\\ 
-It isn't mandatory, but you should also unselect ''Use Console Terminal (in addition to Serial)'' under the **Target Images** section to avoid possible problems while using the serial console.\\ 
-I also recommend increasing the ''Root filesystem partition size (in MiB)'' (e.g., ''512''). 
- 
-\\ 
-For the QSFP ports, LEDs, and hardware watchdog to work, you have to select the following packages: 
-  * **Firmware**: ''mlxsw_spectrum-firmware'' 
-  * **Kernel modules -> Network Devices**: ''kmod-mlxfw'', ''kmod-mlxsw-core'', ''kmod-mlxsw-i2c'', ''kmod-mlxsw-minimal'', ''kmod-mlxsw-pci'', ''kmod-mlxsw-spectrum'' 
-  * **Kernel modules -> LED modules**: ''kmod-leds-mlxcpld'' 
-  * **Kernel modules -> Other modules**: ''kmod-mlx_wdt'' 
-\\ 
-If you also want to monitor the temperature of the CPU, RAM, and SSD drive, you can select the following kernel modules: 
-  * **Kernel modules -> Hardware Monitoring Support**: ''kmod-hwmon-coretemp'', ''kmod-hwmon-drivetemp'', ''kmod-hwmon-jc42'' 
-  * **Kernel modules -> I2C support**: ''kmod-i2c-i801'' 
-  * **Kernel modules -> Other modules**: ''kmod-mlxreg'' 
-\\ 
-If you have a Mellanox Spectrum SN2201 or SN4800, I also recommend the following package for hardware monitoring: 
-  * **Kernel modules -> Other modules**: ''kmod-mlxreg-sn2201'' (SN2201), ''kmod-mlxreg-lc'' (SN4800) 
-\\ 
-You can also append the following configuration symbols to the **''.config''** file after you have selected the generic ''x86_64'' target inside make **''make menuconfig''**: 
-<code> 
-CONFIG_PACKAGE_mlxsw_spectrum-firmware=y 
- 
-CONFIG_PACKAGE_kmod-mlxfw=y 
-CONFIG_PACKAGE_kmod-mlxsw-core=y 
-CONFIG_PACKAGE_kmod-mlxsw-i2c=y 
-CONFIG_PACKAGE_kmod-mlxsw-minimal=y 
-CONFIG_PACKAGE_kmod-mlxsw-pci=y 
-CONFIG_PACKAGE_kmod-mlxsw-spectrum=y 
- 
-CONFIG_PACKAGE_kmod-leds-mlxcpld=y 
-CONFIG_PACKAGE_kmod-mlx_wdt=y 
- 
-# Hardware Monitoring 
-CONFIG_PACKAGE_kmod-hwmon-coretemp=y 
-CONFIG_PACKAGE_kmod-hwmon-drivetemp=y 
-CONFIG_PACKAGE_kmod-hwmon-jc42=y 
-CONFIG_PACKAGE_kmod-i2c-i801=y 
-CONFIG_PACKAGE_kmod-mlxreg=y 
- 
-# For SN2201 
-CONFIG_PACKAGE_kmod-mlxreg-sn2201=y 
- 
-# For SN4800 
-CONFIG_PACKAGE_kmod-mlxreg-lc=y 
- 
-# Optional, but recommended 
-CONFIG_GRUB_CONSOLE=n 
-CONFIG_TARGET_ROOTFS_PARTSIZE=512 
-</code> 
-\\ 
-After the build process (**''make''**) has finished, you can find the compiled image at ''bin/targets/x86/64/openwrt-x86-64-generic-ext4-combined-efi.img.gz''. 
- 
-\\ 
- 
-===== Upgrading OpenWrt ===== 
-<WRAP center round info 60%> 
-The instructions here use ''192.168.1.1'' as the IPv4 address of the switch. Replace it with your configured IP address where applicable. 
-</WRAP> 
- 
-\\ 
- 
-==== LuCI Web Upgrade Process ==== 
- 
-  * Browse to ''<nowiki>http://192.168.1.1/cgi-bin/luci/mini/system/upgrade/</nowiki>'' LuCI Upgrade URL 
-  * Upload your manually built or the [[https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-x86-64-generic-ext4-combined-efi.img.gz|generic x86_64 snapshot image from the Firmware Selector]] for sysupgrade to LuCI 
-  * Wait for reboot 
- 
-\\ 
- 
-==== Terminal Upgrade Process ==== 
-<WRAP center round info 60%> 
-It is important that you put the firmware image into the ramdisk (/tmp) before you start flashing. 
-</WRAP> 
- 
-\\ 
- 
-=== sysupgrade === 
-If you have built your image manually, transfer the image from your host machine to the switch first: 
-<code>scp -O openwrt-x86-64-generic-ext4-combined-efi.img.gz root@192.168.1.1:/tmp</code> 
-\\ 
-Then, log in via SSH and enter the following command: 
-<code>sysupgrade /tmp/openwrt-x86-64-generic-ext4-combined-efi.img.gz</code> 
-\\ 
- 
-If you want to use the generic ''x86_64'' snapshot image from the Firmware Selector, log in via SSH and enter the following commands.\\ 
-:!: But remember that the QSFP ports won't work anymore after the switch has rebooted, so you must repeat the steps described [[:toh:mellanox:spectrum_sn2000_series#install_required_packages|here]] after the ''sysupgrade'' has finished. 
-<code> 
-cd /tmp 
-wget https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-x86-64-generic-ext4-combined-efi.img.gz 
-sysupgrade /tmp/openwrt-x86-64-generic-ext4-combined.img.gz 
-</code> 
- 
-\\ 
- 
-===== Basic configuration ===== 
- 
-==== Network interfaces ==== 
-The default network configuration is: 
-^ Interface Name ^ Description     ^ Default configuration ^ 
-| br-lan         | Management Port | 192.168.1.1/24        | 
-| lo             | Loopback        | 127.0.0.1             | 
- 
-\\ 
- 
-==== Buttons ==== 
-The Mellanox Spectrum SN2000 Series has the following buttons: 
- 
-^ BUTTON ^ Event ^ 
-| Reset  | reset | 
- 
-\\ 
- 
-===== Hardware ===== 
-==== Info ==== 
- 
-<!-- ToH: { 
-  "source": "json", 
-  "dom": "t", 
-  "paging": false, 
-  "rotate": true, 
-  "shownColumns": ["brand", "model", "version", "devicetype", "availability", "supportedsincecommit", "supportedsincerel", "supportedcurrentrel", "unsupported_functions", "bootloader", "cpu", "target", "cpumhz", "flashmb", "rammb", "switch", "ethernet100mports", "ethernet1gports", "commentsnetworkports", "modem", "vlan", "wlan24ghz", "wlan50ghz", "wlanhardware", "wlancomments", "detachableantennas", "usbports", "sataports", "commentsusbsataports", "serial", "jtag", "ledcount", "buttoncount", "powersupply", "deviceid", "owrt_forum_topic_url", "wikideviurl", "oemdevicehomepageurl", "firmwareoemstockurl", "firmwareopenwrtinstallurl", "firmwareopenwrtupgradeurl", "comments"], 
-  "filterColumns": {"brand": "^Mellanox$", "model": "^Spectrum SN2.*$"} 
-} --> 
- 
-\\ 
- 
-==== Photos ==== 
-/* =====>>>>> Standard size for photos: add ?400 to the medialink                                */ 
-/* When uploading photos, **name them** intelligently. Nobody knows what 20100930_000602.jpg is! */ 
-/* e.g. {{:media:yourbrand:yourbrand_yourmodel_front.jpg?400|}}                                  */ 
-/* Thanks, your wiki administration - Oct. 2015 */ 
- 
-//Front://\\ 
-**Insert photo of front of the casing** 
- 
-//Back://\\ 
-**Insert photo of back of the casing** 
- 
-//Backside label://\\ 
-**Insert photo of backside label** 
- 
-\\ 
- 
-==== Opening the case ==== 
- 
-**Note:** This will void your warranty! 
- 
-<WRAP BOX> 
-FIXME //Describe what needs to be done to open the device, e.g. remove rubber feet, adhesive labels, screws, ...// 
-  * To remove the cover and open the device, do a/b/c 
-</WRAP> 
- 
-//Main PCB://\\ 
-**Insert photo of PCB** 
- 
-\\ 
- 
-==== Serial ==== 
-How to connect to the Serial Port of this specific device:\\ 
-**Insert photo of PCB with markings for serial port** 
- 
-Serial connection parameters for Mellanox Spectrum SN2000 Series: 
- 
-^ Parameter    ^ Setting ^ 
-| Baud rate    | 115200  | 
-| Data bits    | 8       | 
-| Stop bits    | 1       | 
-| Parity       | None    | 
-| Flow control | None    | 
- 
-\\ 
- 
-===== Bootlogs ===== 
-==== OEM bootlog ==== 
-<WRAP bootlog> 
-<nowiki>COPY HERE THE BOOTLOG WITH THE ORIGINAL FIRMWARE</nowiki> 
-</WRAP>\\ 
- 
-\\ 
- 
-==== OpenWrt bootlog ==== 
-<WRAP bootlog> 
-<nowiki>COPY HERE THE BOOTLOG ONCE OPENWRT IS INSTALLED AND RUNNING</nowiki> 
-</WRAP>\\ 
- 
-\\ 
- 
-===== Notes ===== 
-//Space for additional notes, links to forum threads or other resources.// 
- 
-  * ... 
- 
-\\ 
- 
-===== Tags ===== 
-[[meta:tags|How to add tags]] 
-{{tag>x86 x86-64}} 
  • Last modified: 2024/07/18 10:59
  • by tk154