LX2160A Software

Introduction

This article is intended to provide information for HoneyComb and ClearFog CX to start evaluating the platform as quickly as possible.

 

Boot Source Selector (Boot Switch SW1):

Did you have information between the boot switch SW1 and the CPU on the print side (Notice the marking ‘ON’ on the DIP switch)
how to boot from SD card, eMMc, SPI.
for example to booting from SD-Card: configure the boot switch SW1 to be [1:off,2:on,3:on,4:on,5:nc]

Flashing Ubuntu on NVME m.2 or SATA drive

Preparing a bootable micro SD

Download a pre-built snapshot image from SolidRun Images.

Those images are built with the suffix of the commit ID of the GitHub - SolidRun/lx2160a_build  project that you can clone and build by yourself.

Please note

The prebuilt images are configured for SO-DIMM DDR4 with speed of 3200, 2900, 2600 and 2400 Mtps (with or without ECC support),. Images that have the prefix lx2160a_xspi are intended to be flashed into SPI and recommended for later use after being booted from micro SD

You can build your own image using the script in here – GitHub - SolidRun/lx2160a_build

Plug a micro SD into your Linux PC, the following assumes that the micro SD is added as /dev/sdX and all it’s partitions are unmounted.

1 2 unxz lx2160acex7_2000_700_....img.xz sudo dd if=lx2160acex7_2000_700_...img of=/dev/sdX

Booting the micro SD and flashing to either eMMC, NVME M.2 or SATA drive

Plug a micro USB cable to the ‘console’ micro USB connector and run a terminal emulator like minicom or putty pointing to the USB tty running at 115200,8N1.

booting from SD-Card: configure the boot switch SW1 to be [1:off,2:on,3:on,4:on,5:nc]

Plug NVME M.2 or SATA drive to one of the ports.

Plug the micro SD into the HoneyComb / ClearFog CX mini ITX board and power it up; you should see the board booting. Stop the u-boot count down by clicking any key –

To flash to eMMC run the following commands (it will wipre your data on the eMMC device). For this to work eMMC distroboot support is required (patch is here – LSDK-19.09 u-boot support  )

1 2 3 load mmc 0:1 0xa4000000 ubuntu-core.img mmc dev 1 mmc write 0xa4000000 0 0xd2000

To flash to NVME M.2 run the following (it will wipe your data on the drive) –

1 2 3 load mmc 0:1 0xa4000000 ubuntu-core.img mmc dev 1 mmc write 0xa4000000 0 0xd2000

To flash the image into SATA drive run the following commands (it will wipe your data) –

1 2 3 load mmc 0:1 0xa4000000 ubuntu-core.img nvme scan nvme write 0xa4000000 0 0xd2000

Final stages

Boot the machine by running ‘boot’ in u-boot.

Ubuntu username and password are ‘root’ and ‘root’.

Please note

If you are willing to use a similar image in production you must change this password, or completely disable root login.

The following stages needs to be done in order to finalize the imaging :

  1. Run ‘fdisk /dev/nvme0n1’ if using NVME M.2 or ‘fdisk /dev/sda’ if using a SATA drive or ‘fdisk /dev/mmcblk1’ if using eMMC.

  2. Recreate the first partition by deleting it and then creating a new partition that starts at block 131072 and extends to the end of the drive (or less depending on your needs).

  3. Write the new partition, when prompt about ‘Do you want to remove the signature?’ then answer with yes.

  4. Run ‘resize2fs /dev/nvme0n1p1’ if using NVME M.2 or ‘resize2fs /dev/sda1’ if using a SATA drive or ‘resize2fs  /dev/mmcblk1p1’ if using eMMC.

  5. In this stage the root partition should be big enough to start populating it; but first update the RTC clock.

  6. Connect the RJ45 to your network with internet access (and DHCP server); and then run ‘dhclient’

  7. Update the RTC clock by running ‘ntpdate http://pool.ntp.org ’ and then ‘hwclock -w’.

  8. Run ‘apt update’ and then populate the root filesystem as you wish

Using the built-in NICs

In case of SERDES configuration of 8 (default build) then dpmac.3 to dpmac.10 can be exposed. Those are 8x10Gbps interfaces where first 4 dpmac.3 to dpmac.6 can be obtained by using a 40G to 4x10G splitter cable (or so called octopus cable) when connected to HoneyComb / ClearFog CX QSFP28 port and dpmac.7 to dpmac.10 are on the 2×2 SFP+ connector cage.

For example – dpmac.9 is the SFP+ port on the upper row and left towards PCB edge –

1 ls-addni dpmac.9

and then a new ethX ethernet interface is attached to the kernel.

