====== Fedora on SolidRun ClearFog CX/HoneyComb LX2 ====== ===== UEFI Bootloader ===== - Download the latest build from [[https://images.solid-run.com/LX2k/lx2160a_build|SolidRun pre-built UEFI images]] * Navigate to the most recent-dated folder * Download the image that matches your DDR4 SO-DIMM speed, e.g. lx2160acex7_2000_700_**3200**_8_5_2-2a7ab21.img.xz * Note that you want the base image, NOT the "xspi" or LX2162A_CLEARFOG images - Write the image to a microSD card using ''dd'' or your favorite imaging tool e.g. Etcher - Insert the microSD into the HoneyComb LX2 and ensure the [[https://solidrun.atlassian.net/wiki/spaces/developer/pages/197494288/HoneyComb+LX2+ClearFog+CX+LX2+Quick+Start+Guide#Boot-Select|Boot Select DIP switches are set to boot from SD]] - Connect the microUSB console (microUSB jack closest to the RJ-45 jack) and start a serial terminal at 115200 8N1 ===== Fedora Install Media ===== - Download the Fedora aarch64 netinstall ISO from the [[https://alt.fedoraproject.org/alt/|Fedora AltArch downloads page]] (either Server or Everything will do, as you will perform package selection later) - Write the image to a USB 3.0 flash drive using ''dd'' or your favorite imaging tool ===== Install Fedora ===== - Insert your preferred boot disk into the HoneyComb LX2, e.g. m.2 NVMe SSD - Plug the USB flash drive into any HoneyComb LX2 USB3.0 port - Power the HoneyComb LX2 on, press escape to get into the UEFI settings - Boot Manager -> select the USB disk with Fedora installer - Once at the menu to install Fedora/test media and install Fedora: - Highlight the Install Fedora entry - Press "e" to edit - Use arrow keys to navigate to the end of the line that begins with "linux" - Add the following parameters to the end: ''arm-smmu.disable_bypass=0 iommu.passthrough=1'' - Continue with the text installer as usual - Don't forget to select the minimal install if you are using the server ISO - otherwise, you'll have Fedora Server Cockpit installed (which is not designed to be removed after installation) ===== Fix Kernel cmdline ===== - Log in to your fresh install (root or a user with sudo privileges) - ''%%# grubby --args="arm-smmu.disable_bypass=0 iommu.passthrough=1" --update-kernel=ALL%%'' ===== Get SFP+ Working ===== - ''%%sudo dnf install https://kojipkgs.fedoraproject.org//vol/fedora_koji_archive06/packages/restool/2.3.0/1.fc36/aarch64/restool-2.3.0-1.fc36.aarch64.rpm%%'' - ''sudo dnf install 'dnf-command(versionlock)''' - ''sudo dnf versionlock add restool'' - ''%%echo "ACTION==\"add\", SUBSYSTEM==\"fsl-mc\", ENV{DEVTYPE}==\"fsl_mc_bus_dpmac\", RUN+=\"/usr/bin/flock /usr/bin/ls-addni -c '(PATH=/usr/bin /usr/bin/ls-addni %k)'\""|sudo tee /etc/udev/rules.d/fsl_mc_bus.rules%%'' - Reboot to trigger udev rules ===== Other Notes ===== ==== Building a Custom Kernel ==== I needed to build a custom kernel to get ''kmod-aacraid''. - Follow the [[https://docs.fedoraproject.org/en-US/quick-docs/kernel-build-custom/|Fedora documentation on building a kernel from the Fedora dist-git]] but stop before the ''fedpkg local'' step * Remember to checkout the correct branch for the Fedora version you are running - Optional but highly recommended: ''sudo dnf install ccache'', if your kernel build fails for any reason, this greatly speeds up subsequent rebuilds (''fedpkg'' clears the build folder each time it is invocated) - Edit the ''kernel.spec'' file and uncomment ''# define buildid .local'' so that it looks like ''%define buildid .local'' (probably change ''.local'' to something meaningful - Edit the ''kernel-local'' file and add any Kconfig you desire - ''git stage kernel.spec kernel-local'' - ''%%git commit -m "Changeme to something descriptive"%%'' - ''%%fedpkg local --arch aarch64 --without configchecks --with baseonly%%'' - ''cd aarch64 && ls'' - ''sudo dnf install '' followed by the packages you need, probably: * ''kernel kernel-core kernel-modules kernel-modules-core kernel-modules-extra'' * If you use DKMS, probably ''kernel-devel kernel-devel-matched'' - Reboot into the new kernel