For SERDES SD1 config 20 which is dual 40G, then dpmac.1 and dpmac.2 are to be used where dpmac.1 is achieved directly by using the QSFP port and dpmac.2 by using an 40G to 4x10G splitter cable where the splitter cable is connected to HoneyComb.

For different dpmac configuration please refer to the reference manual on different SERDES configuration and how it’s map to the different dpmacs.

Packet Generator using DPDK

Following is an example instructions that demonstrates using the DPDK framework that is built in the lx2160a_build project under build/dpdk/ directory –

  1. Make sure that the kernel is booted with the following variables in the command line –

    1 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 isolcpus=1-15 iommu.passthrough=1

    If using the above installation of Ubuntu then the /extlinux/extlinux.conf file should look as follows (the default installation with the addition of isolcpus=1-15 iommu.passthrough=1) –

    1 2 3 4 5 6 7 8 TIMEOUT 30 DEFAULT linux MENU TITLE linux-lx2160a boot options LABEL primary MENU LABEL primary kernel LINUX /boot/Image FDT /boot/fsl-lx2160a-cex7.dtb APPEND console=ttyAMA0,115200 earlycon=pl011,mmio32,0x21c0000 default_hugepagesz=1024m hugepagesz=1024m hugepages=2 isolcpus=1-15 iommu.passthrough=1 pci=pcie_bus_perf root=PARTUUID=30303030-01 rw rootwait
  2. From build/dpdk directory under the lx2160a_build project, search for dynamic_dpl.sh and testpmd files and copy them over to the LX2160A Ubuntu root filesystem

  3. Run the following that will generate 10Gbps traffic on dpmac.10 using only a single core. Can be used to generate traffic on dpmac.1 and other interfaces –

1 2 3 dynamic_dpl.sh dpmac.10 export DPRC=dprc.2 testpmd -c 0x3 -n 1 -- --txd=1500 --txpkts=1500 --tx-first --auto-start --forward-mode=txonly --stats-period=10

Notice that DPRC variable in this case holds the output of dynamic_dpl.sh

An alternative way to run testpmd in interactive mode is as follows –

1 2 3 4 5 6 7 8 9 dynamic_dpl.sh dpmac.10 export DPRC=dprc.2 <span style="font-size: 11.2px;">testpmd -c 0x3 -n 1 -- --txd=1500 -i set fwd txonly set txpkts 1500 show port info 0 show config txpkts start </span>

GPUs

GPUs that were briefly tested –

  1. AMD RX550 2GB – requires installing the kernel modules first and then ‘linux-firmware’ package. Running ‘glmark2’ under X results 4633 and ‘glmark2 –fullscreen’ results 3983.

  2. GeForce GTX 1050 2GT OCV1 – requires instsalling the kernel modules (simply untar on the root filesystem root directory) then the GPU is recognized and initialized. windowed glmark2 result is 150; which is very poor and most probably related to the OSS drivers (no binary drivers for ARM as for the time writing this article).

Tips

  1. sshd is disabled by default for root access. Edit /etc/ssh/sshd_config and set ‘PermitRootLogin yes’

  2. ssh to the machine might take long time after boot. To accelerate that install ‘rng-tools’ where it’s main daemon increases the kernel’s entropy and accelerates random number key generation (which used by libssl and sshd afterwards).

Example to install Gentoo from the Ubuntu

Gentoo is a free and open-source distribution with a rolling-release model.
The bootloader and kernel provided are recent enough to install Gentoo from the eMMC Ubuntu to the NVMe or SATA device.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 apt install btrfs-progs mkfs.btrfs /dev/nvme0n1p1 mount /dev/nvme0n1p1 /mnt cd /mnt # change 20200609 with what's available here http://distfiles.gentoo.org/experimental/arm64/ wget http://distfiles.gentoo.org/experimental/arm64/stage3-arm64-20200609.tar.bz2 mount --rbind /dev dev mount --make-rslave dev mount -t proc /proc proc mount --rbind /sys sys mount --make-rslave sys mount --rbind /tmp tmp cp /etc/resolv.conf etc chroot . /bin/bash env-update && . /etc/profile emerge-webrsync emerge superadduser openssh vim # Set the root password passwd # enable root login vim /etc/ssh/sshd_config # or create your user superadduser your_user ln -s /etc/init.d/net.{lo,eth0} rc-update add sshd default reboot

 

Please note

  • If you need to install the Gentoo to the SATA change the /dev/nvme0n1p1 to /dev/sdx.

  • In the same way, can install Debian or another Linux arm64 distribution.

Please note

  • The default bootcmd probes every device and looks for a /extlinux/extlinux.conf

  • The kernel command line uses the PARTUUID to boot the right drive
    can editing the root in the extlinux.conf to use directly root=/dev/nvme0n1p1 or  root=/dev/sdx .

SolidRun Ltd.