https://wiki.raptorcs.com/w/api.php?action=feedcontributions&user=Meklort&feedformat=atomRCS Wiki - User contributions [en]2024-03-29T08:07:18ZUser contributionsMediaWiki 1.33.1https://wiki.raptorcs.com/w/index.php?title=Compiling_Firmware&diff=4389Compiling Firmware2023-07-25T04:31:32Z<p>Meklort: /* Building on other Linux distributions */ Replace httpredir.debain.org with archive.debian.org when installing stretch chroot.</p>
<hr />
<div>==Purpose==<br />
The following steps can be used to compile and update the firmware on [[Raptor Computing Systems|Raptor CS]]'s [[OpenPOWER]] systems, such as the [[Talos II]] or [[Blackbird]].<br />
<br />
==Applicability==<br />
These specific instructions are for the [[Talos II]], though the process for compiling firmware for other [[OpenPOWER]] systems like [[Blackbird]] should be very similar.<br />
<br />
==Requirements==<br />
* At least 25GB of free hard drive space<br />
* 16GB of free RAM<br />
<br />
===Building on Debian===<br />
The build system (op-build) has been primarily tested using Debian Stretch. Ensure you install the following packages:<br />
<br />
# Packages needed for OpenPOWER Firmware builds<br />
$ sudo apt install cscope ctags libz-dev libexpat-dev python texinfo build-essential g++ git bison flex unzip libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc wget bc rsync<br />
<br />
# Packages needed for OpenBMC builds<br />
$ sudo apt install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
<br />
===Building on other Linux distributions===<br />
If you are on a different distribution, such as Fedora 28, a Debian chroot is recommended:<br />
$ sudo yum install debootstrap dpkg<br />
$ sudo debootstrap stretch debian-chroot http://archive.debian.org/debian<br />
$ sudo mount -t proc none debian-chroot/proc/<br />
$ sudo mount -o bind /sys/ debian-chroot/sys/<br />
$ sudo mount -o bind /dev/shm/ debian-chroot/dev/shm/<br />
<br />
Enter the chroot and install the needed packages:<br />
$ sudo chroot debian-chroot/<br />
# apt install software-properties-common locales<br />
<br />
# Packages needed for OpenPOWER Firmware builds<br />
$ sudo apt install cscope ctags libz-dev libexpat-dev python texinfo build-essential g++ git bison flex unzip libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc wget bc rsync<br />
<br />
# Packages needed for OpenBMC builds<br />
$ sudo apt install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
<br />
Also create a user inside the chroot to build under:<br />
$ useradd -m build-user -s /bin/bash<br />
$ su build-user<br />
$ cd<br />
<br />
You can now use the chroot to build the firmware.<br />
<br />
To enter the chroot in the future, you can run the following from any terminal:<br />
sudo chroot debian-chroot/<br />
su build-user<br />
cd<br />
<br />
==Building the OpenPOWER Firmware==<br />
===Downloading the sources===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public Git repository containing the complete source code for the firmware.<br />
To download the source code for Talos systems:<br />
git clone -b raptor-v2.00 --recursive https://scm.raptorcs.com/scm/git/talos-op-build<br />
<br />
To download the source code for Blackbird systems:<br />
git clone -b raptor-v2.00 --recursive https://scm.raptorcs.com/scm/git/blackbird-op-build<br />
<br />
'''Note:''' The <tt>master</tt> branch is often in a non-functional state. The latest firmware branch (either <tt>raptor-v2.00</tt> or <tt>raptor-v1.05</tt> at the time of this update) should be used.<br />
<br />
===Building the firmware===<br />
Before building the firmware, check the <tt>README.md</tt> file to ensure that all needed packages are installed.<br />
<br />
The firmware can then be built using the following commands:<br />
$ cd talos-op-build<br />
$ git submodule update<br />
$ . op-build-env<br />
$ export KERNEL_BITS=64 # needed when building on ppc64, or libopenssl will try to build in 32 bit mode<br />
$ op-build talos_defconfig<br />
$ op-build<br />
<br />
You can pass <tt>-j&lt;num-cores&gt;</tt> to perform a parallel build (<tt>op-build</tt> invokes <tt>make</tt>), though this may result in very high memory usage.<br />
<br />
If the build completes successfully, the final firmware image is at <tt>output/images/talos.pnor</tt>.<br />
<br />
===Rebuilding an individual package===<br />
To rebuild an individual package (such as Hostboot) and recreate the <tt>talos.pnor</tt> image, run:<br />
$ op-build <em>pkgname</em>-rebuild openpower-pnor-rebuild<br />
where <tt><em>pkgname</em></tt> is the name of the package to rebuild.<br />
<br />
For example:<br />
$ op-build hostboot-rebuild openpower-pnor-rebuild<br />
<br />
Note when recompiling hostboot into a PNOR image with openpower-pnor-rebuild, it is usually recommended to force a machine XML rebuild as well:<br />
<nowiki>$ rm -rf output/build/machine-xml-*<br />
$ rm -rf output/build/hostboot-*<br />
$ ./op-build openpower-pnor-rebuild</nowiki><br />
<br />
==Installing the OpenPOWER firmware==<br />
===Transfer image to BMC===<br />
Copy the firmware to the BMC:<br />
$ scp ./output/images/talos.pnor root@$TALOS_BMC_ADDR:/tmp/<br />
<br />
===Establish BMC sessions===<br />
At this point, you should connect two SSH sessions to OpenBMC.<br />
In the first session, run the following to display the console during boot:<br />
$ ssh -p 2200 root@$TALOS_BMC_ADDR<br />
<br />
The console log will be useful in debugging any issues with the firmware that could occur.<br />
<br />
In the second session, get a shell on the BMC via SSH:<br />
$ ssh root@$TALOS_BMC_ADDR<br />
root@talos:~#<br />
<br />
'''Ensure the system is off''' before proceeding:<br />
root@talos:~# obmcutil state<br />
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready<br />
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off<br />
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off<br />
<br />
The CurrentHostState must be Off before continuing with the procedure.<br />
If the CurrentHostState is not Off, please turn off the machine:<br />
root@talos:~# obmcutil chassisoff<br />
<br />
===Running the firmware temporarily===<br />
You can test the firmware without installing it, though this requires using the v2.00+ BMC firmware which contains [https://gerrit.openbmc-project.xyz/plugins/gitiles/openbmc/hiomapd/+/a042978b03c91ca3a716e99f313ef5cda42820ba an updated <tt>mboxd</tt> with support for file-backed pnor images].<br />
<br />
First, stop <tt>mboxd</tt>:<br />
root@talos:~# systemctl stop mboxd<br />
<br />
Restart <tt>mboxd</tt> with the additional <tt>-b</tt> argument:<br />
root@talos:~# mboxd -f 64M -w 1M -b file:/tmp/talos.pnor<br />
<br />
You can now test the new firmware image by starting the machine:<br />
root@talos:~# obmcutil poweron<br />
<br />
When you have finished testing the image, stop the machine:<br />
root@talos:~# obmcutil poweroff<br />
<br />
'''Note:''' Ensure the machine is off before proceeding. Verify this by running <tt>obmcutil state</tt>.<br />
<br />
Finally, terminate <tt>mboxd</tt> and restart the normal <tt>mboxd</tt>:<br />
root@talos:~# systemctl start mboxd<br />
<br />
===Flashing the firmware===<br />
<span style="color:#FF0000">Warning: Some PNOR firmware updates may require a BMC update to function. Before flashing ensure that your installed BMC firmware is capable of booting the image. It is also possible to downgrade using these instructions in the event of a non-functioning firmware image.</span><br />
<br />
Ensure the system is off.<br />
<br />
Perform the update:<br />
root@talos:~# pflash -E -p /tmp/talos.pnor<br />
<br />
Start the machine:<br />
root@talos:~# obmcutil poweron<br />
<br />
'''Note:''' The machine may reboot multiple times when first booted after a firmware update. This is normal; do not interrupt the process.<br />
<br />
==Troubleshooting the OpenPOWER Firmware==<br />
<br />
===General advice===<br />
<br />
;Always upgrade PNOR and BMC together<br />
:Many mismatched PNOR/BMC version combinations lead to weird failures.<br />
<br />
;Try downgrading the PNOR+BMC firmware<br />
:Firmware package 1.04 seems the most reliable at updating the [[Self-Boot_Engine|SBE SEEPROM]] inside the POWER9 chip package.<br />
<br />
;Always use processor socket 0 for SBE updates<br />
:The BMC firmware and/or FSI driver seem to either forget to update the SBE SEEPROM in the second CPU socket, leading to a boot with only CPU 0 active. When you get a brand new chip you need to install it in CPU socket 0 leaving socket 1 empty, wait for the double-reboot to update the SEEPROM, and then you can move that chip to socket 1 if you like.<br />
<br />
;Try unplugging the HSF fan power during [[Self-Boot_Engine|SBE]] update<br />
:Not kidding about this. The BMC is insanely complicated &mdash; it's got an entire operating system in there for some reason. It even has systemd. The BMC's systemd often gets into a funky loop restarting <tt>hwmon</tt> over and over and over, interrupting the SBE SEEPROM reflash every time it does this. Unplugging the PROC0 HSF 4-pin connector gets it to fail hard (due to inability to read the tachometer) and stay failed so the SBE update can proceed. Ugly as this is, it's easier than trying to figure out what systemd thinks it's doing.<br />
<br />
===SBE_MASTER_VERSION_DOWNLEVEL===<br />
If you see the following message reported in the console, then the [[Self-Boot_Engine|SBE]] update process did not work as expected:<br />
16.74709|Error reported by sbe (0x2200) PLID 0x90000008<br />
16.74823| SBE Image Version Miscompare with Master Target<br />
16.74824| ModuleId 0x0d SBE_MASTER_VERSION_COMPARE<br />
16.74825| ReasonCode 0x2215 SBE_MASTER_VERSION_DOWNLEVEL<br />
16.74826| UserData1 Master Target HUID : 0x0000000000050000<br />
16.74826| UserData2 Master Target Loop Index : 0x0000000000000000<br />
<br />
The machine needs to be reset to finish the update procedure:<br />
root@talos:~# obmcutil chassisoff<br />
root@talos:~# systemctl stop xyz.openbmc_project.State.Host.service<br />
root@talos:~# systemctl start xyz.openbmc_project.State.Host.service<br />
root@talos:~# obmcutil poweron<br />
<br />
The update should now complete as expected.<br />
<br />
A [https://github.com/open-power/sbe/issues/7 bug report] is open to track this issue.<br />
<br />
===internal compiler error: Killed===<br />
Building the Hostboot source code requires a large amount of RAM. If your machine runs out, you may see an error similar to the following:<br />
powerpc64le-buildroot-linux-gnu-g++.br_real: internal compiler error: Killed (program cc1plus)<br />
To continue you have a few options:<br />
* Reduce the number of parallel jobs being run by appending -j<num> to you build command line<br />
op-build -j4<br />
* Increase the swap space (not recommended)<br />
* Install additional RAM<br />
<br />
===Bugs===<br />
Firmware issues should be reported preferably upstream.<br />
If they are specific to [[Raptor Computing Systems|Raptor CS]] products, please report them [https://bugs.raptorengineering.com/ on their bug tracker].<br />
<br />
== Building the OpenBMC firmware ==<br />
=== Downloading the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public Git repository containing the complete source code for the firmware.<br />
To download the source code:<br />
$ git clone -b raptor-v{{CURRENT_BMC_VERSION}} https://git.raptorcs.com/git/talos-openbmc<br />
<br />
=== Building the firmware ===<br />
Ensure that all needed support packages are installed. See the <tt>README.md</tt> for information on needed packages.<br />
<br />
The firmware can then be built using the following commands:<br />
$ cd talos-openbmc<br />
$ export TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rcs/meta-talos/conf<br />
$ . openbmc-env<br />
$ bitbake obmc-phosphor-image<br />
<br />
The resulting firmware image can then be found in the <tt>tmp/deploy/images/talos/</tt> directory.<br />
<br />
'''Note:''' If <tt>mboxd</tt> fails to build, you may need to [https://github.com/openbmc/openbmc/issues/2780 patch <tt>mboxd.bb</tt>].<br /><br />
'''Note:''' If building newer versions of the firmware, TEMPLATECONF has changed to TEMPLATECONF=meta-rcs/meta-talos/conf. This should be set before running <code>. open-env</code>. If not, do a git clean and start over with the new TEMPLATECONF.<br />
<br />
===Installing the firmware===<br />
<span style="color:#FF0000">Warning: If you are attempting to upgrade a Talos system from firmware 1.06 or earlier to the 04-16-2019 beta branch, you must follow the directions at [[Talos_II/Firmware/Public_Beta]]. Failure to do so may result in a non-booting BMC.</span><br />
<br />
Once firmware has been built, the resulting <tt>image-kernel</tt> and <tt>image-rofs</tt> binaries must be copied to <tt>/run/initramfs/</tt> on the BMC:<br />
$ scp tmp/deploy/images/talos/image-rofs tmp/deploy/images/talos/image-kernel root@$TALOS_BMC_ADDR:/run/initramfs/<br />
<br />
Once the images have been transferred, reboot the BMC. The new firmware files will be detected and automatically applied.<br />
root@talos:~# reboot<br />
<br />
The reboot may take some time. Once complete, you will be able to log back in via SSH.<br />
<br />
===Recovering from failed firmware updates===<br />
See [[Debricking the BMC]].<br />
<br />
[[Category:Guides]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=POWER9_Hardware_Compatibility_List/PCIe_Devices&diff=3759POWER9 Hardware Compatibility List/PCIe Devices2022-06-27T02:32:47Z<p>Meklort: Add Intel AX200 as known working.</p>
<hr />
<div><!-- When adding devices, please list devices in alphabetical order within each category. --><br />
==Compatibility rules==<br />
In general, any PCIe device will work providing that an open source driver is available for your operating system. There are some exceptions:<br />
<br />
* '''Hardware bugs.''' POWER does not permit errant DMA accesses. If a device tries to access areas of host memory which it is not permitted to access, the device is shut down immediately. This is dissimilar to x86 platforms, which simply silently ignore such attempts. Some badly designed I/O devices have bugs causing them to attempt DMA accesses to random areas of host memory; these devices are unlikely to function correctly on POWER systems unless a workaround is available. Note that devices in full bypass mode may legally have access to all host memory, to avoid this and test driver IOMMU setup pass "iommu=nobypass" to the kernel at startup.<br />
* '''I/O space.''' Starting with [[POWER9]], access to the legacy PCI I/O space is no longer supported; devices or drivers which rely on this will not function. The legacy I/O space has been deprecated for as long as PCIe has existed; generally this will only affect very old PCIe devices which use PCIe to PCI bridge chips to attach old PCI devices to the bus, or genuine legacy PCI devices attached via [[POWER9_Hardware_Compatibility_List/PCIe_Devices#PCIe.2FPCI_Expansion|PCIe/PCI Expansion]]. A small subset of these devices may require legacy I/O space support.<br />
* '''Incomplete memory addressing support.''' The PCIe architecture specifies a 64-bit address space. Some I/O devices try to economize on this by only implementing e.g. 40 bits for their addressing, rendering them incapable of addressing host memory which lies above address 2<sup>40</sup>. (Firmware patches to work around this are pending.)<br />
* '''Bifurcation limits.''' Arbitrary PCIe lane bifurcation is not supported. Devices which split a PCIe slot into multiple connectors (for example, PCIe to M.2 adaptors) will not work unless they have a PCIe switch chip, although the first connector will generally work.<br />
<br />
==Troubleshooting==<br />
<br />
If a PCIe device is in a broken state due to being attached/detached from a VM, or due to a transition from Petitboot to the main OS, you may be able to fix it by issuing a hot reset. A script for performing a PCIe hot reset is at [[File:Pcie_hot_reset.sh]]. For background on PCIe resets and how a hot reset differs from the function-level reset performed by <code>echo 1 > /sys/bus/pci/devices/$dev/reset</code>, see [https://unix.stackexchange.com/a/474378 Alex Forencich's explanation on Stack Exchange].<br />
<br />
==NICs==<br />
===Working===<br />
* 3Com 3C905C-TX-M EtherLink 10/100 PCI Ethernet (via [[POWER9_Hardware_Compatibility_List/PCIe_Devices#PCIe.2FPCI_Expansion|PCIe/PCI Expansion]])<br />
* Broadcom [[BCM5719]]<br />
* Chelsio T520-SO-CR (dual port 10Gb/s, cxgb4 driver)<br />
* Chelsio T6225-SO-CR<br />
* DEC FDDIcontroller/PCI (DEFPA) PCI FDDI (via [[POWER9_Hardware_Compatibility_List/PCIe_Devices#PCIe.2FPCI_Expansion|PCIe/PCI Expansion]])<br />
** Works automatically as from Linux kernel version 5.13.<br />
** Works with Linux kernel versions before 5.13 as long as the defxx driver has been compiled with the CONFIG_DEFXX_MMIO option, which may not be the case with standard distribution kernels as the option was not on by default for historical reasons.<br>''This is because the PFI ASIC used as the PCI interface with the DEC FDDIcontroller/PCI adapter supports both port I/O and MMIO for main ASIC's (PDQ) CSR access, however [[POWER9_Hardware_Compatibility_List/PCIe_Devices#Compatibility_rules|as noted above]] the Power Systems Host Bridge 4 (PHB4) PCIe root complex used with POWER9 microprocessors does not support I/O Read or I/O Write commands required for port I/O.''<br />
* Mellanox ConnectX-6 EN 200Gb/s Adapter Card ''(supports [[CAPI]])''<br />
* Silicom [https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe210g2spi9-server-adapter/ PE210G2SPI9]/[https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe210g2spi9a-server-adapter/ PE210G2SPI9A]/PE210G2SPI9B dual port 10 GbE SFP+ adapter (Chipset: [https://www.intel.com/content/www/us/en/products/sku/41282/intel-82599es-10-gigabit-ethernet-controller/specifications.html Intel 82599ES]) (ixgbe driver)<br />
* Silicom [https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9-server-adapter/ PE310G4SPI9]/[https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9la-quad-port-10-gigabit-nic-intel-based/ PE310G4SPI9LA] quad port 10 GbE SFP+ adapter (Chipset: Two [https://www.intel.com/content/www/us/en/products/sku/41282/intel-82599es-10-gigabit-ethernet-controller/specifications.html Intel 82599ES] controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8724 PLX PEX 8724] switch) (ixgbe driver)<br />
* Unbranded 4-port Gigabit Ethernet adapter (Chipset: Four Realtek RTL8111F controllers behind one ASMedia ASM1184e switch) (r8169 driver, firmware optional)<br />
** The card be identified by the "NET111-V1.0" text on its PCB.<br />
* [https://www.asus.com/Networking-IoT-Servers/Wired-Networking/All-series/XG-C100F/ ASUS XG-C100F] (single port 10GbE SFP+, AQUANTIA AQtion Linux "atlantic" driver)<br />
** Driver compiled by default on PowerPC (and others) from this [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9b22fece786ed641909988da4810bfa8e5d2e592 commit].<br />
** There is proprietary firmware written into EEPROM from the factory but it does not seem to be writeable, nor does it have to be loaded by the Linux kernel.<br />
<br />
===Non-working===<br />
* Mellanox ConnectX IB QDR (mlx4 driver)<br />
<br />
==Wireless Cards==<br />
===Working===<br />
* Alfa AWUS036NHA Wireless USB Adaptor<br />
** open source firmware (ath9k_htc) [https://github.com/qca/open-ath9k-htc-firmware]<br />
* [https://ark.intel.com/content/www/us/en/ark/products/75439/intel-dual-band-wireless-ac-7260.html Intel Dual-Band Wireless-AC 7260] (Bluetooth untested)<br />
* [https://ark.intel.com/content/www/us/en/ark/products/86068/intel-dual-band-wireless-ac-8260.html Intel Dual-Band Wireless-AC 8260] (Bluetooth untested)<br />
* [https://ark.intel.com/content/www/us/en/ark/products/99445/intel-wireless-ac-9260.html Intel Dual-Band Wireless-AC 9260] (Bluetooth untested)<br />
* [https://ark.intel.com/content/www/us/en/ark/products/189347/intel-wifi-6-ax200-gig.html Intel® Wi-Fi 6 AX200] (Bluetooth untested)<br />
** When loading older firmware versions (iwlwifi-cc-a0-50.ucode), and EEH is triggered. Disabling the iommu is required for functionality. Note, tx bitrate is not reported correctly. <br />
** When using recent firmware (iwlwifi-cc-a0-71.ucode), the card operates as expected.<br />
* [https://www.thinkpenguin.com/gnu-linux/penguin-wireless-n-mini-pcie ThinkPenguin TPE-NMPCIE]<br />
** Chipset: Atheros AR9281<br />
** Linux driver: ath9k<br />
** Tested with StarTech PEX2MPEX; device is detected without trouble by Linux and NetworkManager; didn't try hooking up an antenna, so wasn't able to try connecting to networks.<br />
* TP-Link TL WN823N RTL8192EU [https://github.com/Mange/rtl8192eu-linux-driver]<br />
** remove "ARCH=$(ARCH)" on line 1710 of the makefile and it compiles fine<br />
* TP-LINK TL-WN725N V2 USB dongle<br />
** as of Linux 5.6.x, the rtl8188eu is in staging stage, so it is advised to compile the driver from [[https://github.com/lwfinger/rtl8188eu lwfinger/rtl8188eu]]<br />
* [https://www.asus.com/my/Networking-IoT-Servers/Adapters/All-series/PCE-AX3000/ Asus PCE-AX3000] Both Wi-Fi and Bluetooth worked out of the box with Ubuntu 21.10 (Bluetooth requires an additional USB connection, an [https://www.amazon.fr/gp/product/B08Q2TLWGV/ internal USB to 9-pin] cable works)<br />
<br />
==NVMe Drives==<br />
* Samsung 950 PRO (with M.2 to PCIe adapter)<br />
* Samsung 960 EVO / PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 EVO Plus (with M.2 to PCIe adapter)<br />
* Samsung 980 PRO (with M.2 to PCIe adapter)<br />
* [https://www.samsung.com/semiconductor/ssd/datacenter-ssd/MZ1LB960HAJQ/ Samsung PM983] (with [https://www.supermicro.com/en/products/accessories/addon/AOC-SHG3-4M2P.php AOC-SHG3-4M2P] M.2 to PCIe adapter)<br />
* [https://ark.intel.com/content/www/us/en/ark/products/series/81000/intel-ssd-dc-p3600-series.html Intel SSD DC P3600 PCIe AIC] (tested 1.6 TB)<br />
* Intel Optane 900P NVMe XPoint PCIe<br />
* Intel Optane 905P NVMe XPoint PCIe AIC<br />
* Intel Optane 905P NVMe Xpoint U.2, with included U.2 to M.2 cable plugged into an [[#PCIe_to_M.2_Adapters|ASUS Hyper M.2 X4 mini]].<br />
* WD Black PCIe (with M.2 to PCIe adapter)<br />
* MyDigitalSSD BPX 480GB (with M.2 to PCIe adapter)<br />
* Silicon Power US70 2000 GB (note that it is configured with 512 byte sectors by default and should be reformatted with nvme-cli to get better performance)<br />
<br />
Known issues:<br />
* [FIXED in stable kernels 4.19 and 5.4] [https://bugzilla.kernel.org/show_bug.cgi?id=202665 IOMMU related errors when performing discard on some NVMe devices] (mainly NVMe SSDs). Current workaround is booting with the kernel parameter ''iommu=soft'', see the [https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=530436c45ef2e446c12538a400e465929a0b3ade patch]<br />
<br />
==PCIe to M.2 Adapters==<br />
===Working===<br />
* [https://www.asus.com/us/Motherboard-Accessories/HYPER_M2_X4_MINI_CARD/ ASUS Hyper M.2 X4 mini], PCIe X4 to M.2.<br />
* [http://ableconn.com/products_2.php?gid=62 Ableconn PEXM2-SSD M.2 NGFF PCIe SSD to PCI Express 4.0 x4 Host Adapter Card (M.2 to PCIe adapter)]<br />
* [https://www.addonics.com/products/ad2m2nvmpx8.php Addonics AD2M2NVMPX8] Dual NVMe PCIe adapter 2x M.2 PCIe to PCIe x8<br />
* [https://www.delock.com/produkte/G_89370/merkmale.html Delock PCI Express x4 Card > 1 x internal NVMe M.2 Key M 80 mm - Low Profile Form Factor; Item No. 89370]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=9SIA4RE5AU2769 JEYI SK4 M.2 NVMe(M Key) SSD to PCI-E 3.0 x4 Adapter Converter Card]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=N82E16815124167 SYBA SI-PEX40110 M.2 PCI-e To PCI-e 3.0 x4]<br />
* [https://www.sybausa.com/index.php?route=product/product&product_id=1052 SYBA SI-PEX40152 PCIe 3.1 x16 to 4 x M.2 (M-Key) Adapter Card]<br />
* [https://highpoint-tech.com/USA_new/series-ssd7101a-1-overview.htm HighPoint SSD7101A-1] 4x M.2 PCIe to PCIe 3.0 x16 (based on PLX PEX8747 PCIe switch)<br />
** Works without special drivers as a PCIe switch. NVMEs are detected and work just fine. Petitboot is able to boot attached NVMEs with no problems. Tested in FreeBSD. -- [[User:Bdragon|Bdragon]] ([[User talk:Bdragon|talk]])<br />
* [https://highpoint-tech.com/USA_new/series-ssd7102-overview.htm HighPoint SSD7102] 4x M.2 PCIe to PCIe 3.0 x16 (with PCIe switch)<br />
* [https://estore-highpoint-tech.com/products/highpoint-ssd7505-pcie-4-0-x16-4-channel-u-2-nvme-raid-controller HighPoint SSD7505] PCIe 4.0 x16 4-Port M.2 NVMe RAID Controller<br />
* [https://highpoint-tech.com/USA_new/series-ssd7540-overview.htm HighPoint SSD7540] PCIe 4.0 x16 8-Port M.2 NVMe RAID Controller<br />
** Tested with Samsung 980 Pro 2TB<br />
** Beware of LUKS encryption performance not catching up with such speedy bandwidths yet.<br />
* [https://raidsonic.de/en/standards/searchresults.php?we_objectID=5456 Raidsonic Icy Box PCIe extension card for one M.2 NVMe SSD (IB-PCI214M2-HSL)]:<br />
** Tested with a Samsung 970 EVO Plus NVMe M.2 with 2 TB<br />
** Bootable and no special driver installation required<br />
** Has a passive cooling system for the SSD (about 20 degree Celsius cooler than without)<br />
** Supports PCIe 3.0 x4 with up to 32 GBit/s according to the manual<br />
** Seems to support PCIe 4.0 x4 with up to 64 GBit/s according to the current [https://www.raidsonic.de/products/accessories/ac_controller/IB-PCI214M2-HSL/pdf/datasheet_IB-PCI214M2-HSL_e.pdf data sheet] (probably due to the fact that it is only a routing device without any own logic)<br />
* [https://www.supermicro.com/en/products/accessories/addon/AOC-SHG3-4M2P.php Supermicro AOC-SHG3-4M2P] 4x M.2 PCIe to PCIe 3.0 x8 (using a PEX 8734 PCIe 3.0 (8.0GT/s) Switch). Draws 10 watts in idle. Requires one additional 4-pin 12V connector.<br />
* [https://www.akasa.com.tw/update.php?tpl=product/product.detail.tpl&no=181&type=Enclosures&type_sub=SSD%20Accessories&model=AK-PCCM2P-01 Akasa AK-PCCM2P-01] PCIe Gen3 x4 to M.2 2230/2242/2260/2280/22110. Tested with Samsung 970 EVO Plus 500GB.<br />
* [https://www.startech.com/en-us/cards-adapters/pexm2sat32n1 StarTech 3-Port M.2 SSD (NGFF) Adapter Card] 1 x PCIe (NVMe) M.2, 2 x SATA III M.2 - PCIe 3.0. Only tested the NVMe port with Samsung 970 EVO Plus 500GB.<br />
<br />
===Partially working===<br />
* [https://www.amazon.com/gp/product/B074WV4ZN4 Aplicata Quad M.2 NVMe SSD PCIe x16 Adapter] (no PCIe switch; only lowest slot works)<br />
<br />
==PCIe to U.2 Adapters==<br />
===Working===<br />
* [https://highpoint-tech.com/USA_new/series-ssd7120-overview.htm High Point SSD7120] PCIe 3.0 x16 to 4x U.2 NVMe ports (Dedicated PCIe 3.0 x4 per port, with PCIe switch) tested by [[User:Gyakovlev|Gyakovlev]] ([[User talk:Gyakovlev|talk]])<br />
** Tested with [https://www.icydock.com/goods.php?id=255 Icy Dock ToughArmor MB699VP-B] 4xU2 enclosure. Neither above controller nor enclosure ships with cables, 4x SAS HD SFF-8643 cables required to connect drives.<br />
** 4x Optane 905P work fine with this combo.<br />
* [https://www.highpoint-tech.com/ssd7580a-overview High Point SSD7580A] U.2 NVMe RAID controller (PCIe 4.0 x16, allows eight U.2 NVMe PCIe 4.0 SSDs to be connected)<br />
** Tested with [https://semiconductor.samsung.com/ssd/datacenter-ssd/pm9a3/ Samsung PM9A3]<br />
** Neither controller nor disks ship with cables (so for U.2, for example, requires a [https://estore-highpoint-tech.com/products/ts8i-8639-060 SFF-8654 to SFF-8639] for each pair of disks)<br />
<br />
==PCIe to MiniPCIe Adapters==<br />
=== Working ===<br />
* [https://www.startech.com/Cards-Adapters/Slot-Extension/PCI-Express-to-Mini-PCI-Express-Card-Adapter~PEX2MPEX StarTech PEX2MPEX] ([https://www.newegg.com/startech-com-model-pex2mpex-pci-express-to-mini-pci-express/p/N82E16815158307?Item=N82E16815158307&Description=mini%20PCIe&cm_re=mini_PCIe-_-15-158-307-_-Product NewEgg])<br />
** Tested with ThinkPenguin TPE-NMPCIE.<br />
** Particularly of interest as a lot of the ASPEED and SiliconMotion GPU's have a MiniPCIe form factor.<br />
<br />
==SAS/SATA Storage Controllers ==<br />
===Working===<br />
* IOCrest SI-PEX40062 (Chipset: Marvell 88SE9235, PCI id 1B4B:9235)<br />
** Marvell 88SE9230 chipset also confirmed to work<br />
* Kouwell PE-115H (Chipset: Marvell 88SE9130, PCI id 1b4b:9130)<br />
* LSI 9300/9200 SAS HBAs<br />
** May require updating to IT firmware on a x86 machine<br />
* [[PM8068]]-based SAS HBAs <br />
* Supermicro AOC-SLG3-4E2P 4-port OCuLink adapter<br />
* Jmicron JMB 363 SATA PCIe card. SATA ports work with Petitboot.<br />
* Broadcom MegaRAID 9460-8i<br />
* Broadcom MegaRAID 9460-16i<br />
* [http://www.iocrest.com/index.php?id=2070 IOCrest IO-M2F585-5I] (Chipset: JMicron JMB585, PCI IDs: 197b:0585)<br />
* Unbranded JMicron JMB363 SATA/IDE controller card, with one eSATA, one internal SATA, and one IDE (PATA) connector (Chipset: JMicron JMB363, PCI IDs: 197b:2363)<br />
** SATA ports work in Petitboot.<br />
** The IDE/PATA port doesn't work since it exclusively uses PCI I/O space access, which the [[POWER9]] does not support. Because of this, PCI function 1, which is used for the IDE/PATA functionality, is not exposed by Linux and so will not appear in the output of lspci.<br />
<br />
===Non-working===<br />
* AXAGON PCES-SA2 (ASMedia chipset)<br />
* SuperMicro AOC-SASLP-MV8 (mvsas driver)<br />
* MegaRAID 9341-8i - probably a bug in the firmware<br />
* Unbranded ASMedia ASM1166 SATA controller cards with six SATA connectors (Chipset: ASMedia ASM1166, PCI IDs: 1b21:1166)<br />
** Cards appear to be sold under different brands and with slightly different PCB layouts, but they can be identified by the following markings on their PCBs:<br />
*** "PCE6SAT-A01" and "VER006S"<br />
*** "PCI-E 3.0 TO SATA.6GB - 6Port" and "SU-SA3026"<br />
** Causes a PHB endpoint freeze during [[Skiboot]]'s initialization of the PCI Express device, so the issues this chip is having can't be worked around with just a kernel patch.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [https://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 642L] (Chipset: Marvell 88SE9235)<br />
* [https://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 644L] (Chipset: Marvell 88SE9235)<br />
<br />
== Optical Drives ==<br />
<br />
* [https://www.asus.com/us/Optical-Drives-Storage/BW16D1HT/HelpDesk_Download/ Asus BW-16D1HT Retail] (Blu Ray Writer with SATA interface):<br />
** Partially working (reading BDs works, writing not yet tested). [https://forums.raptorcs.com/index.php/topic,40.0.html Sometimes not recognized during boot phase with ATA timeouts] causing all SATA devices to be disabled<br />
<br />
<br />
== Graphics Cards ==<br />
<br />
No display? Check out the [[Troubleshooting/GPU|GPU Troubleshooting]] page.<br />
<br />
=== AMD ===<br />
<br />
All AMD GPUs currently have DMA issues (limited to 32-bit, which can cause crashes) due to missing Linux kernel support for DMA windows between 33 and 63 bits in length. The root cause is GPU vendors (and occasionally some non-GPU vendors) cutting costs and only including 40-bit capable (Intel-style) DMA controllers. A compatibility mode is expected to be included in Linux 5.4 and above that will resolve this issue.<br />
<br />
* AMD Radeon HD 5570 - Archaic (1GB VRAM, PCI 2.1) but much faster than the AST. This card (ASUS EAH5570 Silent) is passively cooled.<br />
* AMD Radeon HD 5850 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 6450 - Works with default settings (kernel: radeon, X: modesetting or radeon), tested in BE mode<br />
* AMD Radeon HD 6850 - Disable AST VGA with jumper. 32 bit.<br />
* AMD Radeon HD 7850 - Disabled onboard VGA. Using amdgpu is highly unstable, radeon driver is usable but has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 7950 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon R5 220<br />
* AMD Radeon R5 230 - Works in BE mode (use <code>Option "AccelMethod" "EXA"</code> for Xorg)<br />
* AMD Radeon R7 240<br />
* AMD Radeon R9 290X<br />
* AMD Radeon R9 Nano - Must disable onboard VGA first. Works perfectly with Linux 5.6.x to 5.12.x with 4K Pages. It is confirmed working 5.6.x and 5.10.6 (or newer) with 64K Pages (occasionally crash under heavy load for example Blender rendering). Unfortunately 5.7.x, 5.8.x, 5.9.x, 5.11.1 -> 5.11.11 and 5.12.x with 64K pages are known to crash. For 5.7.x (64K pages), you could workaround the crash by adding `amdgpu.dc=0` to grub config.<br />
* Sapphire GPRO 8200 (Polaris10 core) - Disable AST VGA with jumper, disabling in grub is not enough. Same form factor as WX7100, a single-slot RX 470 with 8GB of RAM and 4 DP outputs.<br />
* AMD Radeon RX 480<br />
* AMD Radeon RX 550 - Works with caveats (below) for particular card tested.<br />
** Card tested was Gigabyte GV-RX550D5-2GD in a Blackbird with Ubuntu 19.10, 5.3.0-24 and amdgpu with onboard VGA disabled by jumper. Suspect with tweaking would work without needing to disable VGA. Alas would lock up every day or two, to the point I replaced with a Sapphire RX580. Based on conversations w/Raptor suspect this was an issue with the model card I had rather than the RX550 itself.<br />
* AMD Radeon RX 560X<br />
* AMD Radeon RX 580 – Works with the amdgpu firmware from Ubuntu 19.04 and disabled onboard VGA<br />
** You may also need a kernel parameter like <code>vga=797</code> if xinit complains about VESA[https://en.wikipedia.org/wiki/VESA_BIOS_Extensions]<br />
** The Sapphire NITRO+ Radeon RX 580 8GB card is a tight fit on the Blackbird planar if you're using the 2nd PCIe slot as it a bit wider than two slots (and is documented as such). Solved by removing the adapter plate for the PCIe-M2 adapter card being used and allowing it to sit in slot untethered.<br />
* AMD Radeon RX Vega 56 - Works with Debian Buster with amdgpu. Requires patches to work, somewhat unstable but usable. Cannot use AST Integrated VGA and AMDGPU at the same time without causing conflict. Not tested at this moment for use in petitboot or firmware. <br />
* AMD Radeon RX Vega 64 - Works with Fedora 32 with Linux kernel 5.5.0's amdgpu. The card does _NOT_ display in bootloader because vega10 firmwares failed to load correctly.<br />
* AMD Radeon Pro WX4100 (Polaris11 core) - May need at least linux 4.16 in order to get Xorg to work.<br />
* AMD Radeon Pro WX5100<br />
* AMD Radeon Pro WX7100 (Polaris10 core) - Available pre-installed on Talos II workstation, server, and desktop configurations.<br />
* AMD Radeon RX 5700 (Navi 10) - Requires [https://lists.freedesktop.org/archives/amd-gfx/2019-December/043682.html kernel patches] to enable display output. <br />
* AMD Radeon RX 5700 XT (Navi 10) - Requires [https://lists.freedesktop.org/archives/amd-gfx/2019-December/043682.html kernel patches] to enable display output.<br />
* AMD Radeon Pro W5500 (Navi 14) - "amdgpu" driver works with 4k kernel but not 64k. "fbdev" driver works with both page sizes.<br />
* AMD Radeon RX 6800 - see RX 6900 XT<br />
* AMD Radeon RX 6800 XT - see RX 6900 XT<br />
* AMD Radeon RX 6900 XT (Big Navi, Navi 21) - Not working with current 5.12 (in either 4K or 64K page sizes) - [https://gitlab.freedesktop.org/drm/amd/-/issues/1519 bug ticket] <br />
<br />
The core name is important when storing the firmware into the BOOTKERNFW partition in PNOR for use by skiroot.<br />
<br />
=== DisplayLink ===<br />
<br />
* [https://www.climaxdigital.co.uk/CUH195-USB-2-to-DVI-VGA-or-HDMI-Adaptor-1080p-full-hd ClimaxDigital CUH195 USB 2.0 Graphic Adapter] - Based on DisplayLink DL-3500 chipset. Works in the main OS; not tested with Petitboot but is likely to work there too.<br />
* [https://www.evga.com/support/manuals/files/100-U2-UV12-A1.pdf EVGA 100-U2-UV12-A1 UV Plus USB VGA Adapter] - Petitboot shows up without loading firmware. Not tested in OS.<br />
<br />
=== NVIDIA ===<br />
* NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1) - Works in petitboot if onboard VGA is disabled. Currently has issues with only using 32-bit DMA. No firmware needed.<br />
* NVIDIA RTX 2070 - usable for compute, but not 3D acceleration; integrated by Raptor as part of the Talos II PowerAI Development System configuration<br />
<br />
=== Other ===<br />
* [[AST2500|ASPEED AST2500]]. Works in both the main OS (LE mode) and Petitboot. BE mode partially works (doesn't crash, but colors are wrong unless you apply a patch that is harmful to performance). On Linux 5.6+, [https://forums.raptorcs.com/index.php/topic,31.0.html 1920x1200 resolution is broken]. <code>ast</code> Linux driver.<br />
<br />
=== Non-working ===<br />
<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=244 ASPEED AST1300]. Older revision of the AST2510 (AST1300 is 4th generation; AST2510 is 6th generation). VGA 1920x1200 @ 60Hz 32bpp; framebuffer (no acceleration). <code>ast</code> Linux driver. [https://github.com/open-power/skiboot/issues/257 Open issue with Skiboot for getting it fixed.] Known suppliers of AST1300 devices are:<br />
** [https://www.gigabyte.com/Enterprise/Accessory/GC-IVA-rev-10 Gigabyte GC-IVA 9CIVANR-00] -- Resold by:<br />
*** [https://www.lambda-tek.com/Gigabyte-9CIVANR-00~sh/B42184346&viewOverview=y#product-view LambdaTek]<br />
*** [https://sg-computers.com/en/video-card/gigabyte-gc-iva-video-card-detail SG-Computers]<br />
** [https://iei.rs/IGCME-1300-R10 IEI Integration Corp IGCME-1300-R10] ([https://iei.rs/image/cache/data/IGCME-1300_20131105.pdf Datasheet]) ([https://dls.ieiworld.com/IEIWeb/Reserved/0D332000196276623429/IGCME-1300%20QIG%20V1.01_20120531.pdf Quick Installation Guide]) -- Resold by:<br />
*** [http://archivecaslytosk.onion/QZROL eBay example 1]<br />
*** [https://www.ebay.com/p/1383304505 eBay example 2]<br />
*** [https://web.archive.org/web/20171003045507/http://neutronusa.com/prod.cfm/1525210/ NeutronUSA] (Warning: non-TLS link!)<br />
*** [https://forums.servethehome.com/index.php?threads/fs-us-ny-intel-x540-t2-minipcie-vga-slim-120mm-fans.26880/ ServeTheHome]<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* ASPEED AST2500<br />
** [https://www.asrockrack.com/general/productdetail.asp?Model=PAUL ASRock Rack Paul]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=455 ASPEED AST2510]. It's the GPU component of the [[AST2500]] without the BMC component. VGA 1920x1200 @ 60Hz 32bpp; framebuffer (no acceleration). Might be useful for users who want to add additional VGA displays beyond the single VGA display supported by the built-in AST2500, with similar freedom and performance properties as the AST2500. <code>ast</code> Linux driver. Known suppliers of AST2510 devices are:<br />
** [https://www.aewin.com/products/r478/ AEWIN Technologies R478]<br />
** [https://www.aewin.com/products/r492b/ AEWIN Technologies R492B]<br />
*** Distributed as add-on for these servers:<br />
**** [https://www.aewin.com/products/scb-1921a/ SCB-1921A]<br />
**** [https://www.aewin.com/zh-hans/products/scb-1925/ SCB-1925] ([https://www.aewin.com/wp-content/uploads/2019/11/SCB-1925.pdf datasheet])<br />
**** [https://www.aewin.com/zh-hant/products/scb-1935a/ SCB-1935A] ([https://www.aewin.com/wp-content/uploads/2020/02/SCB-1935.pdf datasheet])<br />
**** [https://www.aewin.com/products/scb-1935b/ SCB-1935B] ([https://www.aewin.com/wp-content/uploads/2020/02/SCB-1935.pdf datasheet])<br />
** [https://www.asrockrack.com/general/productdetail.asp?Model=TOMMY ASRock Rack Tommy 90-SC02P1-00UBNZ]<br />
*** [https://download.asrock.com/Manual/QIG/TOMMY.pdf Manual]<br />
*** Resold by [https://www.newegg.com/asrock-rack-tommy-other/p/N82E16816775074 NewEgg].<br />
** [https://www.win-ent.com/1U-Rackmount-Platforms/pl-81280 WIN Enterprises IP-492B]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=377 ASPEED AST1400]. Older revision of the AST2510 (AST1400 is 5th generation; AST2510 is 6th generation). VGA 1920x1200 @ 60Hz 32bpp; framebuffer (no acceleration). <code>ast</code> Linux driver. Known suppliers of AST1400 devices are:<br />
** [https://iei.rs/IGCME-1300-R11 IEI Integration Corp IGCME-1300-R11] ([https://iei.rs/image/cache/data/IGCME-1300_MPCIE-USB3.pdf Datasheet]) ([https://dls.ieiworld.com/IEIWeb/Reserved/0F233000410888189307/IGCME-1300%20QIG%20V1.10_20150819.pdf Quick Installation Guide]) -- Resold by:<br />
*** [https://eu.mouser.com/ProductDetail/IEI/IGCME-1300-R11?qs=wd5RIQLrsJgucg6W4Ojybw%3D%3D Mouser]<br />
*** [https://www.amazon.com/IEI-Technology-IGCME-1300-R11-Adapter-AST1400/dp/B07WRVK8DR Amazon]<br />
*** [https://www.kacer.com/product/accessories/daughter%20card/Mini%20PCIe/IGCME-1300/IGCME-1300.htm Kacer]<br />
*** [https://www.alibaba.com/product-detail/IEI-IGCME-1300-R11-PCIe-Mini_60839628812.html Alibaba]<br />
*** [https://www.icpamerica.com/igcme-1300-add-on-card/ ICP America]<br />
* SiliconMotion SM750. Chipset is VGA + DVI (dual display) 1920x1440, but some devices may not support the full chipset resolution; appears to have 2D acceleration (not just framebuffer). Appears to be fixed-function silicon (no firmware). PCIe interface. <code>sm750fb</code> Linux driver is in staging. [https://gitlab.com/sudipm/sm750/tree/sm750 <code>sm750</code> Linux driver] is not yet merged to mainline. <code>sm750</code> Linux driver has some weird license text, but [https://github.com/torvalds/linux/commit/81e0da703fdba1ee126868bf8350592c79cdba13 according to Greg Kroah-Hartman] it sounds like the authors intend it to be GPLv2; would be useful to double-check with Greg/Sudip/Teddy whether Silicon Motion's statement to Greg applies to Sudip's <code>sm750</code> or if it only applies to mainline's <code>sm750fb</code>. Known suppliers:<br />
** [https://www.asrockrack.com/general/productdetail.asp?Model=M2_VGA ASRock Rack M2_VGA]. Resold by:<br />
*** [https://www.newegg.com/asrock-rack-m2-vga-interface-module/p/N82E16816775029 NewEgg]<br />
** [https://www.cervoz.com/product.php?id=c39eb02c-014a-1000-a04b-001851f77c0c Cervoz MEC-DIS-M002]. VGA + DVI (dual display) 1280x1024 @ 60Hz. Mini-PCIe form factor. Resold by:<br />
*** [https://www.kacer.com/product/accessories/daughter%20card/Mini%20PCIe/MEC-DIS-M002/MD02.html Kacer]<br />
*** [https://www.texim-europe.com/product/MEC-DIS-M002 Texim Europe]<br />
*** [https://www.bvm.co.uk/products/1053-Mini-PCI-Express-DVI-VGA-Module-MEC-DIS-M002/ BVM]<br />
*** [https://web.archive.org/web/20200704052513/https://nerugged.com/product/mec-dis-m002-mpcie-dvi-vga-controller/ New England Rugged]<br />
** [https://web.archive.org/web/20200707045733/http://www.smartnre.com/en/product/Fastwel_VIM552_3U_CPCI_Graphics_Module.html Fastwel VIM552] (Warning: non-TLS link!)<br />
** [https://www.memorydepot.com/detail/EMPV-1201-C1.html Innodisk EMPV-1201-C1]<br />
** [https://www.memorydepot.com/detail/EMPV-1202-C1.html Innodisk EMPV-1202-C1]<br />
** [https://www.sunix.com/en/product_detail.php?cid=1&kid=2&gid=15&pid=1760 SUNIX VGA0419]<br />
** [https://www.sunix.com/en/product_detail.php?cid=1&kid=2&gid=15&pid=1766 SUNIX VGA0429]. Resold by:<br />
*** [https://www.dc3.co.za/computer-store/sc-svga0429/ DC3 Distribution]<br />
** [https://www.sunix.com/en/product_detail.php?cid=1&kid=2&gid=15&pid=1817 SUNIX VGA0449M]<br />
** [https://www.vadatech.com/product.php?product=368 VadaTech AMC348]<br />
** [https://www.vadatech.com/product.php?product=151 VadaTech AMC349]<br />
** [https://www.versalogic.com/product/video-expansion-module/ VersaLogic VL-MPEe-V5]<br />
* DisplayLink<br />
** DL-125<br />
*** [https://archive.plugable.com/products/uga-125/ Plugable UGA-125]<br />
** DL-165<br />
*** [https://www.diamondmm.com/product/diamond-bvu165-usb-external-video-display-adapter/ Diamond Multimedia BVU165]<br />
**** Resold by [https://www.amazon.com/Diamond-BVU165-USB-HDMI-Adapter/dp/B00C2RAO3M Amazon].<br />
*** [https://www.diamondmm.com/product/bvu165lt-diamond-bvu165lt-usb-external-video-display-adapter/ Diamond Multimedia BVU165LT]<br />
**** Resold by [https://www.amazon.com/Diamond-Multimedia-Graphics-1920x1080-1600x1200/dp/B00BN5FI8K Amazon].<br />
*** [https://plugable.com/products/uga-165 Plugable UGA-165]<br />
*** [https://plugable.com/products/usb-vga-165 Plugable USB-VGA-165]<br />
**** Resold by [https://www.amazon.com/Plugable-Graphics-Multiple-1920x1080-Chromebooks/dp/B004D0QC0A Amazon]<br />
*** [https://archive.plugable.com/products/usb2-hdmi-165/ Plugable USB2-HDMI-165]<br />
**** Resold by [https://www.amazon.com/Plugable-USB2-HDMI-165-Adapter-DisplayLink-DL-165/dp/B004QPY4NY Amazon].<br />
*** [https://www.siig.com/products/it-products/video-display/display-adapters/usb-2-0/usb-2-0-to-vga-pro.html SIIG JU-VG0012-S1]<br />
**** Resold by [https://www.amazon.com/SIIG-USB-2-0-Adapter-JU-VG0012-S1/dp/B0048744GM Amazon].<br />
*** [https://www.startech.com/en-us/audio-video-products/usb2dvimm6 StarTech USB2DVIMM6]<br />
**** 1680x1050.<br />
**** Resold by [https://www.newegg.com/startech-com-usb2dvimm6/p/N82E16815158183 NewEgg].<br />
** DL-195<br />
*** [https://www.amazon.com/Accell-Male-DVI-I-Female-Adapter/dp/B005RUSWHQ Accell J130B-001B]<br />
*** [https://www.accellww.com/collections/adapters/products/ultraav-usb-2-0-to-hdmi-adapter Accell J131B-001B UltraAV]<br />
**** Resold by [https://www.amazon.com/Accell-J131B-001B-UltraAV-DisplayLink-Processor/dp/B005RUSWI0 Amazon].<br />
*** [https://www.diamondmm.com/product/diamond-bvu195-usb-external-video-display-adapter/ Diamond Multimedia BVU195]<br />
**** Resold by [https://www.amazon.com/Diamond-Multimedia-BVU195-2048x1152-1920x1080/dp/B002GHBW4S Amazon].<br />
*** [https://archive.plugable.com/products/uga-2k-a/ Plugable UGA-2K-A]<br />
**** Resold by [https://www.amazon.com/Plugable-Multiple-2048x1152-1920x1080-DisplayLink/dp/B00BBDFMK8 Amazon]<br />
*** [https://www.sabrent.com/product/UGA-2K-195/multi-display-usb-2-0-dvivga-hdmi-adapter-link-6-additional-displays/ Sabrent UGA-2K-195]<br />
**** Resold by [https://www.amazon.com/UGA-2K-195-Multiple-2048x1152-1920x1080-DisplayLink/dp/B00ABNLEWO Amazon].<br />
*** [https://www.sabrent.com/product/USB-2011/usb-2-0-to-vgadvihdmi-adapter-for-multiple-monitors/ Sabrent USB-2011]<br />
**** Resold by [https://www.amazon.com/Multiple-2048x1152-1920x1200-DisplayLink-USB-2011/dp/B002SB61W0 Amazon].<br />
*** [https://www.sabrent.com/product/USB-DH88/usb-2-0-vgadvihdmi-adapter-multiple-monitors-2048x11521920x1080-displaylink-dl-195-chipset/ Sabrent USB-DH88]<br />
**** Resold by [https://www.amazon.com/Sabrent-USB-DH88-2048x1152-1920x1080-DisplayLink/dp/B001B7H39W Amazon].<br />
*** [https://www.sabrent.com/product/USB-HRHD/video-audio-usb-2-0-hdmi-dvi-adapter-multiple-monitors-2048x1152-1920x1200-displaylink-dl-195-chipset/ Sabrent USB-HRHD]<br />
**** Resold by [https://www.amazon.com/Sabrent-2048x1152-1920x1200-DisplayLink-USB-HRHD/dp/B008S08ADI Amazon].<br />
*** [https://www.siig.com/products/it-products/video-display/display-adapters/usb-2-0/usb-2-0-to-dvi-vga-pro.html SIIG JU-DV0112-S1]<br />
**** Resold by [https://www.amazon.com/SIIG-Multi-Monitor-Converter-Windows-1080p/dp/B004WKRRY6 Amazon].<br />
*** [https://www.startech.com/en-us/audio-video-products/usb2dvipro2 StarTech USB2DVIPRO2]<br />
**** 1920x1200.<br />
**** Resold by [https://www.newegg.com/startech-com-usb2dvipro2/p/N82E16812400361 NewEgg].<br />
*** [https://www.startech.com/en-us/audio-video-products/usb2vgapro2 StarTech USB2VGAPRO2]<br />
**** 1920x1200.<br />
**** Resold by [https://www.newegg.com/startech-com-usb2vgapro2/p/N82E16812400368 NewEgg].<br />
** DL-3500<br />
*** [https://www.climaxdigital.co.uk/epages/BT3449.sf/en_GB/?ObjectPath=/Shops/BT3449/Products/111216 ClimaxDigital CUH350]<br />
**** ClimaxDigital claims 1920x1200; DisplayLink chipset docs claim 2560x1600.<br />
* PowerVR<br />
** [https://hothardware.com/news/powervr-innosilicon-fantasy-one-gpu-certified-for-chinas-tongxin-uos Innosilicon Fantasy One]<br />
** [https://www.geeks3d.com/20220401/new-chinese-gpu-maker-moore-threads-unveils-the-mtt-s60-graphics-card-with-vulkan-opengl-and-direct3d-support/ Moore Threads MTT S60]<br />
<br />
== Sound Cards ==<br />
<br />
===Working===<br />
* Creative Sound Blaster Audigy FX SB1570 PCIe 5.1 Sound Card<br />
* Creative Sound Blaster X-Fi Xtreme Fidelity PCIe Audio Sound Card (SB0880)<br />
* Creative [https://us.creative.com/p/sound-blaster/sound-blasterx-ae-5-plus Sound BlasterX AE-5 Plus] worked out of the box with Ubuntu 21.10 (the audio config needs changing to use the stereo output otherwise the default is the S/PDIF)<br />
* AMD Radeon HD 5850 and 7950 (HDMI audio)<br />
* [https://www.vantecusa.com/products_detail.php?p_id=156&p_name=+USB+Stereo+Audio+Adapter&pc_id=9&pc_name=Adapters&pt_id=3&pt_name=Audio+%2B++Video#tab-1 VANTEC NBA-120U (USB)]<br />
* Sabrent USB External Stereo Sound Adapter (AU-MMSA)<br />
* [https://mackie.com/products/onyx-blackjack Mackie Onyx Blackjack (USB) Recording Interface]<br />
* RME HDSPe AIO (FreeBSD tested)<br />
* Leveraged Sabrent Bluetooth 4.0 USB adapter (model BT-UB40) to connect to wireless Bluetooth headphones, specifically Bose Quiet Comfort 35.<br />
* Bluetooth audio from an [https://www.asus.com/my/Networking-IoT-Servers/Adapters/All-series/PCE-AX3000/ Asus PCE-AX3000] connecting to various devices, with the media keys also working to control playback<br />
<br />
===Non-working===<br />
* ASUS Xonar SE - Contains ASMedia USB host controller with errant DMA access flaw<br />
* Creative Sound Blaster Audigy PCIe RX 7.1 - unable to enable emu10k1 driver on little-endian power9 kernel as driver requires ZONE_DMA<br />
<br />
==USB Host Controllers==<br />
===Working===<br />
* Insignia USB 3.0 PCI-e NS-PCCUP53 V1.0 (Chipset: NEC D720202)<br />
* AGAXO PCEU-23R (Chipset: Renesas uPD720202, PCI id 1912:0015)<br />
* Terminus Technology Inc. FE 2.1 7-port Hub<br />
* [https://www.sonnettech.com/product/legacyproducts/allegroprousb3pcie.html Sonnet Allegro Pro USB 3.0 PCIe USB3-PRO-4PM-E] (Chipset: Four [http://www.frescologic.com/product/single/fl1100ex/ Fresco Logic FL1100EX] controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8608 PLX PEX 8608] switch)<br />
* [https://www.vantecusa.com/products_detail.php?p_id=125&p_name=+4-Port+SuperSpeed+USB+3.0+PCIe+Host+Card+w%2F+Internal+20-Pin+Connector&pc_id=16&pc_name=USB&pt_id=4&pt_name=Add-on+Cards Vantec UGT-PC345 4 Port USB 3.0 PCIe w/ Internal 20 pin] (Chipset: Renesas uDP720201)<br />
* [https://www.amazon.com/gp/product/B07H4HJNJC] (monster card with 8 ports of USB 3.0) four Renesas uPD720202 chips behind ASMedia 1806, card can be found under different brands but can be identified by the look. [http://sedna-shop.com/index.php?route=product/product&path=59_74&product_id=138 This should be the same card]<br />
* En-Labs PCI-e to 4 Ports USB 3.1 GEN 1 (5Gbps) (USB Type-C +USB Type A w/ Internal 19Pin USB 3.0 Dual Port) PCI Express Card (Chipset: ASMedia ASM1042A)<br />
** Card appears to be sold under different brands, but can be identified by the "PCE3U1T-A31" and "VER 006S" markings on the PCB.<br />
** Requires kernel version 4.14.226, 4.19.181, 5.4.106, 5.10.24, 5.11.7, or later.<br />
*** Petitboot's kernel will need to be updated to one of these versions (or later) in order to boot from any USB devices connected to this controller.<br />
* [https://www.sybausa.com/index.php?route=product/product&product_id=818 IOCrest SI-PEX20189] (Chipset: ASMedia ASM1142)<br />
** Requires kernel version 4.14.194, 4.19.139, 5.4.58, 5.7.15, 5.8.1, or later.<br />
*** Petitboot's kernel will need to be updated to one of these versions (or later) in order to boot from any USB devices connected to this controller.<br />
** EEH errors may occur during long reads from multiple devices.<br />
* [http://ableconn.com/products_2.php?gid=121 Ableconn PU31-2C-2] (Chipset: ASMedia ASM2142)<br />
** Requires kernel version 4.14.190, 4.19.135, 5.4.54, 5.7.11, 5.8.0, or later.<br />
*** Petitboot's kernel will need to be updated to one of these versions (or later) in order to boot from any USB devices connected to this controller.<br />
** EEH errors may occur during long reads from multiple devices.<br />
* Semoic USB 3.1 to Type-C 2 Port Expansion Card (Chipset: ASMedia ASM3142, same PCI IDs as ASM2142)<br />
** Card appears to be sold under different brands, but can be identified by the "PCE2TYC-A31", "VER006", "USB 3.1 Type-C 2-Port Card", and "PCE-E 4X" markings on the PCB.<br />
** Requires kernel version 4.14.190, 4.19.135, 5.4.54, 5.7.11, 5.8.0, or later.<br />
*** Petitboot's kernel will need to be updated to one of these versions (or later) in order to boot from any USB devices connected to this controller.<br />
** EEH errors may occur during long reads from multiple devices.<br />
* [https://www.orico.cc/us/product/detail/7192.html ORICO PE20-1C] (Chipset: ASMedia ASM3242)<br />
** Requires kernel version 4.14.226, 4.19.181, 5.4.106, 5.10.24, 5.11.7, or later.<br />
*** Petitboot's kernel will need to be updated to one of these versions (or later) in order to boot from any USB devices connected to this controller.<br />
<br />
===Non-working===<br />
In general, USB3 host controllers based on ASMedia chipsets are known to be problematic, due to ASMedia hardware or firmware bugs causing errant DMA accesses to invalid regions of host memory.<br />
<br />
* AXAGON PCEU-43V - chipset Via VL805 - PCI id 1106:3483<br />
* StarTech PEXUSB314A2V - 2x ASM1142 host controllers and a PCIe switch<br />
** This card completely fails to be detected.<br />
* QNINE USB 3.1 Gen2 (Type-A and Type-C) - ASM1142<br />
** This may work now with an updated kernel, but it hasn't been tested yet.<br />
* Rosewill RC-509 - ASM1142<br />
** This may work now with an updated kernel, but it hasn't been tested yet.<br />
* [https://highpoint-tech.com/USA_new/cs-series_RocketU1022A-Series.htm HighPoint RocketU 1022A] (Chipset: ASMedia ASM1042)<br />
** Skiboot reports that the PCIe link is unstable when the card is connected directly, but it seems to work when the card is plugged in via a PCIe switch.<br />
** This chip seems somewhat unreliable, since USB reads can fail after only a few tens of gigabytes have been transferred.<br />
* [https://highpoint-tech.com/USA_new/cs-series_RocketU1144A-Series.htm HighPoint RocketU 1144A] (Chipset: Chipset: Four ASMedia ASM1042 controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8609 PLX PEX 8609] switch)<br />
** Skiboot sometimes times out when scanning for the ASM1042 controllers attached to the PEX 8609 ("Timeout waiting for downstream link"), resulting in some of the ports effectively being disabled until the next boot.<br />
** The ASM1042 controller seems somewhat unreliable.<br />
*** Lots of resets on USB 3.<br />
*** Long reads from a single USB hard drive can sometimes result in I/O errors.<br />
*** Incompatible with some USB hard drives.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=54 SEDNA - PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC)<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=99 SEDNA - PCIe 4 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
* [https://www.startech.com/Cards-Adapters/USB-3.0/Cards/7-port-pci-express-usb-3-card~PEXUSB3S7 StarTech PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
* [https://highpoint-tech.com/USA_new/series-ru1344a-overview.htm High Point RocketU 1344A 4-Port USB 3.1 PCI-Express 3.0 x 4 HBA] (Chipset: Two ASMedia ASM3142 controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8714 PLX PEX 8714] switch)<br />
* [https://highpoint-tech.com/USA_new/series-ru1144d-overview.htm High Point RocketU 1144D 4-Port USB 3.0 PCI-Express 2.0 x 4 HBA] (Chipset: Four ASMedia ASM1042A controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8609 PLX PEX 8609] switch)<br />
* [https://www.sonnettech.com/product/allegro-usbc-pcie.html Sonnet Allegro USB-C PCIe Card USB3C-2PM-E] (Chipset: ASMedia ASM1142/ASM3142 (cards shipped before April 2020 use the ASM1142 controller))<br />
* [https://www.sonnettech.com/product/allegro-usbc-4port-pcie.html Sonnet Allegro USB-C 4-Port PCIe Card USB3C-4PM-E] (Chipset: Two ASMedia ASM1142/ASM3142 controllers (cards shipped before January 2020 use ASM1142 controllers) behind one [https://www.diodes.com/part/view/PI7C9X2G308GP Pericom PI7C9X2G308GP] switch)<br />
* [https://www.gigabyte.com/Motherboard/GC-USB-32-GEN2X2 Gigabyte GC-USB 3.2 GEN2X2] (Chipset: ASMedia ASM3242)<br />
<br />
==TV Tuners==<br />
* [https://hauppauge.com/pages/products/data_quadhd.html Hauppauge WinTV-quadHD] (Chipset: Four Silicon Labs Si2157 tuners, four LG LG3306A demodulators, and two Conexant CX23888 PCIe interface chips behind one [https://www.diodes.com/part/view/PI7C9X2G304EL Pericom PI7C9X2G304EL] PCIe switch)<br />
* Hauppauge WinTV HVR-850 (2040:7240) - ATSC - using Kaffeine<br />
<br />
==Firewire Host Controllers==<br />
===Working===<br />
<br />
* [https://www.sybausa.com/index.php?route=product/product&product_id=119 Syba SY-PEX30016] (Chipset: TI XIO2213B)<br />
** Requires [https://marc.info/?l=linux1394-devel&m=157207806405627&q=mbox this patch] to work on kernels with a 64k page size.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
<br />
* [http://www.dawicontrol.com/index.php?cmd=proddet&id=media Dawicontrol DC-FW800] (Chipset: TI XIO2213B)<br />
* [https://www.delock.de/produkte/G_89210/merkmale.html?setLanguage=en DeLOCK 3x FireWire 800, Item No. 89210] (Chipset: TI XIO2213B)<br />
* [https://www.digitus.info/en/products/computer-components/computer-peripherals/serial-parallel-adapter/ds-30203-2/ DIGITUS Firewire 800 (1394b) PCIe Card] (Chipset: TI XIO2213B)<br />
* [https://www.exsys.de/index.php?page=product&info=127 Exsys EX-16415] (Chipset: TI XIO2213)<br />
* [https://www.exsys.de/index.php?page=product&info=366 Exsys EX-16512E] (Chipset: TI)<br />
* [http://www.ioi.com.tw/products/proddetail.aspx?CatID=106&DeviceID=3021&HostID=2009&ProdID=1060100 IOI Technology FWB-PCIE1X11A] (Chipset: TI XIO2213B)<br />
[[Category:Compatibility List]]<br />
<br />
==Video Capture Cards==<br />
* [https://www.avermedia.com/professional/product/ce310b/overview AVerMedia CE310B] (Chipset: Conexant CX23888)<br />
** Requires kernel version 4.19.106, 5.4.22, 5.5.6, or later.<br />
<br />
==Serial Port Adapter Cards==<br />
===Working===<br />
* EXSYS EX-44072 PCI-Express 2x Serial RS-232 Board (Chipset: Oxford OXPCIe952)<br />
* EXSYS EX-44073 PCI-Express 2x Serial RS-232 Board (Chipset: Oxford OXPCIe952)<br />
* EXSYS EX-44171 PCI-Express 1x Serial RS-232 / 1x Parallel Multi I/O Card (Chipset: Oxford OXPCIe952)<br />
** ''The UARTs implemented with the Oxford Semiconductor OXPCIe952 PCIe ASIC can be strapped for either native or legacy operation. The EXSYS boards configure it for the native mode and therefore work with the PHB4 just fine.<br>NB the PC parallel port is always a legacy PCIe device and therefore cannot work with the PHB4.''<br />
<br />
==PCIe/PCI Expansion==<br />
===Working===<br />
* [https://www.exsys-shop.de/shopware/en/categories/expansions-boxes/490/pcie-adapter-card-for-ex-1010/1031/1032/1041/1042 EXSYS EX-1095 PCIe Adapter card for EX-1010/1031/1032/1041/1042]<br />
** [https://www.exsys-shop.de/shopware/en/categories/expansions-boxes/1144/expansion-box-with-4-x-pci-slots-38cm-length-220w-power-supply EXSYS EX-1031 Quad PCI-Slot Expansion Box] (Chipset: TI XIO2000A)<br />
*** 3Com 3C905C-TX-M EtherLink 10/100 PCI Ethernet [[POWER9_Hardware_Compatibility_List/PCIe_Devices#NICs|NIC]]<br />
*** DEC FDDIcontroller/PCI (DEFPA) PCI FDDI [[POWER9_Hardware_Compatibility_List/PCIe_Devices#NICs|NIC]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=BCM5719&diff=3512BCM57192021-07-03T13:16:23Z<p>Meklort: Add instructions on switching from proprietary firmware to open source firmware.</p>
<hr />
<div>==Overview==<br />
<br />
The BCM5719 is the [[NIC|NIC]] integrated into the [[Talos_II|Talos™ II]] and [[Blackbird|Blackbird™]] systems. It is based on the wildly popular NetXtreme architecture, and there have been efforts to document the internal operation of devices based on that architecture.<br />
<br />
The BCM5719 also connects to the BMC via RGMII NC-SI, providing network connectivity to the BMC.<br />
<br />
==Firmware==<br />
<br />
All Raptor systems shipped after May 10, 2021 use the open-source Ortega firmware for the BCM5719 device.<br />
<br />
Older devices that shipped with the proprietary firmware can be updated to the open source firmware by following the [https://github.com/meklort/bcm5719-fw instructions on github] or by using the following command:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@hostname ~]$ <span style="font-weight: bold;">sudo fwupdmgr switch-branch</span><br />
</pre><br />
Once on the open source firmware branch, fwupd will will provide updates using the following command:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@hostname ~]$ <span style="font-weight: bold;">sudo fwupdmgr update</span><br />
</pre><br />
<br />
==Details==<br />
On board EEPROM layout (note: may change as understanding of EEPROM file system evolves)<br />
{| class="wikitable sortable"<br />
! style="text-align:left;"| Offset<br />
! style="text-align:left;"| Length<br />
! style="text-align:left;"| Data<br />
! style="text-align:left;"| CRC Protected<br />
|-<br />
|0x7e<br />
|6<br />
|MAC Address (port 0)<br />
|NO<br />
|-<br />
|0xce<br />
|6<br />
|MAC Address (port 1)<br />
|NO<br />
|-<br />
|0x20a<br />
|6<br />
|MAC Address (port 2)<br />
|NO<br />
|-<br />
|0x25a<br />
|6<br />
|MAC Address (port 3)<br />
|NO<br />
|}<br />
<br />
==Resources==<br />
* [https://git.raptorcs.com/git/bcm5719-ortega/ Official Ortega firmware shipped on Raptor systems]<br />
* [https://docs.broadcom.com/docs-and-downloads/collateral/pg/5718-PG107-R.pdf Register manual]<br />
* [[:File:Bcm5719_talos.bin|Proprietary Broadcom firmware image]] for recovery of bricked [[Talos_II|Talos™ II]] on-board NICs. This image is considered deprecated by Raptor, and Raptor strongly recommends the use of the open-source Ortega firmware instead of the proprietary Broadcom firmware. Note that the two MAC addresses inside this image '''must''' be changed to match the MAC addresses on your particular [[Talos_II|Talos™ II]] system; failure to do so could potentially cause serious network issues, including harm to other computers and/or users on any network(s) attached to the Broadcom network ports.<br />
* Reverse engineering work by Guillaume Delugré<br />
** [https://static.raptorcs.com/TALOSII/contest_files/10-hack.lu-nicreverse_slides.pdf Slides] from initial presentation by Guillaume Delugré at HACK.LU 2010<br />
** [https://infocon.org/cons/Hack%20In%20The%20Box/HITB%202011%20-%20Malaysia/D2T3%20-%20Guillaume%20Delugre%20-%20Reverse%20Engineering%20Broadcom%20NetExtreme%20Firmware.pdf Slides] from second presentation of Guillaume Delugré's talk at HITB Malaysia 2011<br />
** [http://esec-lab.sogeti.com/static/publications/11-recon-nicreverse_slides.pdf Slides] and [https://infocon.org/cons/REcon/REcon%202011/14_Guillaume_Delugre.mp4 Audio] from [https://recon.cx/2011/schedule/events/120.en.html followup presentation] by Guillaume Delugré for Recon 2011 (Video in file is broken)]<br />
* '''[[Project Ortega]]''' &mdash; firmware reverse engineering project<br />
* [https://github.com/meklort/bcm5719-fw/ meklort/bcm5719-fw] - firmware reimplementation (BSD licensed)<br />
<br />
==References==<br />
<br />
[[Category:Mainboard Components]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Compiling_Firmware&diff=3503Compiling Firmware2021-06-19T00:18:19Z<p>Meklort: Fix dead link to mboxd patch, add note that firmware releases after and including v2.00 no longer require this.</p>
<hr />
<div>==Purpose==<br />
The following steps can be used to compile and update the firmware on [[Raptor Computing Systems|Raptor CS]]'s [[OpenPOWER]] systems, such as the [[Talos II]] or [[Blackbird]].<br />
<br />
==Applicability==<br />
These specific instructions are for the [[Talos II]], though the process for compiling firmware for other [[OpenPOWER]] systems like [[Blackbird]] should be very similar.<br />
<br />
==Requirements==<br />
* At least 25GB of free hard drive space<br />
* 16GB of free RAM<br />
<br />
===Building on Debian===<br />
The build system (op-build) has been primarily tested using Debian Stretch. Ensure you install the following packages:<br />
<br />
# Packages needed for OpenPOWER Firmware builds<br />
$ sudo apt install cscope ctags libz-dev libexpat-dev python texinfo build-essential g++ git bison flex unzip libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc wget bc rsync<br />
<br />
# Packages needed for OpenBMC builds<br />
$ sudo apt install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
<br />
===Building on other Linux distributions===<br />
If you are on a different distribution, such as Fedora 28, a Debian chroot is recommended:<br />
$ sudo yum install debootstrap dpkg<br />
$ sudo debootstrap stretch debian-chroot http://httpredir.debian.org/debian<br />
$ sudo mount -t proc none debian-chroot/proc/<br />
$ sudo mount -o bind /sys/ debian-chroot/sys/<br />
$ sudo mount -o bind /dev/shm/ debian-chroot/dev/shm/<br />
<br />
Enter the chroot and install the needed packages:<br />
$ sudo chroot debian-chroot/<br />
# apt install software-properties-common locales<br />
<br />
# Packages needed for OpenPOWER Firmware builds<br />
$ sudo apt install cscope ctags libz-dev libexpat-dev python texinfo build-essential g++ git bison flex unzip libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc wget bc rsync<br />
<br />
# Packages needed for OpenBMC builds<br />
$ sudo apt install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
<br />
Also create a user inside the chroot to build under:<br />
$ useradd -m build-user -s /bin/bash<br />
$ su build-user<br />
$ cd<br />
<br />
You can now use the chroot to build the firmware.<br />
<br />
To enter the chroot in the future, you can run the following from any terminal:<br />
sudo chroot debian-chroot/<br />
su build-user<br />
cd<br />
<br />
==Building the OpenPOWER Firmware==<br />
===Downloading the sources===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public Git repository containing the complete source code for the firmware.<br />
To download the source code for Talos systems:<br />
git clone -b raptor-v2.00 --recursive https://scm.raptorcs.com/scm/git/talos-op-build<br />
<br />
To download the source code for Blackbird systems:<br />
git clone -b raptor-v2.00 --recursive https://scm.raptorcs.com/scm/git/blackbird-op-build<br />
<br />
'''Note:''' The <tt>master</tt> branch is often in a non-functional state. The latest firmware branch (either <tt>raptor-v2.00</tt> or <tt>raptor-v1.05</tt> at the time of this update) should be used.<br />
<br />
===Building the firmware===<br />
Before building the firmware, check the <tt>README.md</tt> file to ensure that all needed packages are installed.<br />
<br />
The firmware can then be built using the following commands:<br />
$ cd talos-op-build<br />
$ git submodule update<br />
$ . op-build-env<br />
$ export KERNEL_BITS=64 # needed when building on ppc64, or libopenssl will try to build in 32 bit mode<br />
$ op-build talos_defconfig<br />
$ op-build<br />
<br />
You can pass <tt>-j&lt;num-cores&gt;</tt> to perform a parallel build (<tt>op-build</tt> invokes <tt>make</tt>), though this may result in very high memory usage.<br />
<br />
If the build completes successfully, the final firmware image is at <tt>output/images/talos.pnor</tt>.<br />
<br />
===Rebuilding an individual package===<br />
To rebuild an individual package (such as Hostboot) and recreate the <tt>talos.pnor</tt> image, run:<br />
$ op-build <em>pkgname</em>-rebuild openpower-pnor-rebuild<br />
where <tt><em>pkgname</em></tt> is the name of the package to rebuild.<br />
<br />
For example:<br />
$ op-build hostboot-rebuild openpower-pnor-rebuild<br />
<br />
Note when recompiling hostboot into a PNOR image with openpower-pnor-rebuild, it is usually recommended to force a machine XML rebuild as well:<br />
<nowiki>$ rm -rf output/build/machine-xml-*<br />
$ rm -rf output/build/hostboot-*<br />
$ ./op-build openpower-pnor-rebuild</nowiki><br />
<br />
==Installing the OpenPOWER firmware==<br />
===Transfer image to BMC===<br />
Copy the firmware to the BMC:<br />
$ scp ./output/images/talos.pnor root@$TALOS_BMC_ADDR:/tmp/<br />
<br />
===Establish BMC sessions===<br />
At this point, you should connect two SSH sessions to OpenBMC.<br />
In the first session, run the following to display the console during boot:<br />
$ ssh -p 2200 root@$TALOS_BMC_ADDR<br />
<br />
The console log will be useful in debugging any issues with the firmware that could occur.<br />
<br />
In the second session, get a shell on the BMC via SSH:<br />
$ ssh root@$TALOS_BMC_ADDR<br />
root@talos:~#<br />
<br />
'''Ensure the system is off''' before proceeding:<br />
root@talos:~# obmcutil state<br />
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready<br />
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off<br />
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off<br />
<br />
The CurrentHostState must be Off before continuing with the procedure.<br />
If the CurrentHostState is not Off, please turn off the machine:<br />
root@talos:~# obmcutil chassisoff<br />
<br />
===Running the firmware temporarily===<br />
You can test the firmware without installing it, though this requires using the v2.00+ BMC firmware which contains [https://gerrit.openbmc-project.xyz/plugins/gitiles/openbmc/hiomapd/+/a042978b03c91ca3a716e99f313ef5cda42820ba an updated <tt>mboxd</tt> with support for file-backed pnor images].<br />
<br />
First, stop <tt>mboxd</tt>:<br />
root@talos:~# systemctl stop mboxd<br />
<br />
Restart <tt>mboxd</tt> with the additional <tt>-b</tt> argument:<br />
root@talos:~# mboxd -f 64M -w 1M -b file:/tmp/talos.pnor<br />
<br />
You can now test the new firmware image by starting the machine:<br />
root@talos:~# obmcutil poweron<br />
<br />
When you have finished testing the image, stop the machine:<br />
root@talos:~# obmcutil poweroff<br />
<br />
'''Note:''' Ensure the machine is off before proceeding. Verify this by running <tt>obmcutil state</tt>.<br />
<br />
Finally, terminate <tt>mboxd</tt> and restart the normal <tt>mboxd</tt>:<br />
root@talos:~# systemctl start mboxd<br />
<br />
===Flashing the firmware===<br />
<span style="color:#FF0000">Warning: Some PNOR firmware updates may require a BMC update to function. Before flashing ensure that your installed BMC firmware is capable of booting the image. It is also possible to downgrade using these instructions in the event of a non-functioning firmware image.</span><br />
<br />
Ensure the system is off.<br />
<br />
Perform the update:<br />
root@talos:~# pflash -E -p /tmp/talos.pnor<br />
<br />
Start the machine:<br />
root@talos:~# obmcutil poweron<br />
<br />
'''Note:''' The machine may reboot multiple times when first booted after a firmware update. This is normal; do not interrupt the process.<br />
<br />
==Troubleshooting the OpenPOWER Firmware==<br />
<br />
===General advice===<br />
<br />
;Always upgrade PNOR and BMC together<br />
:Many mismatched PNOR/BMC version combinations lead to weird failures.<br />
<br />
;Try downgrading the PNOR+BMC firmware<br />
:Firmware package 1.04 seems the most reliable at updating the [[Self-Boot_Engine|SBE SEEPROM]] inside the POWER9 chip package.<br />
<br />
;Always use processor socket 0 for SBE updates<br />
:The BMC firmware and/or FSI driver seem to either forget to update the SBE SEEPROM in the second CPU socket, leading to a boot with only CPU 0 active. When you get a brand new chip you need to install it in CPU socket 0 leaving socket 1 empty, wait for the double-reboot to update the SEEPROM, and then you can move that chip to socket 1 if you like.<br />
<br />
;Try unplugging the HSF fan power during [[Self-Boot_Engine|SBE]] update<br />
:Not kidding about this. The BMC is insanely complicated &mdash; it's got an entire operating system in there for some reason. It even has systemd. The BMC's systemd often gets into a funky loop restarting <tt>hwmon</tt> over and over and over, interrupting the SBE SEEPROM reflash every time it does this. Unplugging the PROC0 HSF 4-pin connector gets it to fail hard (due to inability to read the tachometer) and stay failed so the SBE update can proceed. Ugly as this is, it's easier than trying to figure out what systemd thinks it's doing.<br />
<br />
===SBE_MASTER_VERSION_DOWNLEVEL===<br />
If you see the following message reported in the console, then the [[Self-Boot_Engine|SBE]] update process did not work as expected:<br />
16.74709|Error reported by sbe (0x2200) PLID 0x90000008<br />
16.74823| SBE Image Version Miscompare with Master Target<br />
16.74824| ModuleId 0x0d SBE_MASTER_VERSION_COMPARE<br />
16.74825| ReasonCode 0x2215 SBE_MASTER_VERSION_DOWNLEVEL<br />
16.74826| UserData1 Master Target HUID : 0x0000000000050000<br />
16.74826| UserData2 Master Target Loop Index : 0x0000000000000000<br />
<br />
The machine needs to be reset to finish the update procedure:<br />
root@talos:~# obmcutil chassisoff<br />
root@talos:~# systemctl stop xyz.openbmc_project.State.Host.service<br />
root@talos:~# systemctl start xyz.openbmc_project.State.Host.service<br />
root@talos:~# obmcutil poweron<br />
<br />
The update should now complete as expected.<br />
<br />
A [https://github.com/open-power/sbe/issues/7 bug report] is open to track this issue.<br />
<br />
===internal compiler error: Killed===<br />
Building the Hostboot source code requires a large amount of RAM. If your machine runs out, you may see an error similar to the following:<br />
powerpc64le-buildroot-linux-gnu-g++.br_real: internal compiler error: Killed (program cc1plus)<br />
To continue you have a few options:<br />
* Reduce the number of parallel jobs being run by appending -j<num> to you build command line<br />
op-build -j4<br />
* Increase the swap space (not recommended)<br />
* Install additional RAM<br />
<br />
===Bugs===<br />
Firmware issues should be reported preferably upstream.<br />
If they are specific to [[Raptor Computing Systems|Raptor CS]] products, please report them [https://bugs.raptorengineering.com/ on their bug tracker].<br />
<br />
== Building the OpenBMC firmware ==<br />
=== Downloading the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public Git repository containing the complete source code for the firmware.<br />
To download the source code:<br />
$ git clone -b raptor-v{{CURRENT_BMC_VERSION}} https://git.raptorcs.com/git/talos-openbmc<br />
<br />
=== Building the firmware ===<br />
Ensure that all needed support packages are installed. See the <tt>README.md</tt> for information on needed packages.<br />
<br />
The firmware can then be built using the following commands:<br />
$ cd talos-openbmc<br />
$ export TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rcs/meta-talos/conf<br />
$ . openbmc-env<br />
$ bitbake obmc-phosphor-image<br />
<br />
The resulting firmware image can then be found in the <tt>tmp/deploy/images/talos/</tt> directory.<br />
<br />
'''Note:''' If <tt>mboxd</tt> fails to build, you may need to [https://github.com/openbmc/openbmc/issues/2780 patch <tt>mboxd.bb</tt>].<br /><br />
'''Note:''' If building newer versions of the firmware, TEMPLATECONF has changed to TEMPLATECONF=meta-rcs/meta-talos/conf. This should be set before running <code>. open-env</code>. If not, do a git clean and start over with the new TEMPLATECONF.<br />
<br />
===Installing the firmware===<br />
<span style="color:#FF0000">Warning: If you are attempting to upgrade a Talos system from firmware 1.06 or earlier to the 04-16-2019 beta branch, you must follow the directions at [[Talos_II/Firmware/Public_Beta]]. Failure to do so may result in a non-booting BMC.</span><br />
<br />
Once firmware has been built, the resulting <tt>image-kernel</tt> and <tt>image-rofs</tt> binaries must be copied to <tt>/run/initramfs/</tt> on the BMC:<br />
$ scp tmp/deploy/images/talos/image-rofs tmp/deploy/images/talos/image-kernel root@$TALOS_BMC_ADDR:/run/initramfs/<br />
<br />
Once the images have been transferred, reboot the BMC. The new firmware files will be detected and automatically applied.<br />
root@talos:~# reboot<br />
<br />
The reboot may take some time. Once complete, you will be able to log back in via SSH.<br />
<br />
===Recovering from failed firmware updates===<br />
See [[Debricking the BMC]].<br />
<br />
[[Category:Guides]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2863Enabling Navi 10 On Fedora 312019-12-19T03:54:06Z<p>Meklort: /* Compiling The Kernel */</p>
<hr />
<div>[[Category:Guides]]<br />
=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --update-config fast-reset=0</span><br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --print-config</span><br />
"ibm,skiboot" Partition<br />
--------------------------<br />
<span style="color:red;">fast-reset=0</span><br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
<span style="font-weight: bold;">sudo dnf install @development-tools</span><br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">cd ~</span><br />
[user@bb ~]$ <span style="font-weight: bold;">mkdir git</span><br />
[user@bb ~]$ <span style="font-weight: bold;">cd git</span><br />
[user@bb git]$ <span style="font-weight: bold;">git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch <span style="color:red;">kernel-5.5.0-0.rc1.git2.1.fc32</span></span><br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ <span style="font-weight: bold;">cd fedora/</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">git am *.patch</span><br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c</span><br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">cp /boot/config-*.ppc64le .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">make oldconfig</span><br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
<span style="color:red;">DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y</span><br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">make -j`nproc`</span><br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install</span><br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` install</span><br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1</span><br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv</span><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo cat /boot/grub2/grubenv</span><br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2862Enabling Navi 10 On Fedora 312019-12-19T03:41:54Z<p>Meklort: /* Compiling The Kernel */</p>
<hr />
<div>[[Category:Guides]]<br />
=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --update-config fast-reset=0</span><br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --print-config</span><br />
"ibm,skiboot" Partition<br />
--------------------------<br />
<span style="color:red;">fast-reset=0</span><br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
<span style="font-weight: bold;">sudo dnf install @development-tools</span><br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">cd ~</span><br />
[user@bb ~]$ <span style="font-weight: bold;">mkdir git</span><br />
[user@bb ~]$ <span style="font-weight: bold;">cd git</span><br />
[user@bb git]$ <span style="font-weight: bold;">git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch <span style="color:red;">kernel-5.5.0-0.rc2.git1.1.fc32</span></span><br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ <span style="font-weight: bold;">cd fedora/</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">git am *.patch</span><br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c</span><br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">cp /boot/config-*.ppc64le .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">make oldconfig</span><br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
<span style="color:red;">DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y</span><br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">make -j`nproc`</span><br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install</span><br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` install</span><br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1</span><br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv</span><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo cat /boot/grub2/grubenv</span><br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2861Enabling Navi 10 On Fedora 312019-12-19T03:40:35Z<p>Meklort: /* Compiling The Kernel */</p>
<hr />
<div>[[Category:Guides]]<br />
=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --update-config fast-reset=0</span><br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --print-config</span><br />
"ibm,skiboot" Partition<br />
--------------------------<br />
<span style="color:red;">fast-reset=0</span><br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
<span style="font-weight: bold;">sudo dnf install @development-tools</span><br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">cd ~</span><br />
[user@bb ~]$ <span style="font-weight: bold;">mkdir git</span><br />
[user@bb ~]$ <span style="font-weight: bold;">cd git</span><br />
[user@bb git]$ <span style="font-weight: bold;">git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch <span style="color:red;">kernel-5.5.0-0.rc2.git1.1.fc32</span></span><br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">git am *.patch</span><br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c</span><br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">cp /boot/config-*.ppc64le .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">make oldconfig</span><br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
<span style="color:red;">DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y</span><br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">make -j`nproc`</span><br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install</span><br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` install</span><br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1</span><br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv</span><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo cat /boot/grub2/grubenv</span><br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2849Enabling Navi 10 On Fedora 312019-12-11T04:26:17Z<p>Meklort: </p>
<hr />
<div>[[Category:Guides]]<br />
=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --update-config fast-reset=0</span><br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --print-config</span><br />
"ibm,skiboot" Partition<br />
--------------------------<br />
<span style="color:red;">fast-reset=0</span><br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
<span style="font-weight: bold;">sudo dnf install @development-tools</span><br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">cd ~</span><br />
[user@bb ~]$ <span style="font-weight: bold;">mkdir git</span><br />
[user@bb ~]$ <span style="font-weight: bold;">cd git</span><br />
[user@bb git]$ <span style="font-weight: bold;">git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch <span style="color:red;">kernel-5.5.0-0.rc1.git0.1.fc32</span></span><br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">git am *.patch</span><br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c</span><br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">cp /boot/config-*.ppc64le .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">make oldconfig</span><br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
<span style="color:red;">DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y</span><br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">make -j`nproc`</span><br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install</span><br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` install</span><br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1</span><br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv</span><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo cat /boot/grub2/grubenv</span><br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2848Enabling Navi 10 On Fedora 312019-12-11T04:22:54Z<p>Meklort: /* Disabling fast-reset */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --update-config fast-reset=0</span><br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --print-config</span><br />
"ibm,skiboot" Partition<br />
--------------------------<br />
<span style="color:red;">fast-reset=0</span><br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
<span style="font-weight: bold;">sudo dnf install @development-tools</span><br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">cd ~</span><br />
[user@bb ~]$ <span style="font-weight: bold;">mkdir git</span><br />
[user@bb ~]$ <span style="font-weight: bold;">cd git</span><br />
[user@bb git]$ <span style="font-weight: bold;">git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch <span style="color:red;">kernel-5.5.0-0.rc1.git0.1.fc32</span></span><br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">git am *.patch</span><br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c</span><br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">cp /boot/config-*.ppc64le .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">make oldconfig</span><br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
<span style="color:red;">DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y</span><br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">make -j`nproc`</span><br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install</span><br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` install</span><br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1</span><br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv</span><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo cat /boot/grub2/grubenv</span><br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2847Enabling Navi 10 On Fedora 312019-12-11T04:20:38Z<p>Meklort: </p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --update-config fast-reset=0</span><br />
# <span style="font-weight: bold;">nvram -p ibm,skiboot --print-config</span><br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
<span style="font-weight: bold;">sudo dnf install @development-tools</span><br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">cd ~</span><br />
[user@bb ~]$ <span style="font-weight: bold;">mkdir git</span><br />
[user@bb ~]$ <span style="font-weight: bold;">cd git</span><br />
[user@bb git]$ <span style="font-weight: bold;">git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch <span style="color:red;">kernel-5.5.0-0.rc1.git0.1.fc32</span></span><br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">git am *.patch</span><br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c</span><br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">cp /boot/config-*.ppc64le .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config</span><br />
[user@bb fedora]$ <span style="font-weight: bold;">make oldconfig</span><br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
<span style="color:red;">DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y</span><br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">make -j`nproc`</span><br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install</span><br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ <span style="font-weight: bold;">sudo make INSTALL_MOD_STRIP=1 -j`nproc` install</span><br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1</span><br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv</span><br />
[user@bb ~]$ <span style="font-weight: bold;">sudo cat /boot/grub2/grubenv</span><br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2846Enabling Navi 10 On Fedora 312019-12-11T04:14:50Z<p>Meklort: /* Compiling The Kernel */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch <span style="color:red;">kernel-5.5.0-0.rc1.git0.1.fc32</span><br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
<span style="color:red;">DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y</span><br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2845Enabling Navi 10 On Fedora 312019-12-11T04:14:11Z<p>Meklort: /* Compiling The Kernel */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code. IN this case, we are using the kernel-5.5.0-0.rc1.git0.1.fc32 branch:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch <span style="color:red;">kernel-5.5.0-0.rc1.git0.1.fc32</span><br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2844Enabling Navi 10 On Fedora 312019-12-11T04:13:23Z<p>Meklort: /* Locate the entry id */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (<span style="color:red;">5.5.0-rc1+</span>)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2843Enabling Navi 10 On Fedora 312019-12-11T04:13:06Z<p>Meklort: /* Update the default kernel */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (5.5.0-rc1+)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated. (Replace the text in red as appropriate.)<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2842Enabling Navi 10 On Fedora 312019-12-11T04:12:41Z<p>Meklort: /* Update the default kernel */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (5.5.0-rc1+)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span>/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2841Enabling Navi 10 On Fedora 312019-12-11T04:12:25Z<p>Meklort: /* Locate the entry id */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (5.5.0-rc1+)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1</span>+/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2840Enabling Navi 10 On Fedora 312019-12-11T04:12:10Z<p>Meklort: /* Update the default kernel */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (5.5.0-rc1+)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+<br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1</span>+/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=<span style="color:red;">03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+</span><br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2839Enabling Navi 10 On Fedora 312019-12-11T04:10:43Z<p>Meklort: </p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (5.5.0-rc1+)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+<br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+<br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2838Enabling Navi 10 On Fedora 312019-12-11T04:10:00Z<p>Meklort: </p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Defaulting to the new Kernel =<br />
Before the patched kernel will be automatically booted, the grub configuration file must be changed.<br />
== Locate the entry id ==<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo grep "menuentry 'Fedora (5.5.0-rc1+)" /boot/grub2/grub.cfg | cut -d "=" -f2 | cut -d " " -f1<br />
03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+<br />
</pre><br />
<br />
== Update the default kernel ==<br />
The /boot/grub2/grubenv file must be updated<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ sudo sed -i 's/saved_entry=.*/saved_entry=03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+/g' /boot/grub2/grubenv<br />
[user@bb ~]$ sudo cat /boot/grub2/grubenv<br />
# GRUB Environment Block<br />
saved_entry=03d8a2f6d3e946e896b45faac2a97657-5.5.0-rc1+<br />
kernelopts=root=/dev/mapper/fedora_bb-root ro rd.lvm.lv=fedora_bb/root rd.lvm.lv=fedora_bb/swap rhgb quiet <br />
boot_success=0<br />
boot_indeterminate=0<br />
#####################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################################<br />
<br />
</pre><br />
<br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2837Enabling Navi 10 On Fedora 312019-12-11T04:00:50Z<p>Meklort: /* Compiling The Kernel */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
[user@bb fedora]$ sed -i 's/.num_dsc = 5,//g' drivers/gpu/drm/amd/display/dc/dcn20/dcn20_resource.c<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO=y/# CONFIG_DEBUG_INFO is not set/g' .config<br />
[user@bb fedora]$ sed -i 's/CONFIG_DEBUG_INFO_BTF=y/# CONFIG_DEBUG_INFO_BTF is not set/g' .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ make -j`nproc`<br />
...<br />
</pre><br />
<br />
Installing the kernel<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` modules_install<br />
[sudo] password for user: ****<br />
...<br />
INSTALL sound/usb/snd-usb-audio.ko<br />
INSTALL sound/usb/snd-usbmidi-lib.ko<br />
INSTALL sound/usb/usx2y/snd-usb-usx2y.ko<br />
DEPMOD 5.5.0-rc1+<br />
Warning: modules_install: missing 'System.map' file. Skipping depmod.<br />
[user@bb fedora]$ sudo make INSTALL_MOD_STRIP=1 -j`nproc` install<br />
LDS arch/powerpc/boot/zImage.lds<br />
WRAP arch/powerpc/boot/zImage.pseries<br />
WRAP arch/powerpc/boot/zImage.epapr<br />
sh -x ./arch/powerpc/boot/install.sh "5.5.0-rc1+" vmlinux System.map "/boot"<br />
+ set -e<br />
+ '[' -x /root/bin/installkernel ']'<br />
+ '[' -x /sbin/installkernel ']'<br />
+ exec /sbin/installkernel 5.5.0-rc1+ vmlinux System.map /boot<br />
[user@bb fedora]$ <br />
</pre><br />
<br />
At this point, the new kernel has been installed and can be booted. However, the kernel will not be selected as the default and should only be done once it's confirmed working.<br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2833Enabling Navi 10 On Fedora 312019-12-10T05:25:28Z<p>Meklort: /* Disabling fast-reset */</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
<br />
Exit and boot back in to Fedora.<br />
<br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Enabling_Navi_10_On_Fedora_31&diff=2832Enabling Navi 10 On Fedora 312019-12-10T05:24:37Z<p>Meklort: WIP guide on setting up Navi on Fedora.</p>
<hr />
<div>=Purpose=<br />
This guide explains how to add enable Navi 10 based GPUs such as the AMD RX Radeon 5700 XT on Fedora 31.<br />
<br />
=Background=<br />
Linux kernel versions up to and including 5.5 do not support display output when using Navi based cards. A set of kernel patches have been developed ot enable display support. To enable the display the kernel must be recompiled.<br />
<br />
= Preparations =<br />
== Disabling fast-reset ==<br />
AMD GPUs can only have firmware loaded once between resets. This causes issues when the fast-reset support is enabled. Before continuing with this guide, please disable fast-reset by rebooting to petitboot. <br />
<br />
First, exit to the shell in petitboot.<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Petitboot (v1.10.3-pdd2d545) C1P9S01 REV 1.01 D1000092<br />
──────────────────────────────────────────────────────────────────────────────<br />
[Disk: nvme0n1p1 / fcc4819d-39e1-49f0-81ad-c26d444cb806]<br />
Fedora (0-rescue-03d8a2f6d3e946e896b45faac2a97657) 32 (Rawhide)<br />
Fedora (5.4.0-rc7+) 32 (Workstation Edition)<br />
(*) Fedora (5.4.0-2.fc32.ppc64le) 32 (Rawhide)<br />
[USB: sdb / 2019-10-23-22-57-00-00]<br />
Rescue a Fedora system (64-bit kernel)<br />
Test this media & install Fedora 31 (64-bit kernel)<br />
Install Fedora 31 (64-bit kernel)<br />
<br />
System information<br />
System configuration<br />
System status log<br />
Language<br />
Rescan devices<br />
Retrieve config from URL<br />
Plugins (0)<br />
*Exit to shell <br />
<br />
<br />
──────────────────────────────────────────────────────────────────────────────<br />
Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help<br />
[enP4p1s0f2] PXE autoconfiguration failed<br />
</pre><br />
<br />
Next, update the nvram configuration using <code>nvram -p ibm,skiboot --update-config fast-reset=0</code><br />
<br />
To confirm that the variable was updated, use <code>nvram -p ibm,skiboot --print-config</code><br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
Exiting petitboot. Type 'exit' to return.<br />
You may run 'pb-sos' to gather diagnostic data<br />
No password set, running as root. You may set a password in the System Configuration screen.<br />
# nvram -p ibm,skiboot --update-config fast-reset=0<br />
# nvram -p ibm,skiboot --print-config<br />
"ibm,skiboot" Partition<br />
--------------------------<br />
fast-reset=0<br />
<br />
# <br />
</pre><br />
== Installing the Development Tools ==<br />
Before building a custom kernel, the development tools must be installed<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
sudo dnf install @development-tools<br />
</pre><br />
<br />
= Compiling The Kernel =<br />
An update kernel with the kernel patches applied must be created. This can be done following the below guide based on https://fedoraproject.org/wiki/Building_a_custom_kernel#Building_a_kernel_from_the_exploded_git_trees<br />
<br />
First, checkout the kernel source code:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb ~]$ cd ~<br />
[user@bb ~]$ mkdir git<br />
[user@bb ~]$ cd git<br />
[user@bb git]$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/fedora.git --depth 1 --branch kernel-5.5.0-0.rc1.git0.1.fc32<br />
Cloning into 'fedora'...<br />
remote: Enumerating objects: 70582, done.<br />
remote: Counting objects: 100% (70582/70582), done.<br />
remote: Compressing objects: 100% (67451/67451), done.<br />
Receiving objects: 100% (69754/69754), 184.63 MiB | 733.00 KiB/s, done.<br />
Resolving deltas: 100% (5304/5304), done.<br />
Note: switching to '46d9a88e328bb8135db0a6b58b21cfd3b71ba75e'.<br />
<br />
You are in 'detached HEAD' state. You can look around, make experimental<br />
changes and commit them, and you can discard any commits you make in this<br />
state without impacting any branches by switching back to a branch.<br />
<br />
If you want to create a new branch to retain commits you create, you may<br />
do so (now or later) by using -c with the switch command. Example:<br />
<br />
git switch -c <new-branch-name><br />
<br />
Or undo this operation with:<br />
<br />
git switch -<br />
<br />
Turn off this advice by setting config variable advice.detachedHead to false<br />
<br />
Updating files: 100% (65721/65721), done.<br />
[user@bb git]$ <br />
</pre><br />
<br />
Download and apply the kernel patches:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb git]$ cd fedora/<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/f8c299fc4fd373a8cbc380f348204b61/0001-amdgpu-Prepare-DCN-floating-point-macros-for-generic.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/7d194992837c8706ca5966b682d5680b/0002-amdgpu-Enable-initial-DCN-support-on-POWER.patch<br />
[user@bb fedora]$ wget https://gitlab.freedesktop.org/drm/amd/uploads/86353afdb43409add84005cef8c5abc0/0003-amdgpu-Wrap-FPU-dependent-functions-in-dc20.patch<br />
[user@bb fedora]$ git am *.patch<br />
Applying: amdgpu: Prepare DCN floating point macros for generic arch support<br />
Applying: amdgpu: Enable initial DCN support on POWER<br />
Applying: amdgpu: Wrap FPU dependent functions in dc20<br />
</pre><br />
<br />
Configure the kernel, selecting the defaults and DCN_2_0 if prompted:<br />
<pre<includeonly></includeonly> class="plainlinks" style="background:black; color:RGB(187,187,187); border:2px #ddd inset; padding:4px; overflow:auto; margin:1px; max-height:{{{height|30em}}}; _height:{{{height|30em}}};font-size:10pt;{{{textstyle|}}}"><br />
[user@bb fedora]$ cp /boot/config-*.ppc64le .config<br />
[user@bb fedora]$ make oldconfig<br />
HOSTCC scripts/basic/fixdep<br />
HOSTCC scripts/kconfig/conf.o<br />
HOSTCC scripts/kconfig/confdata.o<br />
HOSTCC scripts/kconfig/expr.o<br />
LEX scripts/kconfig/lexer.lex.c<br />
YACC scripts/kconfig/parser.tab.[ch]<br />
HOSTCC scripts/kconfig/lexer.lex.o<br />
HOSTCC scripts/kconfig/parser.tab.o<br />
HOSTCC scripts/kconfig/preprocess.o<br />
HOSTCC scripts/kconfig/symbol.o<br />
HOSTCC scripts/kconfig/util.o<br />
HOSTLD scripts/kconfig/conf<br />
scripts/kconfig/conf --oldconfig Kconfig<br />
*<br />
* Restart config...<br />
*<br />
*<br />
* Kernel options<br />
*<br />
Timer frequency<br />
> 1. 100 HZ (HZ_100)<br />
2. 250 HZ (HZ_250)<br />
3. 300 HZ (HZ_300)<br />
4. 1000 HZ (HZ_1000)<br />
choice[1-4?]: 1<br />
...<br />
*<br />
* Display Engine Configuration<br />
*<br />
AMD DC - Enable new display engine (DRM_AMD_DC) [Y/n/?] y<br />
DCN 2.0 family (DRM_AMD_DC_DCN2_0) [Y/n/?] y<br />
DCN 2.1 family (DRM_AMD_DC_DCN2_1) [N/y/?] n<br />
DSC support (DRM_AMD_DC_DSC_SUPPORT) [N/y/?] n<br />
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) <br />
...<br />
</pre><br />
<br />
Build the kernel<br />
<br />
= Configuring The Display =<br />
Before continuing, X11 must be configured to use the Navi card instead of the built-in AST device. This must be done by following steps one and two of [[Troubleshooting/GPU#Workaround_2:_Select_desired_GPU_at_runtime]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=POWER9_Hardware_Compatibility_List/PCIe_Devices&diff=2826POWER9 Hardware Compatibility List/PCIe Devices2019-12-08T21:45:37Z<p>Meklort: /* AMD */</p>
<hr />
<div><br />
==Compatibility rules==<br />
In general, any PCIe device will work providing that an open source driver is available for your operating system. There are some exceptions:<br />
<br />
* '''Hardware bugs.''' POWER does not permit errant DMA accesses. If a device tries to access areas of host memory which it is not permitted to access, the device is shut down immediately. This is dissimilar to x86 platforms, which simply silently ignore such attempts. Some badly designed I/O devices have bugs causing them to attempt DMA accesses to random areas of host memory; these devices are unlikely to function correctly on POWER systems unless a workaround is available. Note that devices in full bypass mode may legally have access to all host memory, to avoid this and test driver IOMMU setup pass "iommu=nobypass" to the kernel at startup.<br />
* '''I/O space.''' Starting with [[POWER9]], access to the legacy PCI I/O space is no longer supported; devices or drivers which rely on this will not function. The legacy I/O space has been deprecated for as long as PCIe has existed; generally this will only affect very old PCIe devices which use PCIe to PCI bridge chips to attach old PCI devices to the bus. A small subset of these devices may require legacy I/O space support.<br />
* '''Incomplete memory addressing support.''' The PCIe architecture specifies a 64-bit address space. Some I/O devices try to economize on this by only implementing e.g. 40 bits for their addressing, rendering them incapable of addressing host memory which lies above address 2<sup>40</sup>. (Firmware patches to work around this are pending.)<br />
* '''Bifurcation limits.''' Arbitrary PCIe lane bifurcation is not supported. Devices which split a PCIe slot into multiple connectors (for example, PCIe to M.2 adaptors) will not work unless they have a PCIe switch chip, although the first connector will generally work.<br />
<br />
==Troubleshooting==<br />
<br />
If a PCIe device is in a broken state due to being attached/detached from a VM, or due to a transition from Petitboot to the main OS, you may be able to fix it by issuing a hot reset. A script for performing a PCIe hot reset is at [[File:Pcie_hot_reset.sh]]. For background on PCIe resets and how a hot reset differs from the function-level reset performed by <code>echo 1 > /sys/bus/pci/devices/$dev/reset</code>, see [https://unix.stackexchange.com/a/474378 Alex Forencich's explanation on Stack Exchange].<br />
<br />
==NICs==<br />
===Working===<br />
* Broadcom [[BCM5719]]<br />
* Chelsio T6225-SO-CR<br />
* Mellanox ConnectX-6 EN 200Gb/s Adapter Card ''(supports [[CAPI]])''<br />
* Silicom [https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9-server-adapter/ PE310G4SPI9]/[https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9la-quad-port-10-gigabit-nic-intel-based/ PE310G4SPI9LA] quad port 10 GbE SFP+ adapter (ixgbe driver)<br />
<br />
===Non-working===<br />
* Mellanox ConnectX IB QDR (mlx4 driver)<br />
<br />
==Wireless Cards==<br />
* [https://ark.intel.com/content/www/us/en/ark/products/75439/intel-dual-band-wireless-ac-7260.html Intel Dual-Band Wireless-AC 7260] (Bluetooth untested)<br />
* Alfa AWUS036NHA Wireless USB Adaptor<br />
** open source firmware (ath9k_htc) [https://github.com/qca/open-ath9k-htc-firmware]<br />
* TP-Link TL WN823N RTL8192EU [https://github.com/Mange/rtl8192eu-linux-driver]<br />
** remove "ARCH=$(ARCH)" on line 1710 of the makefile and it compiles fine<br />
<br />
==NVMe Drives==<br />
* Samsung 950 PRO (with M.2 to PCIe adapter)<br />
* Samsung 960 EVO / PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 EVO Plus (with M.2 to PCIe adapter)<br />
* Intel Optane 900P NVMe XPoint PCIe<br />
* Intel Optane 905P NVMe XPoint PCIe AIC<br />
* WD Black PCIe (with M.2 to PCIe adapter)<br />
* MyDigitalSSD BPX 480GB (with M.2 to PCIe adapter)<br />
<br />
==PCIe to M.2 Adapters==<br />
===Working===<br />
* [http://ableconn.com/products_2.php?gid=62 Ableconn PEXM2-SSD M.2 NGFF PCIe SSD to PCI Express 3.0 x4 Host Adapter Card (M.2 to PCIe adapter)]<br />
* [https://www.addonics.com/products/ad2m2nvmpx8.php Addonics AD2M2NVMPX8] Dual NVMe PCIe adapter 2x M.2 PCIe to PCIe x8<br />
* [http://www.delock.com/produkte/G_89370/merkmale.html Delock PCI Express x4 Card > 1 x internal NVMe M.2 Key M 80 mm - Low Profile Form Factor; Item No. 89370]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=9SIA4RE5AU2769 JEYI SK4 M.2 NVMe(M Key) SSD to PCI-E 3.0 x4 Adapter Converter Card]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=N82E16815124167 SYBA SI-PEX40110 M.2 PCI-e To PCI-e 3.0 x4]<br />
* [http://highpoint-tech.com/USA_new/series-ssd7101a-1-overview.htm HighPoint SSD7101A-1] 4x M.2 PCIe to PCIe 3.0 x16 (based on PLX PEX8747 PCIe switch)<br />
** Works without special drivers as a PCIe switch. NVMEs are detected and work just fine. Petitboot is able to boot attached NVMEs with no problems. Tested in FreeBSD. -- [[User:Bdragon|Bdragon]] ([[User talk:Bdragon|talk]])<br />
* [http://highpoint-tech.com/USA_new/series-ssd7102-overview.htm HighPoint SSD 7102] 4x M.2 PCIe to PCIe 3.0 x16 (with PCIe switch)<br />
* [https://www.supermicro.com/en/products/accessories/addon/AOC-SHG3-4M2P.php Supermicro AOC-SHG3-4M2P] 4x M.2 PCIe to PCIe 3.0 x8 (using a PEX 8734 PCIe 3.0 (8.0GT/s) Switch). Draws 10 watts in idle. Requires one additional 4-pin 12V connector.<br />
<br />
===Partially working===<br />
* [https://www.amazon.com/gp/product/B074WV4ZN4 Aplicata Quad M.2 NVMe SSD PCIe x16 Adapter] (no PCIe switch; only lowest slot works)<br />
<br />
==SAS/SATA Storage Controllers ==<br />
===Working===<br />
* IOCrest SI-PEX40062 (Chipset: Marvell 88SE9235, PCI id 1B4B:9235)<br />
** Marvell 88SE9230 chipset also confirmed to work<br />
* Kouwell PE-115H (Chipset: Marvell 88SE9130, PCI id 1b4b:9130)<br />
* LSI 9300/9200 SAS HBAs<br />
** May require updating to IT firmware on a x86 machine<br />
* [[PM8068]]-based SAS HBAs <br />
* Supermicro AOC-SLG3-4E2P 4-port OCuLink adapter<br />
* Jmicron JMB 363 SATA PCIe card. SATA ports work with Petitboot.<br />
* MegaRAID 9460-8i<br />
<br />
===Non-working===<br />
* AXAGON PCES-SA2 (ASMedia chipset)<br />
* SuperMicro AOC-SASLP-MV8 (mvsas driver)<br />
* MegaRAID 9341-8i - probably a bug in the firmware<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 642L] (Chipset: Marvell 88SE9235)<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 644L] (Chipset: Marvell 88SE9235)<br />
<br />
== Graphics Cards ==<br />
<br />
No display? Check out the [[Troubleshooting/GPU|GPU Troubleshooting]] page.<br />
<br />
=== AMD ===<br />
<br />
All AMD GPUs currently have DMA issues (limited to 32-bit, which can cause crashes) due to missing Linux kernel support for DMA windows between 33 and 63 bits in length. The root cause is GPU vendors (and occasionally some non-GPU vendors) cutting costs and only including 40-bit capable (Intel-style) DMA controllers. A compatibility mode is expected to be included in Linux 5.4 and above that will resolve this issue.<br />
<br />
* AMD Radeon HD 5850 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 6450 - Works with default settings (kernel: radeon, X: modesetting or radeon), tested in BE mode<br />
* AMD Radeon HD 6850 - Disable AST VGA with jumper. 32 bit.<br />
* AMD Radeon HD 7850 - Disabled onboard VGA. Using amdgpu is highly unstable, radeon driver is usable but has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 7950 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon R5 220<br />
* AMD Radeon R5 230 - Works in BE mode (use <code>Option "AccelMethod" "EXA"</code> for Xorg)<br />
* AMD Radeon R7 240<br />
* AMD Radeon R9 290X<br />
* AMD Radeon RX 560X<br />
* AMD Radeon RX 480<br />
* AMD Radeon RX 580 – Works with the amdgpu firmware from Ubuntu 19.04 and disabled onboard VGA<br />
** You may also need a kernel parameter like <code>vga=797</code> if xinit complains about VESA[http://en.wikipedia.org/wiki/VESA_BIOS_Extensions]<br />
* AMD Radeon RX Vega 56 - Works with Debian Buster with amdgpu. Requires patches to work, somewhat unstable but usable. Cannot use AST Integrated VGA and AMDGPU at the same time without causing conflict. Not tested at this moment for use in petitboot or firmware. <br />
* AMD Radeon Pro WX4100 (Polaris11 core) - May need at least linux 4.16 in order to get Xorg to work.<br />
* AMD Radeon Pro WX5100<br />
* AMD Radeon Pro WX7100 (Polaris10 core) - Available pre-installed on Talos II workstation, server, and desktop configurations.<br />
* AMD Radeon RX 5700 (Navi 10) - Requires [https://lists.freedesktop.org/archives/amd-gfx/2019-December/043682.html kernel patches] to enable display output. <br />
* AMD Radeon RX 5700 XT (Navi 10) - Requires [https://lists.freedesktop.org/archives/amd-gfx/2019-December/043682.html kernel patches] to enable display output.<br />
<br />
The core name is important when storing the firmware into the BOOTKERNFW partition in PNOR for use by skiroot.<br />
<br />
=== NVIDIA ===<br />
* NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1) - Works in petitboot if onboard VGA is disabled. Currently has issues with only using 32-bit DMA. No firmware needed.<br />
* NVIDIA RTX 2070 - usable for compute, but not 3D acceleration; integrated by Raptor as part of the Talos II PowerAI Development System configuration<br />
<br />
=== Other ===<br />
* [[AST2500|ASPEED AST2500]]. Works in both the main OS (LE mode) and Petitboot. BE mode partially works (doesn't crash, but colors are wrong unless you apply a patch that is harmful to performance).<br />
* [https://www.climaxdigital.co.uk/CUH195-USB-2-to-DVI-VGA-or-HDMI-Adaptor-1080p-full-hd ClimaxDigital CUH195 USB 2.0 Graphic Adapter] - Based on DisplayLink DL-3500 chipset. Works in the main OS; not tested with Petitboot but is likely to work there too.<br />
* EVGA 100-U2-UV12-A1 UV Plus USB VGA Adapter - DisplayLink Based - Petitboot shows up without loading firmware. Not tested in OS.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=455 ASPEED AST2510]. It's the GPU component of the [[AST2500]] without the BMC component. Might be useful for users who want to add additional VGA displays beyond the single VGA display supported by the built-in AST2500, with similar freedom and performance properties as the AST2500. Known suppliers of AST2510 devices are:<br />
** [https://www.win-ent.com/1U-Rackmount-Platforms/pl-81280 WIN Enterprises IP-492B]<br />
** [https://web.archive.org/web/20190505060931/http://www.aewin.com.tw/uploads/files/acbd8aee4c81584332ee56cf11ec230e.pdf AEWIN Technologies R492B (Warning: non-TLS link)]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=377 ASPEED AST1400]. Older revision of the AST2510 (AST1400 is 5th generation; AST2510 is 6th generation). Known suppliers of AST1400 devices are:<br />
** [https://dls.ieiworld.com/IEIWeb/Reserved/0F233000410888189307/IGCME-1300%20QIG%20V1.10_20150819.pdf IEI Integration Corp IGCME-1300-R11]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=244 ASPEED AST1300]. Older revision of the AST2510 (AST1300 is 4th generation; AST2510 is 6th generation). Known suppliers of AST1300 devices are:<br />
** [http://archivecaslytosk.onion/QZROL IEI Integration Corp IGCME-1300-R10]<br />
<br />
== Sound Cards ==<br />
<br />
===Working===<br />
* Creative Sound Blaster Audigy FX SB1570 PCIe 5.1 Sound Card<br />
* Creative Sound Blaster X-Fi Xtreme Fidelity PCIe Audio Sound Card (SB0880)<br />
* AMD Radeon HD 5850 and 7950 (HDMI audio)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=156&p_name=+USB+Stereo+Audio+Adapter&pc_id=9&pc_name=Adapters&pt_id=3&pt_name=Audio+%2B++Video#tab-1 VANTEC NBA-120U (USB)]<br />
* Sabrent USB External Stereo Sound Adapter (AU-MMSA)<br />
* [http://mackie.com/products/onyx-blackjack Mackie Onyx Blackjack (USB) Recording Interface]<br />
* RME HDSPe AIO (FreeBSD tested)<br />
* Leveraged Sabrent Bluetooth 4.0 USB adapter (model BT-UB40) to connect to wireless Bluetooth headphones, specifically Bose Quiet Comfort 35.<br />
<br />
===Non-working===<br />
* ASUS Xonar SE - Contains ASMedia USB host controller with errant DMA access flaw<br />
* Creative Sound Blaster Audigy PCIe RX 7.1 - unable to enable emu10k1 driver on little-endian power9 kernel as driver requires ZONE_DMA<br />
<br />
==USB Host Controllers==<br />
===Working===<br />
* Insignia USB 3.0 PCI-e NS-PCCUP53 V1.0 (Chipset: NEC D720202)<br />
* AGAXO PCEU-23R (Chipset: Renesas uPD720202, PCI id 1912:0015)<br />
* Terminus Technology Inc. FE 2.1 7-port Hub<br />
* [https://www.sonnettech.com/product/legacyproducts/allegroprousb3pcie.html Sonnet Allegro Pro USB 3.0 PCIe USB3-PRO-4PM-E] (Chipset: Four [http://www.frescologic.com/product/single/fl1100ex/ Fresco Logic FL1100EX] controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8608 PLX PEX 8608] switch)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=125&p_name=+4-Port+SuperSpeed+USB+3.0+PCIe+Host+Card+w%2F+Internal+20-Pin+Connector&pc_id=16&pc_name=USB&pt_id=4&pt_name=Add-on+Cards Vantec UGT-PC345 4 Port USB 3.0 PCIe w/ Internal 20 pin] (Chipset: Renesas uDP720201)<br />
* [https://www.amazon.com/gp/product/B07H4HJNJC] (monster card with 8 ports of USB 3.0) four Renesas uPD720202 chips behind ASMedia 1806, card can be found under different brands but can be identified by the look. [http://sedna-shop.com/index.php?route=product/product&path=59_74&product_id=138 This should be the same card]<br />
<br />
===Non-working===<br />
In general, USB3 host controllers based on ASMedia chipsets are known to be problematic, due to ASMedia hardware or firmware bugs causing errant DMA accesses to invalid regions of host memory.<br />
<br />
* AXAGON PCEU-43V - chipset Via VL805 - PCI id 1106:3483<br />
* StarTech PEXUSB314A2V - 2x ASM1142 host controllers and a PCIe switch<br />
* QNINE USB 3.1 Gen2 (Type-A and Type-C) - ASM1142<br />
** It's based on the the same reference design as all the other cheap ASM1142 cards, so there's a good chance those won't work either.<br />
* Rosewill RC-509 - ASM1142<br />
* Ableconn PU31-2C-2 - ASM2142<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=54 SEDNA - PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC)<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=99 SEDNA - PCIe 4 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
* [https://www.startech.com/Cards-Adapters/USB-3.0/Cards/7-port-pci-express-usb-3-card~PEXUSB3S7 StarTech PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
<br />
==TV Tuners==<br />
* Hauppauge WinTV-quadHD<br />
* Hauppauge WinTV HVR-850 (2040:7240) - ATSC - using Kaffeine<br />
<br />
==Firewire Host Controllers==<br />
===Working===<br />
<br />
* [https://www.sybausa.com/index.php?route=product/product&product_id=119 Syba SY-PEX30016] (Chipset: TI XIO2213B)<br />
** Requires [https://marc.info/?l=linux1394-devel&m=157207806405627&q=mbox this patch] to work on kernels with a 64k page size.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
<br />
* [http://www.dawicontrol.com/index.php?cmd=proddet&id=media Dawicontrol DC-FW800] (Chipset: TI XIO2213B)<br />
* [https://www.delock.de/produkte/G_89210/merkmale.html?setLanguage=en DeLOCK 3x FireWire 800, Item No. 89210] (Chipset: TI XIO2213B)<br />
* [https://www.digitus.info/en/products/computer-components/computer-peripherals/serial-parallel-adapter/ds-30203-2/ DIGITUS Firewire 800 (1394b) PCIe Card] (Chipset: TI XIO2213B)<br />
* [https://www.exsys.de/index.php?page=product&info=127 Exsys EX-16415] (Chipset: TI XIO2213)<br />
* [https://www.exsys.de/index.php?page=product&info=366 Exsys EX-16512E] (Chipset: TI)<br />
* [http://www.ioi.com.tw/products/proddetail.aspx?CatID=106&DeviceID=3021&HostID=2009&ProdID=1060100 IOI Technology FWB-PCIE1X11A] (Chipset: TI XIO2213B)<br />
[[Category:Compatibility List]]<br />
<br />
==Video Capture Cards==<br />
* [https://www.avermedia.com/professional/product/ce310b/overview AVerMedia CE310B] (Chipset: Conexant CX23888)<br />
** Requires [https://patchwork.linuxtv.org/patch/60199/ this patch] to enable it.</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=POWER9_Hardware_Compatibility_List/PCIe_Devices&diff=2825POWER9 Hardware Compatibility List/PCIe Devices2019-12-08T21:45:19Z<p>Meklort: /* AMD */ Move Navi 10 cards from non-working to working w/ patches.</p>
<hr />
<div><br />
==Compatibility rules==<br />
In general, any PCIe device will work providing that an open source driver is available for your operating system. There are some exceptions:<br />
<br />
* '''Hardware bugs.''' POWER does not permit errant DMA accesses. If a device tries to access areas of host memory which it is not permitted to access, the device is shut down immediately. This is dissimilar to x86 platforms, which simply silently ignore such attempts. Some badly designed I/O devices have bugs causing them to attempt DMA accesses to random areas of host memory; these devices are unlikely to function correctly on POWER systems unless a workaround is available. Note that devices in full bypass mode may legally have access to all host memory, to avoid this and test driver IOMMU setup pass "iommu=nobypass" to the kernel at startup.<br />
* '''I/O space.''' Starting with [[POWER9]], access to the legacy PCI I/O space is no longer supported; devices or drivers which rely on this will not function. The legacy I/O space has been deprecated for as long as PCIe has existed; generally this will only affect very old PCIe devices which use PCIe to PCI bridge chips to attach old PCI devices to the bus. A small subset of these devices may require legacy I/O space support.<br />
* '''Incomplete memory addressing support.''' The PCIe architecture specifies a 64-bit address space. Some I/O devices try to economize on this by only implementing e.g. 40 bits for their addressing, rendering them incapable of addressing host memory which lies above address 2<sup>40</sup>. (Firmware patches to work around this are pending.)<br />
* '''Bifurcation limits.''' Arbitrary PCIe lane bifurcation is not supported. Devices which split a PCIe slot into multiple connectors (for example, PCIe to M.2 adaptors) will not work unless they have a PCIe switch chip, although the first connector will generally work.<br />
<br />
==Troubleshooting==<br />
<br />
If a PCIe device is in a broken state due to being attached/detached from a VM, or due to a transition from Petitboot to the main OS, you may be able to fix it by issuing a hot reset. A script for performing a PCIe hot reset is at [[File:Pcie_hot_reset.sh]]. For background on PCIe resets and how a hot reset differs from the function-level reset performed by <code>echo 1 > /sys/bus/pci/devices/$dev/reset</code>, see [https://unix.stackexchange.com/a/474378 Alex Forencich's explanation on Stack Exchange].<br />
<br />
==NICs==<br />
===Working===<br />
* Broadcom [[BCM5719]]<br />
* Chelsio T6225-SO-CR<br />
* Mellanox ConnectX-6 EN 200Gb/s Adapter Card ''(supports [[CAPI]])''<br />
* Silicom [https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9-server-adapter/ PE310G4SPI9]/[https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9la-quad-port-10-gigabit-nic-intel-based/ PE310G4SPI9LA] quad port 10 GbE SFP+ adapter (ixgbe driver)<br />
<br />
===Non-working===<br />
* Mellanox ConnectX IB QDR (mlx4 driver)<br />
<br />
==Wireless Cards==<br />
* [https://ark.intel.com/content/www/us/en/ark/products/75439/intel-dual-band-wireless-ac-7260.html Intel Dual-Band Wireless-AC 7260] (Bluetooth untested)<br />
* Alfa AWUS036NHA Wireless USB Adaptor<br />
** open source firmware (ath9k_htc) [https://github.com/qca/open-ath9k-htc-firmware]<br />
* TP-Link TL WN823N RTL8192EU [https://github.com/Mange/rtl8192eu-linux-driver]<br />
** remove "ARCH=$(ARCH)" on line 1710 of the makefile and it compiles fine<br />
<br />
==NVMe Drives==<br />
* Samsung 950 PRO (with M.2 to PCIe adapter)<br />
* Samsung 960 EVO / PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 EVO Plus (with M.2 to PCIe adapter)<br />
* Intel Optane 900P NVMe XPoint PCIe<br />
* Intel Optane 905P NVMe XPoint PCIe AIC<br />
* WD Black PCIe (with M.2 to PCIe adapter)<br />
* MyDigitalSSD BPX 480GB (with M.2 to PCIe adapter)<br />
<br />
==PCIe to M.2 Adapters==<br />
===Working===<br />
* [http://ableconn.com/products_2.php?gid=62 Ableconn PEXM2-SSD M.2 NGFF PCIe SSD to PCI Express 3.0 x4 Host Adapter Card (M.2 to PCIe adapter)]<br />
* [https://www.addonics.com/products/ad2m2nvmpx8.php Addonics AD2M2NVMPX8] Dual NVMe PCIe adapter 2x M.2 PCIe to PCIe x8<br />
* [http://www.delock.com/produkte/G_89370/merkmale.html Delock PCI Express x4 Card > 1 x internal NVMe M.2 Key M 80 mm - Low Profile Form Factor; Item No. 89370]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=9SIA4RE5AU2769 JEYI SK4 M.2 NVMe(M Key) SSD to PCI-E 3.0 x4 Adapter Converter Card]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=N82E16815124167 SYBA SI-PEX40110 M.2 PCI-e To PCI-e 3.0 x4]<br />
* [http://highpoint-tech.com/USA_new/series-ssd7101a-1-overview.htm HighPoint SSD7101A-1] 4x M.2 PCIe to PCIe 3.0 x16 (based on PLX PEX8747 PCIe switch)<br />
** Works without special drivers as a PCIe switch. NVMEs are detected and work just fine. Petitboot is able to boot attached NVMEs with no problems. Tested in FreeBSD. -- [[User:Bdragon|Bdragon]] ([[User talk:Bdragon|talk]])<br />
* [http://highpoint-tech.com/USA_new/series-ssd7102-overview.htm HighPoint SSD 7102] 4x M.2 PCIe to PCIe 3.0 x16 (with PCIe switch)<br />
* [https://www.supermicro.com/en/products/accessories/addon/AOC-SHG3-4M2P.php Supermicro AOC-SHG3-4M2P] 4x M.2 PCIe to PCIe 3.0 x8 (using a PEX 8734 PCIe 3.0 (8.0GT/s) Switch). Draws 10 watts in idle. Requires one additional 4-pin 12V connector.<br />
<br />
===Partially working===<br />
* [https://www.amazon.com/gp/product/B074WV4ZN4 Aplicata Quad M.2 NVMe SSD PCIe x16 Adapter] (no PCIe switch; only lowest slot works)<br />
<br />
==SAS/SATA Storage Controllers ==<br />
===Working===<br />
* IOCrest SI-PEX40062 (Chipset: Marvell 88SE9235, PCI id 1B4B:9235)<br />
** Marvell 88SE9230 chipset also confirmed to work<br />
* Kouwell PE-115H (Chipset: Marvell 88SE9130, PCI id 1b4b:9130)<br />
* LSI 9300/9200 SAS HBAs<br />
** May require updating to IT firmware on a x86 machine<br />
* [[PM8068]]-based SAS HBAs <br />
* Supermicro AOC-SLG3-4E2P 4-port OCuLink adapter<br />
* Jmicron JMB 363 SATA PCIe card. SATA ports work with Petitboot.<br />
* MegaRAID 9460-8i<br />
<br />
===Non-working===<br />
* AXAGON PCES-SA2 (ASMedia chipset)<br />
* SuperMicro AOC-SASLP-MV8 (mvsas driver)<br />
* MegaRAID 9341-8i - probably a bug in the firmware<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 642L] (Chipset: Marvell 88SE9235)<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 644L] (Chipset: Marvell 88SE9235)<br />
<br />
== Graphics Cards ==<br />
<br />
No display? Check out the [[Troubleshooting/GPU|GPU Troubleshooting]] page.<br />
<br />
=== AMD ===<br />
<br />
All AMD GPUs currently have DMA issues (limited to 32-bit, which can cause crashes) due to missing Linux kernel support for DMA windows between 33 and 63 bits in length. The root cause is GPU vendors (and occasionally some non-GPU vendors) cutting costs and only including 40-bit capable (Intel-style) DMA controllers. A compatibility mode is expected to be included in Linux 5.4 and above that will resolve this issue.<br />
<br />
* AMD Radeon HD 5850 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 6450 - Works with default settings (kernel: radeon, X: modesetting or radeon), tested in BE mode<br />
* AMD Radeon HD 6850 - Disable AST VGA with jumper. 32 bit.<br />
* AMD Radeon HD 7850 - Disabled onboard VGA. Using amdgpu is highly unstable, radeon driver is usable but has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 7950 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon R5 220<br />
* AMD Radeon R5 230 - Works in BE mode (use <code>Option "AccelMethod" "EXA"</code> for Xorg)<br />
* AMD Radeon R7 240<br />
* AMD Radeon R9 290X<br />
* AMD Radeon RX 560X<br />
* AMD Radeon RX 480<br />
* AMD Radeon RX 580 – Works with the amdgpu firmware from Ubuntu 19.04 and disabled onboard VGA<br />
** You may also need a kernel parameter like <code>vga=797</code> if xinit complains about VESA[http://en.wikipedia.org/wiki/VESA_BIOS_Extensions]<br />
* AMD Radeon RX Vega 56 - Works with Debian Buster with amdgpu. Requires patches to work, somewhat unstable but usable. Cannot use AST Integrated VGA and AMDGPU at the same time without causing conflict. Not tested at this moment for use in petitboot or firmware. <br />
* AMD Radeon Pro WX4100 (Polaris11 core) - May need at least linux 4.16 in order to get Xorg to work.<br />
* AMD Radeon Pro WX5100<br />
* AMD Radeon Pro WX7100 (Polaris10 core) - Available pre-installed on Talos II workstation, server, and desktop configurations.<br />
* AMD Radeon RX 5700 - (Navi 10) - Requires [https://lists.freedesktop.org/archives/amd-gfx/2019-December/043682.html kernel patches] to enable display output. <br />
* AMD Radeon RX 5700 XT - (Navi 10) - Requires [https://lists.freedesktop.org/archives/amd-gfx/2019-December/043682.html kernel patches] to enable display output.<br />
<br />
The core name is important when storing the firmware into the BOOTKERNFW partition in PNOR for use by skiroot.<br />
<br />
=== NVIDIA ===<br />
* NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1) - Works in petitboot if onboard VGA is disabled. Currently has issues with only using 32-bit DMA. No firmware needed.<br />
* NVIDIA RTX 2070 - usable for compute, but not 3D acceleration; integrated by Raptor as part of the Talos II PowerAI Development System configuration<br />
<br />
=== Other ===<br />
* [[AST2500|ASPEED AST2500]]. Works in both the main OS (LE mode) and Petitboot. BE mode partially works (doesn't crash, but colors are wrong unless you apply a patch that is harmful to performance).<br />
* [https://www.climaxdigital.co.uk/CUH195-USB-2-to-DVI-VGA-or-HDMI-Adaptor-1080p-full-hd ClimaxDigital CUH195 USB 2.0 Graphic Adapter] - Based on DisplayLink DL-3500 chipset. Works in the main OS; not tested with Petitboot but is likely to work there too.<br />
* EVGA 100-U2-UV12-A1 UV Plus USB VGA Adapter - DisplayLink Based - Petitboot shows up without loading firmware. Not tested in OS.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=455 ASPEED AST2510]. It's the GPU component of the [[AST2500]] without the BMC component. Might be useful for users who want to add additional VGA displays beyond the single VGA display supported by the built-in AST2500, with similar freedom and performance properties as the AST2500. Known suppliers of AST2510 devices are:<br />
** [https://www.win-ent.com/1U-Rackmount-Platforms/pl-81280 WIN Enterprises IP-492B]<br />
** [https://web.archive.org/web/20190505060931/http://www.aewin.com.tw/uploads/files/acbd8aee4c81584332ee56cf11ec230e.pdf AEWIN Technologies R492B (Warning: non-TLS link)]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=377 ASPEED AST1400]. Older revision of the AST2510 (AST1400 is 5th generation; AST2510 is 6th generation). Known suppliers of AST1400 devices are:<br />
** [https://dls.ieiworld.com/IEIWeb/Reserved/0F233000410888189307/IGCME-1300%20QIG%20V1.10_20150819.pdf IEI Integration Corp IGCME-1300-R11]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=244 ASPEED AST1300]. Older revision of the AST2510 (AST1300 is 4th generation; AST2510 is 6th generation). Known suppliers of AST1300 devices are:<br />
** [http://archivecaslytosk.onion/QZROL IEI Integration Corp IGCME-1300-R10]<br />
<br />
== Sound Cards ==<br />
<br />
===Working===<br />
* Creative Sound Blaster Audigy FX SB1570 PCIe 5.1 Sound Card<br />
* Creative Sound Blaster X-Fi Xtreme Fidelity PCIe Audio Sound Card (SB0880)<br />
* AMD Radeon HD 5850 and 7950 (HDMI audio)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=156&p_name=+USB+Stereo+Audio+Adapter&pc_id=9&pc_name=Adapters&pt_id=3&pt_name=Audio+%2B++Video#tab-1 VANTEC NBA-120U (USB)]<br />
* Sabrent USB External Stereo Sound Adapter (AU-MMSA)<br />
* [http://mackie.com/products/onyx-blackjack Mackie Onyx Blackjack (USB) Recording Interface]<br />
* RME HDSPe AIO (FreeBSD tested)<br />
* Leveraged Sabrent Bluetooth 4.0 USB adapter (model BT-UB40) to connect to wireless Bluetooth headphones, specifically Bose Quiet Comfort 35.<br />
<br />
===Non-working===<br />
* ASUS Xonar SE - Contains ASMedia USB host controller with errant DMA access flaw<br />
* Creative Sound Blaster Audigy PCIe RX 7.1 - unable to enable emu10k1 driver on little-endian power9 kernel as driver requires ZONE_DMA<br />
<br />
==USB Host Controllers==<br />
===Working===<br />
* Insignia USB 3.0 PCI-e NS-PCCUP53 V1.0 (Chipset: NEC D720202)<br />
* AGAXO PCEU-23R (Chipset: Renesas uPD720202, PCI id 1912:0015)<br />
* Terminus Technology Inc. FE 2.1 7-port Hub<br />
* [https://www.sonnettech.com/product/legacyproducts/allegroprousb3pcie.html Sonnet Allegro Pro USB 3.0 PCIe USB3-PRO-4PM-E] (Chipset: Four [http://www.frescologic.com/product/single/fl1100ex/ Fresco Logic FL1100EX] controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8608 PLX PEX 8608] switch)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=125&p_name=+4-Port+SuperSpeed+USB+3.0+PCIe+Host+Card+w%2F+Internal+20-Pin+Connector&pc_id=16&pc_name=USB&pt_id=4&pt_name=Add-on+Cards Vantec UGT-PC345 4 Port USB 3.0 PCIe w/ Internal 20 pin] (Chipset: Renesas uDP720201)<br />
* [https://www.amazon.com/gp/product/B07H4HJNJC] (monster card with 8 ports of USB 3.0) four Renesas uPD720202 chips behind ASMedia 1806, card can be found under different brands but can be identified by the look. [http://sedna-shop.com/index.php?route=product/product&path=59_74&product_id=138 This should be the same card]<br />
<br />
===Non-working===<br />
In general, USB3 host controllers based on ASMedia chipsets are known to be problematic, due to ASMedia hardware or firmware bugs causing errant DMA accesses to invalid regions of host memory.<br />
<br />
* AXAGON PCEU-43V - chipset Via VL805 - PCI id 1106:3483<br />
* StarTech PEXUSB314A2V - 2x ASM1142 host controllers and a PCIe switch<br />
* QNINE USB 3.1 Gen2 (Type-A and Type-C) - ASM1142<br />
** It's based on the the same reference design as all the other cheap ASM1142 cards, so there's a good chance those won't work either.<br />
* Rosewill RC-509 - ASM1142<br />
* Ableconn PU31-2C-2 - ASM2142<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=54 SEDNA - PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC)<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=99 SEDNA - PCIe 4 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
* [https://www.startech.com/Cards-Adapters/USB-3.0/Cards/7-port-pci-express-usb-3-card~PEXUSB3S7 StarTech PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
<br />
==TV Tuners==<br />
* Hauppauge WinTV-quadHD<br />
* Hauppauge WinTV HVR-850 (2040:7240) - ATSC - using Kaffeine<br />
<br />
==Firewire Host Controllers==<br />
===Working===<br />
<br />
* [https://www.sybausa.com/index.php?route=product/product&product_id=119 Syba SY-PEX30016] (Chipset: TI XIO2213B)<br />
** Requires [https://marc.info/?l=linux1394-devel&m=157207806405627&q=mbox this patch] to work on kernels with a 64k page size.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
<br />
* [http://www.dawicontrol.com/index.php?cmd=proddet&id=media Dawicontrol DC-FW800] (Chipset: TI XIO2213B)<br />
* [https://www.delock.de/produkte/G_89210/merkmale.html?setLanguage=en DeLOCK 3x FireWire 800, Item No. 89210] (Chipset: TI XIO2213B)<br />
* [https://www.digitus.info/en/products/computer-components/computer-peripherals/serial-parallel-adapter/ds-30203-2/ DIGITUS Firewire 800 (1394b) PCIe Card] (Chipset: TI XIO2213B)<br />
* [https://www.exsys.de/index.php?page=product&info=127 Exsys EX-16415] (Chipset: TI XIO2213)<br />
* [https://www.exsys.de/index.php?page=product&info=366 Exsys EX-16512E] (Chipset: TI)<br />
* [http://www.ioi.com.tw/products/proddetail.aspx?CatID=106&DeviceID=3021&HostID=2009&ProdID=1060100 IOI Technology FWB-PCIE1X11A] (Chipset: TI XIO2213B)<br />
[[Category:Compatibility List]]<br />
<br />
==Video Capture Cards==<br />
* [https://www.avermedia.com/professional/product/ce310b/overview AVerMedia CE310B] (Chipset: Conexant CX23888)<br />
** Requires [https://patchwork.linuxtv.org/patch/60199/ this patch] to enable it.</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=POWER9_Hardware_Compatibility_List/PCIe_Devices&diff=2821POWER9 Hardware Compatibility List/PCIe Devices2019-12-05T13:18:49Z<p>Meklort: /* Non-working */</p>
<hr />
<div><br />
==Compatibility rules==<br />
In general, any PCIe device will work providing that an open source driver is available for your operating system. There are some exceptions:<br />
<br />
* '''Hardware bugs.''' POWER does not permit errant DMA accesses. If a device tries to access areas of host memory which it is not permitted to access, the device is shut down immediately. This is dissimilar to x86 platforms, which simply silently ignore such attempts. Some badly designed I/O devices have bugs causing them to attempt DMA accesses to random areas of host memory; these devices are unlikely to function correctly on POWER systems unless a workaround is available. Note that devices in full bypass mode may legally have access to all host memory, to avoid this and test driver IOMMU setup pass "iommu=nobypass" to the kernel at startup.<br />
* '''I/O space.''' Starting with [[POWER9]], access to the legacy PCI I/O space is no longer supported; devices or drivers which rely on this will not function. The legacy I/O space has been deprecated for as long as PCIe has existed; generally this will only affect very old PCIe devices which use PCIe to PCI bridge chips to attach old PCI devices to the bus. A small subset of these devices may require legacy I/O space support.<br />
* '''Incomplete memory addressing support.''' The PCIe architecture specifies a 64-bit address space. Some I/O devices try to economize on this by only implementing e.g. 40 bits for their addressing, rendering them incapable of addressing host memory which lies above address 2<sup>40</sup>. (Firmware patches to work around this are pending.)<br />
* '''Bifurcation limits.''' Arbitrary PCIe lane bifurcation is not supported. Devices which split a PCIe slot into multiple connectors (for example, PCIe to M.2 adaptors) will not work unless they have a PCIe switch chip, although the first connector will generally work.<br />
<br />
==Troubleshooting==<br />
<br />
If a PCIe device is in a broken state due to being attached/detached from a VM, or due to a transition from Petitboot to the main OS, you may be able to fix it by issuing a hot reset. A script for performing a PCIe hot reset is at [[File:Pcie_hot_reset.sh]]. For background on PCIe resets and how a hot reset differs from the function-level reset performed by <code>echo 1 > /sys/bus/pci/devices/$dev/reset</code>, see [https://unix.stackexchange.com/a/474378 Alex Forencich's explanation on Stack Exchange].<br />
<br />
==NICs==<br />
===Working===<br />
* Broadcom [[BCM5719]]<br />
* Chelsio T6225-SO-CR<br />
* Mellanox ConnectX-6 EN 200Gb/s Adapter Card ''(supports [[CAPI]])''<br />
* Silicom [https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9-server-adapter/ PE310G4SPI9]/[https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9la-quad-port-10-gigabit-nic-intel-based/ PE310G4SPI9LA] quad port 10 GbE SFP+ adapter (ixgbe driver)<br />
<br />
===Non-working===<br />
* Mellanox ConnectX IB QDR (mlx4 driver)<br />
<br />
==Wireless Cards==<br />
* [https://ark.intel.com/content/www/us/en/ark/products/75439/intel-dual-band-wireless-ac-7260.html Intel Dual-Band Wireless-AC 7260] (Bluetooth untested)<br />
* Alfa AWUS036NHA Wireless USB Adaptor<br />
** open source firmware (ath9k_htc) [https://github.com/qca/open-ath9k-htc-firmware]<br />
* TP-Link TL WN823N RTL8192EU [https://github.com/Mange/rtl8192eu-linux-driver]<br />
** remove "ARCH=$(ARCH)" on line 1710 of the makefile and it compiles fine<br />
<br />
==NVMe Drives==<br />
* Samsung 950 PRO (with M.2 to PCIe adapter)<br />
* Samsung 960 EVO / PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 EVO Plus (with M.2 to PCIe adapter)<br />
* Intel Optane 900P NVMe XPoint PCIe<br />
* Intel Optane 905P NVMe XPoint PCIe AIC<br />
* WD Black PCIe (with M.2 to PCIe adapter)<br />
* MyDigitalSSD BPX 480GB (with M.2 to PCIe adapter)<br />
<br />
==PCIe to M.2 Adapters==<br />
===Working===<br />
* [http://ableconn.com/products_2.php?gid=62 Ableconn PEXM2-SSD M.2 NGFF PCIe SSD to PCI Express 3.0 x4 Host Adapter Card (M.2 to PCIe adapter)]<br />
* [https://www.addonics.com/products/ad2m2nvmpx8.php Addonics AD2M2NVMPX8] Dual NVMe PCIe adapter 2x M.2 PCIe to PCIe x8<br />
* [http://www.delock.com/produkte/G_89370/merkmale.html Delock PCI Express x4 Card > 1 x internal NVMe M.2 Key M 80 mm - Low Profile Form Factor; Item No. 89370]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=9SIA4RE5AU2769 JEYI SK4 M.2 NVMe(M Key) SSD to PCI-E 3.0 x4 Adapter Converter Card]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=N82E16815124167 SYBA SI-PEX40110 M.2 PCI-e To PCI-e 3.0 x4]<br />
* [http://highpoint-tech.com/USA_new/series-ssd7101a-1-overview.htm HighPoint SSD7101A-1] 4x M.2 PCIe to PCIe 3.0 x16 (based on PLX PEX8747 PCIe switch)<br />
** Works without special drivers as a PCIe switch. NVMEs are detected and work just fine. Petitboot is able to boot attached NVMEs with no problems. Tested in FreeBSD. -- [[User:Bdragon|Bdragon]] ([[User talk:Bdragon|talk]])<br />
* [http://highpoint-tech.com/USA_new/series-ssd7102-overview.htm HighPoint SSD 7102] 4x M.2 PCIe to PCIe 3.0 x16 (with PCIe switch)<br />
* [https://www.supermicro.com/en/products/accessories/addon/AOC-SHG3-4M2P.php Supermicro AOC-SHG3-4M2P] 4x M.2 PCIe to PCIe 3.0 x8 (using a PEX 8734 PCIe 3.0 (8.0GT/s) Switch). Draws 10 watts in idle. Requires one additional 4-pin 12V connector.<br />
<br />
===Partially working===<br />
* [https://www.amazon.com/gp/product/B074WV4ZN4 Aplicata Quad M.2 NVMe SSD PCIe x16 Adapter] (no PCIe switch; only lowest slot works)<br />
<br />
==SAS/SATA Storage Controllers ==<br />
===Working===<br />
* IOCrest SI-PEX40062 (Chipset: Marvell 88SE9235, PCI id 1B4B:9235)<br />
** Marvell 88SE9230 chipset also confirmed to work<br />
* Kouwell PE-115H (Chipset: Marvell 88SE9130, PCI id 1b4b:9130)<br />
* LSI 9300/9200 SAS HBAs<br />
** May require updating to IT firmware on a x86 machine<br />
* [[PM8068]]-based SAS HBAs <br />
* Supermicro AOC-SLG3-4E2P 4-port OCuLink adapter<br />
* Jmicron JMB 363 SATA PCIe card. SATA ports work with Petitboot.<br />
* MegaRAID 9460-8i<br />
<br />
===Non-working===<br />
* AXAGON PCES-SA2 (ASMedia chipset)<br />
* SuperMicro AOC-SASLP-MV8 (mvsas driver)<br />
* MegaRAID 9341-8i - probably a bug in the firmware<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 642L] (Chipset: Marvell 88SE9235)<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 644L] (Chipset: Marvell 88SE9235)<br />
<br />
== Graphics Cards ==<br />
<br />
No display? Check out the [[Troubleshooting/GPU|GPU Troubleshooting]] page.<br />
<br />
=== AMD ===<br />
<br />
All AMD GPUs currently have DMA issues (limited to 32-bit, which can cause crashes) due to missing Linux kernel support for DMA windows between 33 and 63 bits in length. The root cause is GPU vendors (and occasionally some non-GPU vendors) cutting costs and only including 40-bit capable (Intel-style) DMA controllers. A compatibility mode is expected to be included in Linux 5.4 and above that will resolve this issue.<br />
<br />
* AMD Radeon HD 5850 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 6450 - Works with default settings (kernel: radeon, X: modesetting or radeon), tested in BE mode<br />
* AMD Radeon HD 6850 - Disable AST VGA with jumper. 32 bit.<br />
* AMD Radeon HD 7850 - Disabled onboard VGA. Using amdgpu is highly unstable, radeon driver is usable but has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 7950 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon R5 220<br />
* AMD Radeon R5 230 - Works in BE mode (use <code>Option "AccelMethod" "EXA"</code> for Xorg)<br />
* AMD Radeon R7 240<br />
* AMD Radeon R9 290X<br />
* AMD Radeon RX 480<br />
* AMD Radeon RX 580 – Works with the amdgpu firmware from Ubuntu 19.04 and disabled onboard VGA<br />
** You may also need a kernel parameter like <code>vga=797</code> if xinit complains about VESA[http://en.wikipedia.org/wiki/VESA_BIOS_Extensions]<br />
* AMD Radeon RX Vega 56 - Works with Debian Buster with amdgpu. Requires patches to work, somewhat unstable but usable. Cannot use AST Integrated VGA and AMDGPU at the same time without causing conflict. Not tested at this moment for use in petitboot or firmware. <br />
* AMD Radeon Pro WX4100 (Polaris11 core) - May need at least linux 4.16 in order to get Xorg to work.<br />
* AMD Radeon Pro WX5100<br />
* AMD Radeon Pro WX7100 (Polaris10 core) - Available pre-installed on Talos II workstation, server, and desktop configurations.<br />
<br />
The core name is important when storing the firmware into the BOOTKERNFW partition in PNOR for use by skiroot.<br />
==== Non-working ====<br />
All Navi based cards and later do not have display support enabled in the kernel. A bug report has been filed [https://gitlab.freedesktop.org/drm/amd/issues/984 here].<br />
* AMD Radeon RX 5700 - no display support<br />
* AMD Radeon RX 5700 XT - no display support<br />
<br />
=== NVIDIA ===<br />
* NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1) - Works in petitboot if onboard VGA is disabled. Currently has issues with only using 32-bit DMA. No firmware needed.<br />
* NVIDIA RTX 2070 - usable for compute, but not 3D acceleration; integrated by Raptor as part of the Talos II PowerAI Development System configuration<br />
<br />
=== Other ===<br />
* [[AST2500|ASPEED AST2500]]. Works in both the main OS (LE mode) and Petitboot. BE mode partially works (doesn't crash, but colors are wrong unless you apply a patch that is harmful to performance).<br />
* [https://www.climaxdigital.co.uk/CUH195-USB-2-to-DVI-VGA-or-HDMI-Adaptor-1080p-full-hd ClimaxDigital CUH195 USB 2.0 Graphic Adapter] - Based on DisplayLink DL-3500 chipset. Works in the main OS; not tested with Petitboot but is likely to work there too.<br />
* EVGA 100-U2-UV12-A1 UV Plus USB VGA Adapter - DisplayLink Based - Petitboot shows up without loading firmware. Not tested in OS.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=455 ASPEED AST2510]. It's the GPU component of the [[AST2500]] without the BMC component. Might be useful for users who want to add additional VGA displays beyond the single VGA display supported by the built-in AST2500, with similar freedom and performance properties as the AST2500. Known suppliers of AST2510 devices are:<br />
** [https://www.win-ent.com/1U-Rackmount-Platforms/pl-81280 WIN Enterprises IP-492B]<br />
** [https://web.archive.org/web/20190505060931/http://www.aewin.com.tw/uploads/files/acbd8aee4c81584332ee56cf11ec230e.pdf AEWIN Technologies R492B (Warning: non-TLS link)]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=377 ASPEED AST1400]. Older revision of the AST2510 (AST1400 is 5th generation; AST2510 is 6th generation). Known suppliers of AST1400 devices are:<br />
** [https://dls.ieiworld.com/IEIWeb/Reserved/0F233000410888189307/IGCME-1300%20QIG%20V1.10_20150819.pdf IEI Integration Corp IGCME-1300-R11]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=244 ASPEED AST1300]. Older revision of the AST2510 (AST1300 is 4th generation; AST2510 is 6th generation). Known suppliers of AST1300 devices are:<br />
** [http://archivecaslytosk.onion/QZROL IEI Integration Corp IGCME-1300-R10]<br />
<br />
== Sound Cards ==<br />
<br />
===Working===<br />
* Creative Sound Blaster Audigy FX SB1570 PCIe 5.1 Sound Card<br />
* Creative Sound Blaster X-Fi Xtreme Fidelity PCIe Audio Sound Card (SB0880)<br />
* AMD Radeon HD 5850 and 7950 (HDMI audio)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=156&p_name=+USB+Stereo+Audio+Adapter&pc_id=9&pc_name=Adapters&pt_id=3&pt_name=Audio+%2B++Video#tab-1 VANTEC NBA-120U (USB)]<br />
* Sabrent USB External Stereo Sound Adapter (AU-MMSA)<br />
* [http://mackie.com/products/onyx-blackjack Mackie Onyx Blackjack (USB) Recording Interface]<br />
* RME HDSPe AIO (FreeBSD tested)<br />
* Leveraged Sabrent Bluetooth 4.0 USB adapter (model BT-UB40) to connect to wireless Bluetooth headphones, specifically Bose Quiet Comfort 35.<br />
<br />
===Non-working===<br />
* ASUS Xonar SE - Contains ASMedia USB host controller with errant DMA access flaw<br />
* Creative Sound Blaster Audigy PCIe RX 7.1 - unable to enable emu10k1 driver on little-endian power9 kernel as driver requires ZONE_DMA<br />
<br />
==USB Host Controllers==<br />
===Working===<br />
* Insignia USB 3.0 PCI-e NS-PCCUP53 V1.0 (Chipset: NEC D720202)<br />
* AGAXO PCEU-23R (Chipset: Renesas uPD720202, PCI id 1912:0015)<br />
* Terminus Technology Inc. FE 2.1 7-port Hub<br />
* [https://www.sonnettech.com/product/legacyproducts/allegroprousb3pcie.html Sonnet Allegro Pro USB 3.0 PCIe USB3-PRO-4PM-E] (Chipset: Four [http://www.frescologic.com/product/single/fl1100ex/ Fresco Logic FL1100EX] controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8608 PLX PEX 8608] switch)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=125&p_name=+4-Port+SuperSpeed+USB+3.0+PCIe+Host+Card+w%2F+Internal+20-Pin+Connector&pc_id=16&pc_name=USB&pt_id=4&pt_name=Add-on+Cards Vantec UGT-PC345 4 Port USB 3.0 PCIe w/ Internal 20 pin] (Chipset: Renesas uDP720201)<br />
* [https://www.amazon.com/gp/product/B07H4HJNJC] (monster card with 8 ports of USB 3.0) four Renesas uPD720202 chips behind ASMedia 1806, card can be found under different brands but can be identified by the look. [http://sedna-shop.com/index.php?route=product/product&path=59_74&product_id=138 This should be the same card]<br />
<br />
===Non-working===<br />
In general, USB3 host controllers based on ASMedia chipsets are known to be problematic, due to ASMedia hardware or firmware bugs causing errant DMA accesses to invalid regions of host memory.<br />
<br />
* AXAGON PCEU-43V - chipset Via VL805 - PCI id 1106:3483<br />
* StarTech PEXUSB314A2V - 2x ASM1142 host controllers and a PCIe switch<br />
* QNINE USB 3.1 Gen2 (Type-A and Type-C) - ASM1142<br />
** It's based on the the same reference design as all the other cheap ASM1142 cards, so there's a good chance those won't work either.<br />
* Rosewill RC-509 - ASM1142<br />
* Ableconn PU31-2C-2 - ASM2142<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=54 SEDNA - PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC)<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=99 SEDNA - PCIe 4 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
* [https://www.startech.com/Cards-Adapters/USB-3.0/Cards/7-port-pci-express-usb-3-card~PEXUSB3S7 StarTech PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
<br />
==TV Tuners==<br />
* Hauppauge WinTV-quadHD<br />
* Hauppauge WinTV HVR-850 (2040:7240) - ATSC - using Kaffeine<br />
<br />
==Firewire Host Controllers==<br />
===Working===<br />
<br />
* [https://www.sybausa.com/index.php?route=product/product&product_id=119 Syba SY-PEX30016] (Chipset: TI XIO2213B)<br />
** Requires [https://marc.info/?l=linux1394-devel&m=157207806405627&q=mbox this patch] to work on kernels with a 64k page size.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
<br />
* [http://www.dawicontrol.com/index.php?cmd=proddet&id=media Dawicontrol DC-FW800] (Chipset: TI XIO2213B)<br />
* [https://www.delock.de/produkte/G_89210/merkmale.html?setLanguage=en DeLOCK 3x FireWire 800, Item No. 89210] (Chipset: TI XIO2213B)<br />
* [https://www.digitus.info/en/products/computer-components/computer-peripherals/serial-parallel-adapter/ds-30203-2/ DIGITUS Firewire 800 (1394b) PCIe Card] (Chipset: TI XIO2213B)<br />
* [https://www.exsys.de/index.php?page=product&info=127 Exsys EX-16415] (Chipset: TI XIO2213)<br />
* [https://www.exsys.de/index.php?page=product&info=366 Exsys EX-16512E] (Chipset: TI)<br />
* [http://www.ioi.com.tw/products/proddetail.aspx?CatID=106&DeviceID=3021&HostID=2009&ProdID=1060100 IOI Technology FWB-PCIE1X11A] (Chipset: TI XIO2213B)<br />
[[Category:Compatibility List]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=POWER9_Hardware_Compatibility_List/PCIe_Devices&diff=2820POWER9 Hardware Compatibility List/PCIe Devices2019-12-05T13:16:51Z<p>Meklort: /* Non-working */</p>
<hr />
<div><br />
==Compatibility rules==<br />
In general, any PCIe device will work providing that an open source driver is available for your operating system. There are some exceptions:<br />
<br />
* '''Hardware bugs.''' POWER does not permit errant DMA accesses. If a device tries to access areas of host memory which it is not permitted to access, the device is shut down immediately. This is dissimilar to x86 platforms, which simply silently ignore such attempts. Some badly designed I/O devices have bugs causing them to attempt DMA accesses to random areas of host memory; these devices are unlikely to function correctly on POWER systems unless a workaround is available. Note that devices in full bypass mode may legally have access to all host memory, to avoid this and test driver IOMMU setup pass "iommu=nobypass" to the kernel at startup.<br />
* '''I/O space.''' Starting with [[POWER9]], access to the legacy PCI I/O space is no longer supported; devices or drivers which rely on this will not function. The legacy I/O space has been deprecated for as long as PCIe has existed; generally this will only affect very old PCIe devices which use PCIe to PCI bridge chips to attach old PCI devices to the bus. A small subset of these devices may require legacy I/O space support.<br />
* '''Incomplete memory addressing support.''' The PCIe architecture specifies a 64-bit address space. Some I/O devices try to economize on this by only implementing e.g. 40 bits for their addressing, rendering them incapable of addressing host memory which lies above address 2<sup>40</sup>. (Firmware patches to work around this are pending.)<br />
* '''Bifurcation limits.''' Arbitrary PCIe lane bifurcation is not supported. Devices which split a PCIe slot into multiple connectors (for example, PCIe to M.2 adaptors) will not work unless they have a PCIe switch chip, although the first connector will generally work.<br />
<br />
==Troubleshooting==<br />
<br />
If a PCIe device is in a broken state due to being attached/detached from a VM, or due to a transition from Petitboot to the main OS, you may be able to fix it by issuing a hot reset. A script for performing a PCIe hot reset is at [[File:Pcie_hot_reset.sh]]. For background on PCIe resets and how a hot reset differs from the function-level reset performed by <code>echo 1 > /sys/bus/pci/devices/$dev/reset</code>, see [https://unix.stackexchange.com/a/474378 Alex Forencich's explanation on Stack Exchange].<br />
<br />
==NICs==<br />
===Working===<br />
* Broadcom [[BCM5719]]<br />
* Chelsio T6225-SO-CR<br />
* Mellanox ConnectX-6 EN 200Gb/s Adapter Card ''(supports [[CAPI]])''<br />
* Silicom [https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9-server-adapter/ PE310G4SPI9]/[https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9la-quad-port-10-gigabit-nic-intel-based/ PE310G4SPI9LA] quad port 10 GbE SFP+ adapter (ixgbe driver)<br />
<br />
===Non-working===<br />
* Mellanox ConnectX IB QDR (mlx4 driver)<br />
<br />
==Wireless Cards==<br />
* [https://ark.intel.com/content/www/us/en/ark/products/75439/intel-dual-band-wireless-ac-7260.html Intel Dual-Band Wireless-AC 7260] (Bluetooth untested)<br />
* Alfa AWUS036NHA Wireless USB Adaptor<br />
** open source firmware (ath9k_htc) [https://github.com/qca/open-ath9k-htc-firmware]<br />
* TP-Link TL WN823N RTL8192EU [https://github.com/Mange/rtl8192eu-linux-driver]<br />
** remove "ARCH=$(ARCH)" on line 1710 of the makefile and it compiles fine<br />
<br />
==NVMe Drives==<br />
* Samsung 950 PRO (with M.2 to PCIe adapter)<br />
* Samsung 960 EVO / PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 EVO Plus (with M.2 to PCIe adapter)<br />
* Intel Optane 900P NVMe XPoint PCIe<br />
* Intel Optane 905P NVMe XPoint PCIe AIC<br />
* WD Black PCIe (with M.2 to PCIe adapter)<br />
* MyDigitalSSD BPX 480GB (with M.2 to PCIe adapter)<br />
<br />
==PCIe to M.2 Adapters==<br />
===Working===<br />
* [http://ableconn.com/products_2.php?gid=62 Ableconn PEXM2-SSD M.2 NGFF PCIe SSD to PCI Express 3.0 x4 Host Adapter Card (M.2 to PCIe adapter)]<br />
* [https://www.addonics.com/products/ad2m2nvmpx8.php Addonics AD2M2NVMPX8] Dual NVMe PCIe adapter 2x M.2 PCIe to PCIe x8<br />
* [http://www.delock.com/produkte/G_89370/merkmale.html Delock PCI Express x4 Card > 1 x internal NVMe M.2 Key M 80 mm - Low Profile Form Factor; Item No. 89370]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=9SIA4RE5AU2769 JEYI SK4 M.2 NVMe(M Key) SSD to PCI-E 3.0 x4 Adapter Converter Card]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=N82E16815124167 SYBA SI-PEX40110 M.2 PCI-e To PCI-e 3.0 x4]<br />
* [http://highpoint-tech.com/USA_new/series-ssd7101a-1-overview.htm HighPoint SSD7101A-1] 4x M.2 PCIe to PCIe 3.0 x16 (based on PLX PEX8747 PCIe switch)<br />
** Works without special drivers as a PCIe switch. NVMEs are detected and work just fine. Petitboot is able to boot attached NVMEs with no problems. Tested in FreeBSD. -- [[User:Bdragon|Bdragon]] ([[User talk:Bdragon|talk]])<br />
* [http://highpoint-tech.com/USA_new/series-ssd7102-overview.htm HighPoint SSD 7102] 4x M.2 PCIe to PCIe 3.0 x16 (with PCIe switch)<br />
* [https://www.supermicro.com/en/products/accessories/addon/AOC-SHG3-4M2P.php Supermicro AOC-SHG3-4M2P] 4x M.2 PCIe to PCIe 3.0 x8 (using a PEX 8734 PCIe 3.0 (8.0GT/s) Switch). Draws 10 watts in idle. Requires one additional 4-pin 12V connector.<br />
<br />
===Partially working===<br />
* [https://www.amazon.com/gp/product/B074WV4ZN4 Aplicata Quad M.2 NVMe SSD PCIe x16 Adapter] (no PCIe switch; only lowest slot works)<br />
<br />
==SAS/SATA Storage Controllers ==<br />
===Working===<br />
* IOCrest SI-PEX40062 (Chipset: Marvell 88SE9235, PCI id 1B4B:9235)<br />
** Marvell 88SE9230 chipset also confirmed to work<br />
* Kouwell PE-115H (Chipset: Marvell 88SE9130, PCI id 1b4b:9130)<br />
* LSI 9300/9200 SAS HBAs<br />
** May require updating to IT firmware on a x86 machine<br />
* [[PM8068]]-based SAS HBAs <br />
* Supermicro AOC-SLG3-4E2P 4-port OCuLink adapter<br />
* Jmicron JMB 363 SATA PCIe card. SATA ports work with Petitboot.<br />
* MegaRAID 9460-8i<br />
<br />
===Non-working===<br />
* AXAGON PCES-SA2 (ASMedia chipset)<br />
* SuperMicro AOC-SASLP-MV8 (mvsas driver)<br />
* MegaRAID 9341-8i - probably a bug in the firmware<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 642L] (Chipset: Marvell 88SE9235)<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 644L] (Chipset: Marvell 88SE9235)<br />
<br />
== Graphics Cards ==<br />
<br />
No display? Check out the [[Troubleshooting/GPU|GPU Troubleshooting]] page.<br />
<br />
=== AMD ===<br />
<br />
All AMD GPUs currently have DMA issues (limited to 32-bit, which can cause crashes) due to missing Linux kernel support for DMA windows between 33 and 63 bits in length. The root cause is GPU vendors (and occasionally some non-GPU vendors) cutting costs and only including 40-bit capable (Intel-style) DMA controllers. A compatibility mode is expected to be included in Linux 5.4 and above that will resolve this issue.<br />
<br />
* AMD Radeon HD 5850 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 6450 - Works with default settings (kernel: radeon, X: modesetting or radeon), tested in BE mode<br />
* AMD Radeon HD 6850 - Disable AST VGA with jumper. 32 bit.<br />
* AMD Radeon HD 7850 - Disabled onboard VGA. Using amdgpu is highly unstable, radeon driver is usable but has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 7950 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon R5 220<br />
* AMD Radeon R5 230 - Works in BE mode (use <code>Option "AccelMethod" "EXA"</code> for Xorg)<br />
* AMD Radeon R7 240<br />
* AMD Radeon R9 290X<br />
* AMD Radeon RX 480<br />
* AMD Radeon RX 580 – Works with the amdgpu firmware from Ubuntu 19.04 and disabled onboard VGA<br />
** You may also need a kernel parameter like <code>vga=797</code> if xinit complains about VESA[http://en.wikipedia.org/wiki/VESA_BIOS_Extensions]<br />
* AMD Radeon RX Vega 56 - Works with Debian Buster with amdgpu. Requires patches to work, somewhat unstable but usable. Cannot use AST Integrated VGA and AMDGPU at the same time without causing conflict. Not tested at this moment for use in petitboot or firmware. <br />
* AMD Radeon Pro WX4100 (Polaris11 core) - May need at least linux 4.16 in order to get Xorg to work.<br />
* AMD Radeon Pro WX5100<br />
* AMD Radeon Pro WX7100 (Polaris10 core) - Available pre-installed on Talos II workstation, server, and desktop configurations.<br />
<br />
The core name is important when storing the firmware into the BOOTKERNFW partition in PNOR for use by skiroot.<br />
==== Non-working ====<br />
All Navi based cards and later do not have display support enabled in the kernel. A bug report has been filed [https://gitlab.freedesktop.org/drm/amd/issues/984 here].<br />
* AMD Radeon RX 5700<br />
* AMD Radeon RX 5700 XT<br />
<br />
=== NVIDIA ===<br />
* NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1) - Works in petitboot if onboard VGA is disabled. Currently has issues with only using 32-bit DMA. No firmware needed.<br />
* NVIDIA RTX 2070 - usable for compute, but not 3D acceleration; integrated by Raptor as part of the Talos II PowerAI Development System configuration<br />
<br />
=== Other ===<br />
* [[AST2500|ASPEED AST2500]]. Works in both the main OS (LE mode) and Petitboot. BE mode partially works (doesn't crash, but colors are wrong unless you apply a patch that is harmful to performance).<br />
* [https://www.climaxdigital.co.uk/CUH195-USB-2-to-DVI-VGA-or-HDMI-Adaptor-1080p-full-hd ClimaxDigital CUH195 USB 2.0 Graphic Adapter] - Based on DisplayLink DL-3500 chipset. Works in the main OS; not tested with Petitboot but is likely to work there too.<br />
* EVGA 100-U2-UV12-A1 UV Plus USB VGA Adapter - DisplayLink Based - Petitboot shows up without loading firmware. Not tested in OS.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=455 ASPEED AST2510]. It's the GPU component of the [[AST2500]] without the BMC component. Might be useful for users who want to add additional VGA displays beyond the single VGA display supported by the built-in AST2500, with similar freedom and performance properties as the AST2500. Known suppliers of AST2510 devices are:<br />
** [https://www.win-ent.com/1U-Rackmount-Platforms/pl-81280 WIN Enterprises IP-492B]<br />
** [https://web.archive.org/web/20190505060931/http://www.aewin.com.tw/uploads/files/acbd8aee4c81584332ee56cf11ec230e.pdf AEWIN Technologies R492B (Warning: non-TLS link)]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=377 ASPEED AST1400]. Older revision of the AST2510 (AST1400 is 5th generation; AST2510 is 6th generation). Known suppliers of AST1400 devices are:<br />
** [https://dls.ieiworld.com/IEIWeb/Reserved/0F233000410888189307/IGCME-1300%20QIG%20V1.10_20150819.pdf IEI Integration Corp IGCME-1300-R11]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=244 ASPEED AST1300]. Older revision of the AST2510 (AST1300 is 4th generation; AST2510 is 6th generation). Known suppliers of AST1300 devices are:<br />
** [http://archivecaslytosk.onion/QZROL IEI Integration Corp IGCME-1300-R10]<br />
<br />
== Sound Cards ==<br />
<br />
===Working===<br />
* Creative Sound Blaster Audigy FX SB1570 PCIe 5.1 Sound Card<br />
* Creative Sound Blaster X-Fi Xtreme Fidelity PCIe Audio Sound Card (SB0880)<br />
* AMD Radeon HD 5850 and 7950 (HDMI audio)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=156&p_name=+USB+Stereo+Audio+Adapter&pc_id=9&pc_name=Adapters&pt_id=3&pt_name=Audio+%2B++Video#tab-1 VANTEC NBA-120U (USB)]<br />
* Sabrent USB External Stereo Sound Adapter (AU-MMSA)<br />
* [http://mackie.com/products/onyx-blackjack Mackie Onyx Blackjack (USB) Recording Interface]<br />
* RME HDSPe AIO (FreeBSD tested)<br />
* Leveraged Sabrent Bluetooth 4.0 USB adapter (model BT-UB40) to connect to wireless Bluetooth headphones, specifically Bose Quiet Comfort 35.<br />
<br />
===Non-working===<br />
* ASUS Xonar SE - Contains ASMedia USB host controller with errant DMA access flaw<br />
* Creative Sound Blaster Audigy PCIe RX 7.1 - unable to enable emu10k1 driver on little-endian power9 kernel as driver requires ZONE_DMA<br />
<br />
==USB Host Controllers==<br />
===Working===<br />
* Insignia USB 3.0 PCI-e NS-PCCUP53 V1.0 (Chipset: NEC D720202)<br />
* AGAXO PCEU-23R (Chipset: Renesas uPD720202, PCI id 1912:0015)<br />
* Terminus Technology Inc. FE 2.1 7-port Hub<br />
* [https://www.sonnettech.com/product/legacyproducts/allegroprousb3pcie.html Sonnet Allegro Pro USB 3.0 PCIe USB3-PRO-4PM-E] (Chipset: Four [http://www.frescologic.com/product/single/fl1100ex/ Fresco Logic FL1100EX] controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8608 PLX PEX 8608] switch)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=125&p_name=+4-Port+SuperSpeed+USB+3.0+PCIe+Host+Card+w%2F+Internal+20-Pin+Connector&pc_id=16&pc_name=USB&pt_id=4&pt_name=Add-on+Cards Vantec UGT-PC345 4 Port USB 3.0 PCIe w/ Internal 20 pin] (Chipset: Renesas uDP720201)<br />
* [https://www.amazon.com/gp/product/B07H4HJNJC] (monster card with 8 ports of USB 3.0) four Renesas uPD720202 chips behind ASMedia 1806, card can be found under different brands but can be identified by the look. [http://sedna-shop.com/index.php?route=product/product&path=59_74&product_id=138 This should be the same card]<br />
<br />
===Non-working===<br />
In general, USB3 host controllers based on ASMedia chipsets are known to be problematic, due to ASMedia hardware or firmware bugs causing errant DMA accesses to invalid regions of host memory.<br />
<br />
* AXAGON PCEU-43V - chipset Via VL805 - PCI id 1106:3483<br />
* StarTech PEXUSB314A2V - 2x ASM1142 host controllers and a PCIe switch<br />
* QNINE USB 3.1 Gen2 (Type-A and Type-C) - ASM1142<br />
** It's based on the the same reference design as all the other cheap ASM1142 cards, so there's a good chance those won't work either.<br />
* Rosewill RC-509 - ASM1142<br />
* Ableconn PU31-2C-2 - ASM2142<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=54 SEDNA - PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC)<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=99 SEDNA - PCIe 4 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
* [https://www.startech.com/Cards-Adapters/USB-3.0/Cards/7-port-pci-express-usb-3-card~PEXUSB3S7 StarTech PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
<br />
==TV Tuners==<br />
* Hauppauge WinTV-quadHD<br />
* Hauppauge WinTV HVR-850 (2040:7240) - ATSC - using Kaffeine<br />
<br />
==Firewire Host Controllers==<br />
===Working===<br />
<br />
* [https://www.sybausa.com/index.php?route=product/product&product_id=119 Syba SY-PEX30016] (Chipset: TI XIO2213B)<br />
** Requires [https://marc.info/?l=linux1394-devel&m=157207806405627&q=mbox this patch] to work on kernels with a 64k page size.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
<br />
* [http://www.dawicontrol.com/index.php?cmd=proddet&id=media Dawicontrol DC-FW800] (Chipset: TI XIO2213B)<br />
* [https://www.delock.de/produkte/G_89210/merkmale.html?setLanguage=en DeLOCK 3x FireWire 800, Item No. 89210] (Chipset: TI XIO2213B)<br />
* [https://www.digitus.info/en/products/computer-components/computer-peripherals/serial-parallel-adapter/ds-30203-2/ DIGITUS Firewire 800 (1394b) PCIe Card] (Chipset: TI XIO2213B)<br />
* [https://www.exsys.de/index.php?page=product&info=127 Exsys EX-16415] (Chipset: TI XIO2213)<br />
* [https://www.exsys.de/index.php?page=product&info=366 Exsys EX-16512E] (Chipset: TI)<br />
* [http://www.ioi.com.tw/products/proddetail.aspx?CatID=106&DeviceID=3021&HostID=2009&ProdID=1060100 IOI Technology FWB-PCIE1X11A] (Chipset: TI XIO2213B)<br />
[[Category:Compatibility List]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=POWER9_Hardware_Compatibility_List/PCIe_Devices&diff=2819POWER9 Hardware Compatibility List/PCIe Devices2019-12-05T13:16:11Z<p>Meklort: /* AMD */ Add unsupported Navi cards</p>
<hr />
<div><br />
==Compatibility rules==<br />
In general, any PCIe device will work providing that an open source driver is available for your operating system. There are some exceptions:<br />
<br />
* '''Hardware bugs.''' POWER does not permit errant DMA accesses. If a device tries to access areas of host memory which it is not permitted to access, the device is shut down immediately. This is dissimilar to x86 platforms, which simply silently ignore such attempts. Some badly designed I/O devices have bugs causing them to attempt DMA accesses to random areas of host memory; these devices are unlikely to function correctly on POWER systems unless a workaround is available. Note that devices in full bypass mode may legally have access to all host memory, to avoid this and test driver IOMMU setup pass "iommu=nobypass" to the kernel at startup.<br />
* '''I/O space.''' Starting with [[POWER9]], access to the legacy PCI I/O space is no longer supported; devices or drivers which rely on this will not function. The legacy I/O space has been deprecated for as long as PCIe has existed; generally this will only affect very old PCIe devices which use PCIe to PCI bridge chips to attach old PCI devices to the bus. A small subset of these devices may require legacy I/O space support.<br />
* '''Incomplete memory addressing support.''' The PCIe architecture specifies a 64-bit address space. Some I/O devices try to economize on this by only implementing e.g. 40 bits for their addressing, rendering them incapable of addressing host memory which lies above address 2<sup>40</sup>. (Firmware patches to work around this are pending.)<br />
* '''Bifurcation limits.''' Arbitrary PCIe lane bifurcation is not supported. Devices which split a PCIe slot into multiple connectors (for example, PCIe to M.2 adaptors) will not work unless they have a PCIe switch chip, although the first connector will generally work.<br />
<br />
==Troubleshooting==<br />
<br />
If a PCIe device is in a broken state due to being attached/detached from a VM, or due to a transition from Petitboot to the main OS, you may be able to fix it by issuing a hot reset. A script for performing a PCIe hot reset is at [[File:Pcie_hot_reset.sh]]. For background on PCIe resets and how a hot reset differs from the function-level reset performed by <code>echo 1 > /sys/bus/pci/devices/$dev/reset</code>, see [https://unix.stackexchange.com/a/474378 Alex Forencich's explanation on Stack Exchange].<br />
<br />
==NICs==<br />
===Working===<br />
* Broadcom [[BCM5719]]<br />
* Chelsio T6225-SO-CR<br />
* Mellanox ConnectX-6 EN 200Gb/s Adapter Card ''(supports [[CAPI]])''<br />
* Silicom [https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9-server-adapter/ PE310G4SPI9]/[https://www.silicom-usa.com/pr/server-adapters/networking-adapters/10-gigabit-ethernet-networking-adapters/pe310g4spi9la-quad-port-10-gigabit-nic-intel-based/ PE310G4SPI9LA] quad port 10 GbE SFP+ adapter (ixgbe driver)<br />
<br />
===Non-working===<br />
* Mellanox ConnectX IB QDR (mlx4 driver)<br />
<br />
==Wireless Cards==<br />
* [https://ark.intel.com/content/www/us/en/ark/products/75439/intel-dual-band-wireless-ac-7260.html Intel Dual-Band Wireless-AC 7260] (Bluetooth untested)<br />
* Alfa AWUS036NHA Wireless USB Adaptor<br />
** open source firmware (ath9k_htc) [https://github.com/qca/open-ath9k-htc-firmware]<br />
* TP-Link TL WN823N RTL8192EU [https://github.com/Mange/rtl8192eu-linux-driver]<br />
** remove "ARCH=$(ARCH)" on line 1710 of the makefile and it compiles fine<br />
<br />
==NVMe Drives==<br />
* Samsung 950 PRO (with M.2 to PCIe adapter)<br />
* Samsung 960 EVO / PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 PRO (with M.2 to PCIe adapter)<br />
* Samsung 970 EVO Plus (with M.2 to PCIe adapter)<br />
* Intel Optane 900P NVMe XPoint PCIe<br />
* Intel Optane 905P NVMe XPoint PCIe AIC<br />
* WD Black PCIe (with M.2 to PCIe adapter)<br />
* MyDigitalSSD BPX 480GB (with M.2 to PCIe adapter)<br />
<br />
==PCIe to M.2 Adapters==<br />
===Working===<br />
* [http://ableconn.com/products_2.php?gid=62 Ableconn PEXM2-SSD M.2 NGFF PCIe SSD to PCI Express 3.0 x4 Host Adapter Card (M.2 to PCIe adapter)]<br />
* [https://www.addonics.com/products/ad2m2nvmpx8.php Addonics AD2M2NVMPX8] Dual NVMe PCIe adapter 2x M.2 PCIe to PCIe x8<br />
* [http://www.delock.com/produkte/G_89370/merkmale.html Delock PCI Express x4 Card > 1 x internal NVMe M.2 Key M 80 mm - Low Profile Form Factor; Item No. 89370]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=9SIA4RE5AU2769 JEYI SK4 M.2 NVMe(M Key) SSD to PCI-E 3.0 x4 Adapter Converter Card]<br />
* [https://www.newegg.com/Product/Product.aspx?Item=N82E16815124167 SYBA SI-PEX40110 M.2 PCI-e To PCI-e 3.0 x4]<br />
* [http://highpoint-tech.com/USA_new/series-ssd7101a-1-overview.htm HighPoint SSD7101A-1] 4x M.2 PCIe to PCIe 3.0 x16 (based on PLX PEX8747 PCIe switch)<br />
** Works without special drivers as a PCIe switch. NVMEs are detected and work just fine. Petitboot is able to boot attached NVMEs with no problems. Tested in FreeBSD. -- [[User:Bdragon|Bdragon]] ([[User talk:Bdragon|talk]])<br />
* [http://highpoint-tech.com/USA_new/series-ssd7102-overview.htm HighPoint SSD 7102] 4x M.2 PCIe to PCIe 3.0 x16 (with PCIe switch)<br />
* [https://www.supermicro.com/en/products/accessories/addon/AOC-SHG3-4M2P.php Supermicro AOC-SHG3-4M2P] 4x M.2 PCIe to PCIe 3.0 x8 (using a PEX 8734 PCIe 3.0 (8.0GT/s) Switch). Draws 10 watts in idle. Requires one additional 4-pin 12V connector.<br />
<br />
===Partially working===<br />
* [https://www.amazon.com/gp/product/B074WV4ZN4 Aplicata Quad M.2 NVMe SSD PCIe x16 Adapter] (no PCIe switch; only lowest slot works)<br />
<br />
==SAS/SATA Storage Controllers ==<br />
===Working===<br />
* IOCrest SI-PEX40062 (Chipset: Marvell 88SE9235, PCI id 1B4B:9235)<br />
** Marvell 88SE9230 chipset also confirmed to work<br />
* Kouwell PE-115H (Chipset: Marvell 88SE9130, PCI id 1b4b:9130)<br />
* LSI 9300/9200 SAS HBAs<br />
** May require updating to IT firmware on a x86 machine<br />
* [[PM8068]]-based SAS HBAs <br />
* Supermicro AOC-SLG3-4E2P 4-port OCuLink adapter<br />
* Jmicron JMB 363 SATA PCIe card. SATA ports work with Petitboot.<br />
* MegaRAID 9460-8i<br />
<br />
===Non-working===<br />
* AXAGON PCES-SA2 (ASMedia chipset)<br />
* SuperMicro AOC-SASLP-MV8 (mvsas driver)<br />
* MegaRAID 9341-8i - probably a bug in the firmware<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 642L] (Chipset: Marvell 88SE9235)<br />
* [http://highpoint-tech.com/USA_new/series_rr600-overview.htm HighPoint RocketRAID 644L] (Chipset: Marvell 88SE9235)<br />
<br />
== Graphics Cards ==<br />
<br />
No display? Check out the [[Troubleshooting/GPU|GPU Troubleshooting]] page.<br />
<br />
=== AMD ===<br />
<br />
All AMD GPUs currently have DMA issues (limited to 32-bit, which can cause crashes) due to missing Linux kernel support for DMA windows between 33 and 63 bits in length. The root cause is GPU vendors (and occasionally some non-GPU vendors) cutting costs and only including 40-bit capable (Intel-style) DMA controllers. A compatibility mode is expected to be included in Linux 5.4 and above that will resolve this issue.<br />
<br />
* AMD Radeon HD 5850 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 6450 - Works with default settings (kernel: radeon, X: modesetting or radeon), tested in BE mode<br />
* AMD Radeon HD 6850 - Disable AST VGA with jumper. 32 bit.<br />
* AMD Radeon HD 7850 - Disabled onboard VGA. Using amdgpu is highly unstable, radeon driver is usable but has issues with only using 32-bit DMA.<br />
* AMD Radeon HD 7950 - Must disable onboard VGA first. Currently has issues with only using 32-bit DMA.<br />
* AMD Radeon R5 220<br />
* AMD Radeon R5 230 - Works in BE mode (use <code>Option "AccelMethod" "EXA"</code> for Xorg)<br />
* AMD Radeon R7 240<br />
* AMD Radeon R9 290X<br />
* AMD Radeon RX 480<br />
* AMD Radeon RX 580 – Works with the amdgpu firmware from Ubuntu 19.04 and disabled onboard VGA<br />
** You may also need a kernel parameter like <code>vga=797</code> if xinit complains about VESA[http://en.wikipedia.org/wiki/VESA_BIOS_Extensions]<br />
* AMD Radeon RX Vega 56 - Works with Debian Buster with amdgpu. Requires patches to work, somewhat unstable but usable. Cannot use AST Integrated VGA and AMDGPU at the same time without causing conflict. Not tested at this moment for use in petitboot or firmware. <br />
* AMD Radeon Pro WX4100 (Polaris11 core) - May need at least linux 4.16 in order to get Xorg to work.<br />
* AMD Radeon Pro WX5100<br />
* AMD Radeon Pro WX7100 (Polaris10 core) - Available pre-installed on Talos II workstation, server, and desktop configurations.<br />
<br />
The core name is important when storing the firmware into the BOOTKERNFW partition in PNOR for use by skiroot.<br />
==== Non-working ====<br />
All Navi based cards and later do not have display support enabled in the kernel. A bug report has been filed [https://gitlab.freedesktop.org/drm/amd/issues/984 here]<br />
* Radeon RX 5700<br />
* Radeon RX 5700 XT<br />
<br />
=== NVIDIA ===<br />
* NVIDIA Corporation G96 [GeForce 9500 GT] (rev a1) - Works in petitboot if onboard VGA is disabled. Currently has issues with only using 32-bit DMA. No firmware needed.<br />
* NVIDIA RTX 2070 - usable for compute, but not 3D acceleration; integrated by Raptor as part of the Talos II PowerAI Development System configuration<br />
<br />
=== Other ===<br />
* [[AST2500|ASPEED AST2500]]. Works in both the main OS (LE mode) and Petitboot. BE mode partially works (doesn't crash, but colors are wrong unless you apply a patch that is harmful to performance).<br />
* [https://www.climaxdigital.co.uk/CUH195-USB-2-to-DVI-VGA-or-HDMI-Adaptor-1080p-full-hd ClimaxDigital CUH195 USB 2.0 Graphic Adapter] - Based on DisplayLink DL-3500 chipset. Works in the main OS; not tested with Petitboot but is likely to work there too.<br />
* EVGA 100-U2-UV12-A1 UV Plus USB VGA Adapter - DisplayLink Based - Petitboot shows up without loading firmware. Not tested in OS.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=455 ASPEED AST2510]. It's the GPU component of the [[AST2500]] without the BMC component. Might be useful for users who want to add additional VGA displays beyond the single VGA display supported by the built-in AST2500, with similar freedom and performance properties as the AST2500. Known suppliers of AST2510 devices are:<br />
** [https://www.win-ent.com/1U-Rackmount-Platforms/pl-81280 WIN Enterprises IP-492B]<br />
** [https://web.archive.org/web/20190505060931/http://www.aewin.com.tw/uploads/files/acbd8aee4c81584332ee56cf11ec230e.pdf AEWIN Technologies R492B (Warning: non-TLS link)]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=377 ASPEED AST1400]. Older revision of the AST2510 (AST1400 is 5th generation; AST2510 is 6th generation). Known suppliers of AST1400 devices are:<br />
** [https://dls.ieiworld.com/IEIWeb/Reserved/0F233000410888189307/IGCME-1300%20QIG%20V1.10_20150819.pdf IEI Integration Corp IGCME-1300-R11]<br />
* [https://www.aspeedtech.com/products.php?fPath=20&rId=244 ASPEED AST1300]. Older revision of the AST2510 (AST1300 is 4th generation; AST2510 is 6th generation). Known suppliers of AST1300 devices are:<br />
** [http://archivecaslytosk.onion/QZROL IEI Integration Corp IGCME-1300-R10]<br />
<br />
== Sound Cards ==<br />
<br />
===Working===<br />
* Creative Sound Blaster Audigy FX SB1570 PCIe 5.1 Sound Card<br />
* Creative Sound Blaster X-Fi Xtreme Fidelity PCIe Audio Sound Card (SB0880)<br />
* AMD Radeon HD 5850 and 7950 (HDMI audio)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=156&p_name=+USB+Stereo+Audio+Adapter&pc_id=9&pc_name=Adapters&pt_id=3&pt_name=Audio+%2B++Video#tab-1 VANTEC NBA-120U (USB)]<br />
* Sabrent USB External Stereo Sound Adapter (AU-MMSA)<br />
* [http://mackie.com/products/onyx-blackjack Mackie Onyx Blackjack (USB) Recording Interface]<br />
* RME HDSPe AIO (FreeBSD tested)<br />
* Leveraged Sabrent Bluetooth 4.0 USB adapter (model BT-UB40) to connect to wireless Bluetooth headphones, specifically Bose Quiet Comfort 35.<br />
<br />
===Non-working===<br />
* ASUS Xonar SE - Contains ASMedia USB host controller with errant DMA access flaw<br />
* Creative Sound Blaster Audigy PCIe RX 7.1 - unable to enable emu10k1 driver on little-endian power9 kernel as driver requires ZONE_DMA<br />
<br />
==USB Host Controllers==<br />
===Working===<br />
* Insignia USB 3.0 PCI-e NS-PCCUP53 V1.0 (Chipset: NEC D720202)<br />
* AGAXO PCEU-23R (Chipset: Renesas uPD720202, PCI id 1912:0015)<br />
* Terminus Technology Inc. FE 2.1 7-port Hub<br />
* [https://www.sonnettech.com/product/legacyproducts/allegroprousb3pcie.html Sonnet Allegro Pro USB 3.0 PCIe USB3-PRO-4PM-E] (Chipset: Four [http://www.frescologic.com/product/single/fl1100ex/ Fresco Logic FL1100EX] controllers behind one [https://www.broadcom.com/products/pcie-switches-bridges/pcie-switches/pex8608 PLX PEX 8608] switch)<br />
* [http://www.vantecusa.com/products_detail.php?p_id=125&p_name=+4-Port+SuperSpeed+USB+3.0+PCIe+Host+Card+w%2F+Internal+20-Pin+Connector&pc_id=16&pc_name=USB&pt_id=4&pt_name=Add-on+Cards Vantec UGT-PC345 4 Port USB 3.0 PCIe w/ Internal 20 pin] (Chipset: Renesas uDP720201)<br />
* [https://www.amazon.com/gp/product/B07H4HJNJC] (monster card with 8 ports of USB 3.0) four Renesas uPD720202 chips behind ASMedia 1806, card can be found under different brands but can be identified by the look. [http://sedna-shop.com/index.php?route=product/product&path=59_74&product_id=138 This should be the same card]<br />
<br />
===Non-working===<br />
In general, USB3 host controllers based on ASMedia chipsets are known to be problematic, due to ASMedia hardware or firmware bugs causing errant DMA accesses to invalid regions of host memory.<br />
<br />
* AXAGON PCEU-43V - chipset Via VL805 - PCI id 1106:3483<br />
* StarTech PEXUSB314A2V - 2x ASM1142 host controllers and a PCIe switch<br />
* QNINE USB 3.1 Gen2 (Type-A and Type-C) - ASM1142<br />
** It's based on the the same reference design as all the other cheap ASM1142 cards, so there's a good chance those won't work either.<br />
* Rosewill RC-509 - ASM1142<br />
* Ableconn PU31-2C-2 - ASM2142<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=54 SEDNA - PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC)<br />
* [http://sedna-shop.com/index.php?route=product/product&product_id=99 SEDNA - PCIe 4 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
* [https://www.startech.com/Cards-Adapters/USB-3.0/Cards/7-port-pci-express-usb-3-card~PEXUSB3S7 StarTech PCIe 7 Port USB 3.0 Adapter Card] (Chipset: NEC uPD720201)<br />
<br />
==TV Tuners==<br />
* Hauppauge WinTV-quadHD<br />
* Hauppauge WinTV HVR-850 (2040:7240) - ATSC - using Kaffeine<br />
<br />
==Firewire Host Controllers==<br />
===Working===<br />
<br />
* [https://www.sybausa.com/index.php?route=product/product&product_id=119 Syba SY-PEX30016] (Chipset: TI XIO2213B)<br />
** Requires [https://marc.info/?l=linux1394-devel&m=157207806405627&q=mbox this patch] to work on kernels with a 64k page size.<br />
<br />
=== Unknown if working (good candidates to test) ===<br />
<br />
* [http://www.dawicontrol.com/index.php?cmd=proddet&id=media Dawicontrol DC-FW800] (Chipset: TI XIO2213B)<br />
* [https://www.delock.de/produkte/G_89210/merkmale.html?setLanguage=en DeLOCK 3x FireWire 800, Item No. 89210] (Chipset: TI XIO2213B)<br />
* [https://www.digitus.info/en/products/computer-components/computer-peripherals/serial-parallel-adapter/ds-30203-2/ DIGITUS Firewire 800 (1394b) PCIe Card] (Chipset: TI XIO2213B)<br />
* [https://www.exsys.de/index.php?page=product&info=127 Exsys EX-16415] (Chipset: TI XIO2213)<br />
* [https://www.exsys.de/index.php?page=product&info=366 Exsys EX-16512E] (Chipset: TI)<br />
* [http://www.ioi.com.tw/products/proddetail.aspx?CatID=106&DeviceID=3021&HostID=2009&ProdID=1060100 IOI Technology FWB-PCIE1X11A] (Chipset: TI XIO2213B)<br />
[[Category:Compatibility List]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Debricking_the_BMC&diff=2551Debricking the BMC2019-07-27T18:24:54Z<p>Meklort: /* Flash new BMC firmware via serial port */ Fix a typo -> of to off</p>
<hr />
<div>==Purpose==<br />
This guide explains how to debrick the BMC when the BMC has been rendered inoperable, for example due to a defective firmware update.<br />
<br />
==Applicability==<br />
All RCS [[OpenPOWER]] systems.<br />
<br />
==Overview==<br />
There are three means of debricking the BMC:<br />
<br />
* Remove the BMC SPI flash chip and reflash it with a flash programmer<br />
** Note: [https://www.flashrom.org/Flashrom flashrom] versions earlier than 1.1 do not support the BMC flash chip<br />
* Flash new BMC firmware via U-Boot TFTP (requires that U-Boot is still intact on the flash)<br />
* Flash new BMC firmware via serial port (requires proprietary BMC chip vendor tool)<br />
<br />
==Flash new BMC firmware via U-Boot TFTP==<br />
'''Note:''' While these instructions have been successfully applied in practice, they are still preliminary. Ask questions in IRC if you are unclear on what to do!<br />
<!-- Hi fellow wiki people! Ask Bdragon in IRC if you have questions about this procedure. <br />
IRC user dragon_pilot was successfully able to recover a nonworking BMC from u-boot, these instructions are the result of that experiment.<br />
Further testing and refinement would be appreciated, preferably by someone who has easy access to an external flasher.<br />
--><br />
<br />
In the event of a failure when updating the BMC, but with a functioning U-boot, you can still recover by using U-Boot to manually bootstrap the BMC by manually loading a boot image over the network or the BMC serial port.<br />
<br />
If your BMC flash is corrupted to the extent that U-Boot does not load properly, these instructions will not work; you will need to remove and reflash the BMC flash chip externally, or flash new firmware [[#Flash new BMC firmware via serial port|via serial port]].<br />
<br />
* Prepare a TFTP server, and place <code>image-bmc</code>, <code>image-rofs</code>, and <code>image-kernel</code> in the root.<br />
<br />
* Connect a serial console to the [[Talos_II/Building_FAQ#BMC_serial_port_J7701|BMC serial port]] (J7701, serial port bracket required). The serial port configuration is <tt>115200,8n1</tt>.<br />
* Disconnect and reconnect power to the machine to force a BMC restart. Press a key to interrupt auto-boot when prompted.<br />
* If you are having trouble with U-Boot resetting while you are trying to run these steps, have a slow network, or you are going to be loading over serial, you can [[Debricking the BMC/Watchdog|disable the FPGA watchdog]].<br />
* Run <code>dhcp x.x.x.x:image-bmc</code>, replacing the IP address of your TFTP server. This will load a copy of the stock boot image into RAM.<br />
* Run <code>bootm 83080000</code>. This will prepare and boot off of the loaded virtual image.<br />
* If your rofs partition is not functional, you will be dropped into the systemd emergency shell at this point. Try both the password you set as well as the default <code>0penBmc</code>, it may be one or the other depending on the state of the rwfs partition. If it boots up properly instead of dropping you into the emergency shell, the problem is probably in your kernel partition and you can retry flashing your <code>image-kernel</code> using the normal procedure. (The rest of these instructions are for the systemd emergency shell.)<br />
* <code>mount -t tmpfs none /tmp</code><br />
* run <code>udhcpc</code> to get an IP address. (TODO: verify that this is the actual command that you run. Do you have to specify the network interface too?)<br />
* <code>cd /tmp</code><br />
* <code>tftp -g -r image-rofs x.x.x.x</code><br />
* <code>tftp -g -r image-kernel x.x.x.x</code><br />
* IMPORTANT: Use <code>md5sum</code>, <code>sha1sum</code>, or <code>sha256sum</code> to verify successful transfer of image-rofs and image-kernel! tftp is a very barebones protocol and relies on transport layer checksumming, which is optional and not always available in UDP!<br />
* Verify that the output of <code>cat /sys/class/mtd/mtd3/name</code> is <code>kernel</code> and the output of <code>cat /sys/class/mtd/mtd4/name</code> is <code>rofs</code>. We will be flashing mtd partitions directly in the next step and this is the last chance to verify that they will be flashed to the correct partition.<br />
* <code>flashcp -v image-kernel /dev/mtd3</code><br />
* <code>flashcp -v image-rofs /dev/mtd4</code><br />
* (TODO: Describe how to reset rwfs in case it was damaged as well?) note: the kernel param for bypassing rwfs is "overlay-filesystem-in-ram". Append it to the existing boot-args before running the bootm command. This can also be used as part of a password reset procedure.<br />
* After the flash is complete, you can run restart the BMC and it should boot successfully.<br />
<br />
* (TODO: Discussion of using Kermit to upload the image without network access) note: I (Bdragon) have successfully done a ram-only boot using cu's built in xmodem support (escape sequence ~X) to do an image transfer into RAM over the BMC serial interface.<br />
* (TODO: Discuss using u-boot's built in cmp tool to perform basic validation of the u-boot image against a second copy loaded into RAM.)<br />
* (TODO: Load recovery images over USB?) note: The onboard USB port is connected to the USB switch after all, so this might be problematic.<br />
* (TODO: Discussion of u-boot memory map) Short version is: flash lives at 0x20000000 and default base address for the memory loading tools is 0x83000000. So add 0x63000000 to any flash address to get the eqivilent address for an image-bmc file loaded into RAM. For example, the bootable image of a loaded image-bmc is at 0x83080000.<br />
<br />
==Flash new BMC firmware via serial port==<br />
<br />
''This method was discovered by Centurion Dan as an alternative to pulling and reflashing the BMC SPI chip after a failed update had corrupted/wiped U-Boot.''<br />
<br />
Tools required:<br />
<br />
* [[Talos_II/Building_FAQ#BMC_serial_port_J7701|BMC serial port]]<br />
* An x86 computer with a serial port (usb to serial works fine) - preferably running linux.<br />
<br />
Software:<br />
* Proprietary SOC Flash Utility from [https://www.aspeedtech.com/support.php Aspeed Technology's Support Page]: at least version [http://upload.aspeedtech.com/SOC/v11800.zip 1.18.00]<br />
* BMC Firmware bundle: [[Talos_II/Firmware Firmware]] BMC [[:File:Talos_ii_openbmc_v1.07_bundle.tar.bz2| System Package 1.06 2a92dec044239591244b6ed69c3fac162a6b9ea4]]<br />
<br />
Procedure:<br />
<br />
# Unzip the SOC FLASH Utility on your other computer, and unzip the appropriate SOC Flash Utility bundle for that computer.<br />
# Extract the BMC firmware bundle.<br />
# Run the following command '''./socflash -s option=u comport="4" cs=0 if=image-u-boot gpio_b=S71 gpio_a=S70 option=f'''<br />
#* You can drop the'' '''option=f''' ''for a slower but verified write process''<br />
#* if your serial interface can handle the baudrate 921600 add the parameter:'' ''' baudrate=921600'''<br />
#* if you want to see what is going on, you can strace it by prepending:'' '''strace -e trace=open,close,read,write''' to the command above.<br />
# Be Patient: it took me about 45 minutes to complete the flash process.<br />
<br />
Notes:<br />
* ''gpio_b=S71'' and ''gpio_a=S70'' are used to turn off the fpga watchdog timer before the flash process and then re-enables it after it's completed.<br />
<br />
[[Category:Guides]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Talk:Compiling_Firmware&diff=2530Talk:Compiling Firmware2019-07-06T04:52:56Z<p>Meklort: </p>
<hr />
<div>Hello,<br />
<br />
This firmware page does not currently address Blackbird systems and, users following these instructions and not paying attention to what they are doing are in for a big surprise. I've managed to build and deploy the BMC firmware on Blackbird so can edit the instructions in regards to that but, since the instructions are so similar to TalosII, I'd like to modify the entire BMC section so it uses a $BMC_ARCH variable and actually completely deprecate the older yocto TEMPLATECONF example. These changes would only address the Blackbird BMC firmware part of the page but, I can start working on re-working the entire page to address Blackbird without disrupting TalosII if no one is currently in the process of doing it. I'm new here so I don't want to go making extensive changes to an important page without a thumbs up.<br />
<br />
Shaun<br />
<br />
<br />
----<br />
<br />
It's definitely a good idea to update everything to work with the Blackbird in addition to the Talos II. I say go for it, I don't think anyone is currently working on updating this.<br />
meklort</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Blackbird&diff=2511Blackbird2019-06-08T17:30:58Z<p>Meklort: /* Support */</p>
<hr />
<div>'''Blackbird™''' is an adaptation of [[Raptor Computing Systems|Raptor Computing Systems]]' next-generation [[POWER9|POWER9]] platform to the μATX (microATX) form factor. Focusing on the desktop use case, it is a single socket [[PowerNV]] system.<br />
<br />
== Mainboard ==<br />
<br />
[[File:Blackbird board store image.png|thumb]]<br />
<br />
=== Specifications ===<br />
<br />
{| class="wikitable sortable"<br />
! style="text-align:left;"| Mainboard Part #<br />
! style="text-align:left;"| Form Factor<br />
! style="text-align:left;"| CPU Type<br />
! style="text-align:left;"| Networking<br />
! style="text-align:left;"| Storage Controller<br />
|-<br />
|C1P9S01<br />
|MicroATX<br />
|[[POWER9|POWER9]] [[Sforza|Sforza]]<br />
|3x GbE (Broadcom [[BCM5719|BCM5719]])<br />
|4x SATA<br />
|}<br />
<br />
* MicroATX form factor.<br />
* One socket accepting a 4-core or 8-core POWER9 [[Sforza]] CPU.<br />
* Two DDR4 memory channels (ECC memory required).<br />
* Three Gigabit Ethernet ports provided by a Broadcom [[BCM5719]] chip.<br />
* Four SATA ports provided by a firmware-free Marvell [[88SE9235]] SATA chip.<br />
* 5.1 audio supporting analog and S/PDIF outputs.<br />
* HDMI output via BMC (2D framebuffer), using a firmware-free [[IT66121FN]] PHY chip.<br />
* Four USB 3.0 ports (2x rear, 2x on header for front panel) via firmware-free [[TUSB7340]] XHCI chip.<br />
* One x16 PCIe Gen4 slot.<br />
* One x8 PCIe Gen4 slot.<br />
* [[AST2500]] BMC.<br />
<br />
=== Notes ===<br />
* CPUs with more than eight cores may operate without WoF due to power regulator limitations.<br />
* CPUs with four and eight cores function normally.<br />
<br />
== Support ==<br />
* [[:File:C1P9S01_users_guide_version_1_0.pdf|C1P9S01 User's Guide For Configuration and Setup]] is the primary user manual for Blackbird<br />
* [[Blackbird/Hardware Compatibility List|Blackbird/Hardware Compatibility List]]<br />
<br />
== See also ==<br />
<br />
* [[Talos II|Talos II]] - dual socket, EATX cousin<br />
<br />
== External Links ==<br />
<br />
* [https://www.raptorcs.com/BB/ Blackbird homepage] at Raptor Computing Systems' website<br />
<br />
* https://twitter.com/RaptorCompSys/status/1048373354695208960 - a thread on twitter with various Q and A<br />
* https://www.phoronix.com/scan.php?page=news_item&px=Raptor-Blackbird-Announced<br />
* https://www.phoronix.com/scan.php?page=news_item&px=Raptor-Blackbird-Details<br />
<br />
[[Category:Raptor Computing Systems (RCS) Platforms]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Blackbird&diff=2510Blackbird2019-06-08T17:23:24Z<p>Meklort: Add link to the Blackbird users guide</p>
<hr />
<div>'''Blackbird™''' is an adaptation of [[Raptor Computing Systems|Raptor Computing Systems]]' next-generation [[POWER9|POWER9]] platform to the μATX (microATX) form factor. Focusing on the desktop use case, it is a single socket [[PowerNV]] system.<br />
<br />
== Mainboard ==<br />
<br />
[[File:Blackbird board store image.png|thumb]]<br />
<br />
=== Specifications ===<br />
<br />
{| class="wikitable sortable"<br />
! style="text-align:left;"| Mainboard Part #<br />
! style="text-align:left;"| Form Factor<br />
! style="text-align:left;"| CPU Type<br />
! style="text-align:left;"| Networking<br />
! style="text-align:left;"| Storage Controller<br />
|-<br />
|C1P9S01<br />
|MicroATX<br />
|[[POWER9|POWER9]] [[Sforza|Sforza]]<br />
|3x GbE (Broadcom [[BCM5719|BCM5719]])<br />
|4x SATA<br />
|}<br />
<br />
* MicroATX form factor.<br />
* One socket accepting a 4-core or 8-core POWER9 [[Sforza]] CPU.<br />
* Two DDR4 memory channels (ECC memory required).<br />
* Three Gigabit Ethernet ports provided by a Broadcom [[BCM5719]] chip.<br />
* Four SATA ports provided by a firmware-free Marvell [[88SE9235]] SATA chip.<br />
* 5.1 audio supporting analog and S/PDIF outputs.<br />
* HDMI output via BMC (2D framebuffer), using a firmware-free [[IT66121FN]] PHY chip.<br />
* Four USB 3.0 ports (2x rear, 2x on header for front panel) via firmware-free [[TUSB7340]] XHCI chip.<br />
* One x16 PCIe Gen4 slot.<br />
* One x8 PCIe Gen4 slot.<br />
* [[AST2500]] BMC.<br />
<br />
=== Notes ===<br />
* CPUs with more than eight cores may operate without WoF due to power regulator limitations.<br />
* CPUs with four and eight cores function normally.<br />
<br />
== Support ==<br />
* [[:File:C1P9S01_users_guide_version_1_0.pdf|C1P9S01 User's Guide For Configuration and Setup]] is the primary user manual for the Blackbird<br />
* [[Blackbird/Hardware Compatibility List|Blackbird/Hardware Compatibility List]]<br />
<br />
== See also ==<br />
<br />
* [[Talos II|Talos II]] - dual socket, EATX cousin<br />
<br />
== External Links ==<br />
<br />
* [https://www.raptorcs.com/BB/ Blackbird homepage] at Raptor Computing Systems' website<br />
<br />
* https://twitter.com/RaptorCompSys/status/1048373354695208960 - a thread on twitter with various Q and A<br />
* https://www.phoronix.com/scan.php?page=news_item&px=Raptor-Blackbird-Announced<br />
* https://www.phoronix.com/scan.php?page=news_item&px=Raptor-Blackbird-Details<br />
<br />
[[Category:Raptor Computing Systems (RCS) Platforms]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Firmware_Upstreaming&diff=2435Firmware Upstreaming2019-05-12T18:50:01Z<p>Meklort: Remove DRAM fix - upstreamed and included in 2.x firmware releases.</p>
<hr />
<div>This page should cover firmware upstreaming for Talos and other RaptorCS systems. Because it would be very useful to be able to build new firmware directly from upstream sources.<br />
<br />
== Host firmware ==<br />
=== SBE ===<br />
=== HCODE ===<br />
=== Hostboot ===<br />
* cap voltage offset when biased<br />
<br />
=== OCC ===<br />
* remove prebuilt GPU1 binary<br />
=== skiboot ===<br />
=== op-build ===<br />
* skiroot kernel config changes<br />
=== ... ===<br />
<br />
== OpenBMC firmware ==</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Firmware_Upstreaming&diff=1902Firmware Upstreaming2019-01-27T03:31:54Z<p>Meklort: Add link to upstream pull request for (mostly) equivalent dram ram</p>
<hr />
<div>This page should cover firmware upstreaming for Talos and other RaptorCS systems. Because it would be very useful to be able to build new firmware directly from upstream sources.<br />
<br />
== Host firmware ==<br />
=== SBE ===<br />
=== HCODE ===<br />
=== Hostboot ===<br />
* DRAM freq rounding fix - upstream diverged in the ps_to_freq() function [https://github.com/open-power/hostboot/pull/162 [pull request]]<br />
* cap voltage offset when biased<br />
<br />
=== OCC ===<br />
* remove prebuilt GPU1 binary<br />
=== skiboot ===<br />
=== op-build ===<br />
* skiroot kernel config changes<br />
=== ... ===<br />
<br />
== OpenBMC firmware ==</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Compiling_Firmware&diff=1891Compiling Firmware2019-01-12T18:44:30Z<p>Meklort: /* Testing the firmware */</p>
<hr />
<div>The following steps can be used to compile and update the firmware on [[Talos_II|Talos™ II]]-based solutions. It's maintained by both [[Raptor Computing Systems|Raptor CS]] and community members.<br />
<br />
== Requirements ==<br />
* At least 25GB of free hard drive space<br />
* 16GB of free RAM<br />
<br />
=== Operating System ===<br />
The build system (op-build) has been primarily tested using Debian stretch. If you are on a different operating system such as Fedora 28, a Debian chroot should be used:<br />
<pre><br />
sudo yum install debootstrap dpkg<br />
sudo debootstrap stretch debian-chroot http://httpredir.debian.org/debian<br />
sudo mount -t proc none debian-chroot/proc/<br />
sudo mount -o bind /sys/ debian-chroot/sys/<br />
sudo mount -o bind /dev/shm/ debian-chroot/dev/shm/<br />
</pre><br />
<br />
Enter the chroot and install the needed packages:<br />
<pre><br />
sudo chroot debian-chroot/<br />
apt-get install software-properties-common locales<br />
# Packages needed for PNOR builds<br />
apt-get install cscope ctags libz-dev libexpat-dev \<br />
python texinfo \<br />
build-essential g++ git bison flex unzip \<br />
libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \<br />
wget bc rsync<br />
# Packages needed for OpenBMC builds<br />
apt-get install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
</pre><br />
<br />
Create a chroot user:<br />
<pre><br />
useradd -m build-user -s /bin/bash<br />
su build-user<br />
cd<br />
</pre><br />
<br />
You can now use the chroot to build the firmware.<br />
<br />
To enter the chroot in the future, you can run the following from a regular terminal:<br />
<pre><br />
sudo chroot debian-chroot/<br />
su build-user<br />
cd<br />
</pre><br />
<br />
== Building the PNOR Firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code:<br />
<pre>git clone -b raptor-v1.05 --recursive https://scm.raptorcs.com/scm/git/talos-op-build</pre><br />
<br />
'''Note: The master branch is often in a non-functional state. The latest firmware branch (raptor-v1.05 at the time of this update) should be used instead.'''<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-op-build<br />
. op-build-env<br />
op-build talos_defconfig<br />
op-build</pre><br />
<br />
To rebuild an individual package (such as hostboot) and recreate the pnor image, the following can be run:<br />
<pre><br />
op-build hostboot-rebuild openpower-pnor-rebuild<br />
</pre><br />
<br />
=== Updating the firmware ===<br />
Copy the firmware to the BMC<br />
<pre>scp ./output/images/talos.pnor root@<talos-openbmc>:/tmp/</pre><br />
<br />
<br />
At this point, you should connect two SSH sessions to OpenBMC.<br />
In the first session, run the following to display the console during bootup:<br />
<pre>ssh -p 2200 root@<talos-openbmc></pre><br />
The console log will be useful in debugging any issues with the firmware that could occur.<br />
<br />
In the second BMC session, ensure the system is off by running obmcutil. You should see the following:<br />
<pre>ssh root@<talos-openbmc><br />
root@talos:~# obmcutil state<br />
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready<br />
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off<br />
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off<br />
</pre><br />
The CurrentHostState must be Off before continuing with the procedure.<br />
If the CurrentHostState is not Off, please turn off the machine:<br />
<pre>obmcutil chassisoff</pre><br />
<br />
==== Testing the firmware ====<br />
In order to test the firmware, a modified mboxd[https://gerrit.openbmc-project.xyz/#/c/openbmc/mboxbridge/+/14384/] binary can be used.<br />
<br />
First, mboxd must be terminated:<br />
<pre>systemctl stop mboxd</pre><br />
<br />
Next, restart mboxd with the additional -b argument:<br />
<pre>mboxd -f 64M -w 1M -b /tmp/talos.pnor</pre><br />
<br />
Finally, you can test the update pnor image by starting the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Once you've verified that everything is working, stop the machine:<br />
<pre>obmcutil poweroff</pre><br />
'''NOTE: The system must be in the off state before proceeding. This should be verified with obmcutil state as shown earlier.'''<br />
<br />
Before continuing to flash the new pnor image, the original mboxd must be started.<br />
Ctrl^C can be used to terminate mboxd. Once done, restart it using systemctl:<br />
<pre>systemctl start mboxd</pre><br />
<br />
You can now proceed with flassing the firmware.<br />
<br />
==== Flashing the firmware ====<br />
Once off, perform the update:<br />
<pre>pflash -E -p /tmp/talos.pnor</pre><br />
<br />
Start the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Note: the machine may reboot multiple times after the initial flash.<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Always upgrade PNOR and BMC together ====<br />
<br />
Many mismatched PNOR/BMC version combinations lead to weird failures.<br />
<br />
==== Try downgrading the PNOR+BMC firmware ====<br />
<br />
Firmware package 1.04 seems the most reliable at updating the SBE SEEPROM inside the POWER9 chip package.<br />
<br />
==== Always use PROC 0 socket for SBE updates ====<br />
<br />
The BMC firmware and/or FSI driver seem to either forget to update the SBE SEEPROM in the PROC1 (secondary) socket, leading to a bootup with only PROC0 active. When you get a brand new chip you need to install it in PROC0 leaving PROC1 empty, wait for the double-reboot to update the SEEPROM, and then you can move that chip to the PROC1 socket if you like.<br />
<br />
==== Try unplugging the HSF fan power during SBE update ====<br />
<br />
Not kidding about this. The BMC is insanely complicated -- it's got an entire operating system in there for some reason. It even has systemd. The BMC's systemd often gets into a funky loop restarting Hwmon over and over and over, interrupting the SBE SEEPROM reflash every time it does this. Unplugging the PROC0 HSF 4-pin connector gets it to fail hard (due to inability to read the tachometer) and stay failed so the SBE update can proceed. Ugly as this is, it's easier than trying to figure out what systemd thinks it's doing.<br />
<br />
==== SBE_MASTER_VERSION_DOWNLEVEL ====<br />
If you see the following message reported in the console, then the SBE update process did not work as expected:<br />
<pre> 16.74709|Error reported by sbe (0x2200) PLID 0x90000008<br />
16.74823| SBE Image Version Miscompare with Master Target<br />
16.74824| ModuleId 0x0d SBE_MASTER_VERSION_COMPARE<br />
16.74825| ReasonCode 0x2215 SBE_MASTER_VERSION_DOWNLEVEL<br />
16.74826| UserData1 Master Target HUID : 0x0000000000050000<br />
16.74826| UserData2 Master Target Loop Index : 0x0000000000000000</pre><br />
<br />
The machine needs to be reset to finish the update proceedure using the following:<br />
<pre>obmcutil chassisoff<br />
systemctl stop xyz.openbmc_project.State.Host.service<br />
systemctl start xyz.openbmc_project.State.Host.service<br />
obmcutil poweron</pre><br />
The update should now complete as expected.<br />
<br />
A bug report is open[https://github.com/open-power/sbe/issues/7] to track this issue.<br />
<br />
==== internal compiler error: Killed ====<br />
Building the hostboot source code requires a large amount of ram. If your machine runs out, you may see an error similar ot the following:<br />
<pre>powerpc64le-buildroot-linux-gnu-g++.br_real: internal compiler error: Killed (program cc1plus)</pre><br />
To continue you have a few options:<br />
* Reduce the number of parallel jobs being run by appending -j<num> to you build command line<br />
<pre>op-build -j4</pre><br />
* Increase the swap space<br />
* Install additional RAM<br />
<br />
== Building the OpenBMC firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code and check out the tag:<br />
<br />
git clone https://git.raptorcs.com/git/talos-openbmc<br />
cd talos-openbmc<br />
git checkout raptor-v{{CURRENT_BMC_VERSION}}<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-openbmc<br />
export TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rcs/meta-talos/conf<br />
. openbmc-env<br />
bitbake obmc-phosphor-image<br />
</pre><br />
<br />
The resulting firmware can be found in the tmp/deploy/images/talos/ directory.<br />
<br />
If <b>mboxd</b> fails to build, you may need to [https://github.com/openbmc/openbmc/issues/2780 patch mboxd.bb].<br />
<br />
=== Updating the firmware ===<br />
Once firmware has been built, the resulting kernel and rofs binaries need to be copied over to the /run/initramfs/<br />
<pre><br />
scp tmp/deploy/images/talos/image-rofs tmp/deploy/images/talos/image-kernel root@<talos-openbmc>:/run/initramfs/<br />
</pre><br />
<br />
Once the images have been transferred, reboot the BMC:<br />
<pre>root@<talos-openbmc> reboot</pre><br />
<br />
OpenBMC may take a while to reboot. Once complete, you will be able to log back in via ssh.<br />
<br />
=== BMC Recovery procedure via U-Boot ===<br />
{{:Talos_II/U-Boot_Recovery}}<br />
<br />
=== Troubleshooting ===<br />
TODO</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=User:Meklort&diff=1851User:Meklort2018-12-10T02:59:56Z<p>Meklort: </p>
<hr />
<div>Enabling SORDIMM support on the Talos II: [[User:Meklort/SORDIMM]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=User:Meklort/SORDIMM&diff=1850User:Meklort/SORDIMM2018-12-10T02:59:16Z<p>Meklort: /* Hardware Requirements */</p>
<hr />
<div>== Enabling SO-DOMM modules on the Talos II ==<br />
The Talos II supports a large number of full sized DIMMs, however, in order to check the feasibility of a smaller form factor (read: laptop), the hardware and firmware need to be able to support SO-DIMMs.<br />
<br />
[[File:Sordimm.jpg|200px|left|Talos II with SORDIMMs]]<br />
<br />
=== Hardware Requirements ===<br />
<br />
The Sofra POWER9 CPU requires registered DDR4 RAM with EC. This is relatively easy to find in the full-sized form factor, however it becomes a bit harder to find in the SO-DIMM form factor. In this case, we actually need to use SORDIMMs (note the extra R for registered).<br />
<br />
After contacting a number of vendors, I received a response from Viking Technology where they were willing to send 10x 16GB, 2666MHz SORDIMM to Digikey so that I could purchase a few sticks: https://www.digikey.com/products/en?keywords=VR9FR2G7228JBKSBD4<br />
<br />
Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Viking%20PDFs/PS9FRxx72x8xxx_Rev.E_3_7_2018_DS.pdf<br />
<br />
In order to adapt the above modules to the full sized slot, something like the following can be used: https://www.amazon.com/gp/product/B07DMNH15W/ref=oh_aui_search_detailpage?ie=UTF8&psc=1<br />
<br />
=== Software Requirements ===<br />
<br />
Before SORDIMM modules can be used, a couple of minor patches to the hostboot firmware must be made. The first patch is simply enabling hostboot to recognize that SORDIMM modules are valid.<br />
<br />
[[File:0001-Update-hostboot-to-allow-DDR4-SORDIMM-modules-to-be-_(1).patch]]<br />
<br />
<br />
Additionally, the Talos II firmware (as of 1.07) was unable to properly detect the manufacturer ID from the modules. As a quick test, I modified the hostboot firmware to treat a manufacturer id of 0 as Samsung. Once done, the RAM was detected and booted without issues.</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=User:Meklort/SORDIMM&diff=1849User:Meklort/SORDIMM2018-12-10T02:58:41Z<p>Meklort: /* Enabling SO-DOMM modules on the Talos II */</p>
<hr />
<div>== Enabling SO-DOMM modules on the Talos II ==<br />
The Talos II supports a large number of full sized DIMMs, however, in order to check the feasibility of a smaller form factor (read: laptop), the hardware and firmware need to be able to support SO-DIMMs.<br />
<br />
[[File:Sordimm.jpg|200px|left|Talos II with SORDIMMs]]<br />
<br />
=== Hardware Requirements ===<br />
<br />
The Sofra POWER9 CPU requires registered DDR4 RAM with EC. This is relatively easy to find in the full-sized form factor, however it becomes a bit harder to find in the SO-DIMM form factor. In this case, we actually need to use SORDIMMs (note the extra R for registered).<br />
<br />
After contacting a number of vendors, I received a response from Viking Technology where they were willing to send 10x 16GB, 2666MHz SORDIMM to Digikey so that I could purchase a few sticks: https://www.digikey.com/products/en?keywords=VR9FR2G7228JBKSBD4<br />
Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Viking%20PDFs/PS9FRxx72x8xxx_Rev.E_3_7_2018_DS.pdf<br />
<br />
In order to adapt the above modules to the full sized slot, something like the following can be used: https://www.amazon.com/gp/product/B07DMNH15W/ref=oh_aui_search_detailpage?ie=UTF8&psc=1<br />
<br />
=== Software Requirements ===<br />
<br />
Before SORDIMM modules can be used, a couple of minor patches to the hostboot firmware must be made. The first patch is simply enabling hostboot to recognize that SORDIMM modules are valid.<br />
<br />
[[File:0001-Update-hostboot-to-allow-DDR4-SORDIMM-modules-to-be-_(1).patch]]<br />
<br />
<br />
Additionally, the Talos II firmware (as of 1.07) was unable to properly detect the manufacturer ID from the modules. As a quick test, I modified the hostboot firmware to treat a manufacturer id of 0 as Samsung. Once done, the RAM was detected and booted without issues.</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=User:Meklort/SORDIMM&diff=1848User:Meklort/SORDIMM2018-12-10T02:58:28Z<p>Meklort: /* Software Requirements */</p>
<hr />
<div>== Enabling SO-DOMM modules on the Talos II ==<br />
The Talos II supports a large number of full sized DIMMs, however, in order to check the feasibility of a smaller form factor (read: laptop), the hardware and firmware need to be able to support SO-DIMMs.<br />
<br />
[[File:Sordimm.jpg|200px|left|Talos II with SORDIMMs]]<br />
<br />
=== Hardware Requirements ===<br />
<br />
The Sofra POWER9 CPU requires registered DDR4 RAM with EC. This is relatively easy to find in the full-sized form factor, however it becomes a bit harder to find in the SO-DIMM form factor. In this case, we actually need to use SORDIMMs (note the extra R for registered).<br />
<br />
After contacting a number of vendors, I received a response from Viking Technology where they were willing to send 10x 16GB, 2666MHz SORDIMM to Digikey so that I could purchase a few sticks: https://www.digikey.com/products/en?keywords=VR9FR2G7228JBKSBD4<br />
Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Viking%20PDFs/PS9FRxx72x8xxx_Rev.E_3_7_2018_DS.pdf<br />
<br />
In order to adapt the above modules to the full sized slot, something like the following can be used: https://www.amazon.com/gp/product/B07DMNH15W/ref=oh_aui_search_detailpage?ie=UTF8&psc=1<br />
<br />
=== Software Requirements ===<br />
<br />
Before SORDIMM modules can be used, a couple of minor patches to the hostboot firmware must be made. The first patch is simply enabling hostboot to recognize that SORDIMM modules are valid.<br />
<br />
[[File:0001-Update-hostboot-to-allow-DDR4-SORDIMM-modules-to-be-_(1).patch]]<br />
<br />
<br />
Additionally, the Talos II firmware (as of 1.07) was unable to properly deterct the manufacturer ID from the modules. As a quick test, I modified the hostboot firmware to treat a manufacturer id of 0 as Samsung. Once done, the RAM was detected and booted without issues.</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=User:Meklort/SORDIMM&diff=1847User:Meklort/SORDIMM2018-12-10T02:57:01Z<p>Meklort: /* Enabling SO-DOMM modules on the Talos II */</p>
<hr />
<div>== Enabling SO-DOMM modules on the Talos II ==<br />
The Talos II supports a large number of full sized DIMMs, however, in order to check the feasibility of a smaller form factor (read: laptop), the hardware and firmware need to be able to support SO-DIMMs.<br />
<br />
[[File:Sordimm.jpg|200px|left|Talos II with SORDIMMs]]<br />
<br />
=== Hardware Requirements ===<br />
<br />
The Sofra POWER9 CPU requires registered DDR4 RAM with EC. This is relatively easy to find in the full-sized form factor, however it becomes a bit harder to find in the SO-DIMM form factor. In this case, we actually need to use SORDIMMs (note the extra R for registered).<br />
<br />
After contacting a number of vendors, I received a response from Viking Technology where they were willing to send 10x 16GB, 2666MHz SORDIMM to Digikey so that I could purchase a few sticks: https://www.digikey.com/products/en?keywords=VR9FR2G7228JBKSBD4<br />
Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Viking%20PDFs/PS9FRxx72x8xxx_Rev.E_3_7_2018_DS.pdf<br />
<br />
In order to adapt the above modules to the full sized slot, something like the following can be used: https://www.amazon.com/gp/product/B07DMNH15W/ref=oh_aui_search_detailpage?ie=UTF8&psc=1<br />
<br />
=== Software Requirements ===<br />
<br />
Before SORDIMM modules can be used, a couple of minor patches to the hostboot firmware must be made. The first patch is simply enabling hostboot to recognize that SORDIMM modules are valid.<br />
<br />
[[File:0001-Update-hostboot-to-allow-DDR4-SORDIMM-modules-to-be-_(1).patch]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=File:Sordimm.jpg&diff=1846File:Sordimm.jpg2018-12-10T02:54:36Z<p>Meklort: Talos II using SORDIMM modules</p>
<hr />
<div>Talos II using SORDIMM modules</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=User:Meklort/SORDIMM&diff=1845User:Meklort/SORDIMM2018-12-10T02:52:23Z<p>Meklort: Link to patch</p>
<hr />
<div>== Enabling SO-DOMM modules on the Talos II ==<br />
The Talos II supports a large number of full sized DIMMs, however, in order to check the feasibility of a smaller form factor (read: laptop), the hardware and firmware need to be able to support SO-DIMMs.<br />
<br />
=== Hardware Requirements ===<br />
<br />
The Sofra POWER9 CPU requires registered DDR4 RAM with EC. This is relatively easy to find in the full-sized form factor, however it becomes a bit harder to find in the SO-DIMM form factor. In this case, we actually need to use SORDIMMs (note the extra R for registered).<br />
<br />
After contacting a number of vendors, I received a response from Viking Technology where they were willing to send 10x 16GB, 2666MHz SORDIMM to Digikey so that I could purchase a few sticks: https://www.digikey.com/products/en?keywords=VR9FR2G7228JBKSBD4<br />
Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Viking%20PDFs/PS9FRxx72x8xxx_Rev.E_3_7_2018_DS.pdf<br />
<br />
In order to adapt the above modules to the full sized slot, something like the following can be used: https://www.amazon.com/gp/product/B07DMNH15W/ref=oh_aui_search_detailpage?ie=UTF8&psc=1<br />
<br />
=== Software Requirements ===<br />
<br />
Before SORDIMM modules can be used, a couple of minor patches to the hostboot firmware must be made. The first patch is simply enabling hostboot to recognize that SORDIMM modules are valid.<br />
<br />
[[File:0001-Update-hostboot-to-allow-DDR4-SORDIMM-modules-to-be-_(1).patch]]</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=File:0001-Update-hostboot-to-allow-DDR4-SORDIMM-modules-to-be-_(1).patch&diff=1844File:0001-Update-hostboot-to-allow-DDR4-SORDIMM-modules-to-be- (1).patch2018-12-10T02:51:37Z<p>Meklort: Hostboot patch to enable SORDIMM modules</p>
<hr />
<div>Hostboot patch to enable SORDIMM modules</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=User:Meklort/SORDIMM&diff=1843User:Meklort/SORDIMM2018-12-10T02:50:53Z<p>Meklort: Initial</p>
<hr />
<div>== Enabling SO-DOMM modules on the Talos II ==<br />
The Talos II supports a large number of full sized DIMMs, however, in order to check the feasibility of a smaller form factor (read: laptop), the hardware and firmware need to be able to support SO-DIMMs.<br />
<br />
=== Hardware Requirements ===<br />
<br />
The Sofra POWER9 CPU requires registered DDR4 RAM with EC. This is relatively easy to find in the full-sized form factor, however it becomes a bit harder to find in the SO-DIMM form factor. In this case, we actually need to use SORDIMMs (note the extra R for registered).<br />
<br />
After contacting a number of vendors, I received a response from Viking Technology where they were willing to send 10x 16GB, 2666MHz SORDIMM to Digikey so that I could purchase a few sticks: https://www.digikey.com/products/en?keywords=VR9FR2G7228JBKSBD4<br />
Datasheet: https://media.digikey.com/pdf/Data%20Sheets/Viking%20PDFs/PS9FRxx72x8xxx_Rev.E_3_7_2018_DS.pdf<br />
<br />
In order to adapt the above modules to the full sized slot, something like the following can be used: https://www.amazon.com/gp/product/B07DMNH15W/ref=oh_aui_search_detailpage?ie=UTF8&psc=1<br />
<br />
=== Software Requirements ===<br />
<br />
Before SORDIMM modules can be used, a couple of minor patches to the hostboot firmware must be made. The first patch is simply enabling hostboot to recognize that SORDIMM modules are valid.</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=User:Meklort&diff=1842User:Meklort2018-12-10T02:34:13Z<p>Meklort: Initial page.</p>
<hr />
<div></div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Compiling_Firmware&diff=1696Compiling Firmware2018-09-29T17:39:08Z<p>Meklort: /* Testing the firmware */</p>
<hr />
<div>The following steps can be used to compile and update the firmware on [[Talos_II|Talos™ II]]-based solutions. It's maintained by both [[Raptor Computing Systems|Raptor CS]] and community members.<br />
<br />
== Requirements ==<br />
* At least 25GB of free hard drive space<br />
* 16GB of free RAM<br />
<br />
=== Operating System ===<br />
The build system (op-build) has been primarily tested using Debian stretch. If you are on a different operating system such as Fedora 28, a Debian chroot should be used:<br />
<pre><br />
sudo yum install debootstrap dpkg<br />
sudo debootstrap stretch debian-chroot http://httpredir.debian.org/debian<br />
sudo mount -t proc none debian-chroot/proc/<br />
sudo mount -o bind /sys/ debian-chroot/sys/<br />
sudo mount -o bind /dev/shm/ debian-chroot/dev/shm/<br />
</pre><br />
<br />
Enter the chroot and install the needed packages:<br />
<pre><br />
sudo chroot debian-chroot/<br />
apt-get install software-properties-common locales<br />
# Packages needed for PNOR builds<br />
apt-get install cscope ctags libz-dev libexpat-dev \<br />
python texinfo \<br />
build-essential g++ git bison flex unzip \<br />
libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \<br />
wget bc rsync<br />
# Packages needed for OpenBMC builds<br />
apt-get install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
</pre><br />
<br />
Create a chroot user:<br />
<pre><br />
useradd -m build-user -s /bin/bash<br />
su build-user<br />
cd<br />
</pre><br />
<br />
You can now use the chroot to build the firmware.<br />
<br />
To enter the chroot in the future, you can run the following from a regular terminal:<br />
<pre><br />
sudo chroot debian-chroot/<br />
su build-user<br />
cd<br />
</pre><br />
<br />
== Building the PNOR Firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code:<br />
<pre>git clone -b raptor-v1.05 --recursive https://scm.raptorcs.com/scm/git/talos-op-build</pre><br />
<br />
'''Note: The master branch is often in a non-functional state. The latest firmware branch (raptor-v1.05 at the time of this update) should be used instead.'''<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-op-build<br />
. op-build-env<br />
op-build talos_defconfig<br />
op-build</pre><br />
<br />
To rebuild an individual package (such as hostboot) and recreate the pnor image, the following can be run:<br />
<pre><br />
op-build hostboot-rebuild openpower-pnor-rebuild<br />
</pre><br />
<br />
=== Updating the firmware ===<br />
Copy the firmware to the BMC<br />
<pre>scp ./output/images/talos.pnor root@<talos-openbmc>:/tmp/</pre><br />
<br />
<br />
At this point, you should connect two SSH sessions to OpenBMC.<br />
In the first session, run the following to display the console during bootup:<br />
<pre>ssh -p 2200 root@<talos-openbmc></pre><br />
The console log will be useful in debugging any issues with the firmware that could occur.<br />
<br />
In the second BMC session, ensure the system is off by running obmcutil. You should see the following:<br />
<pre>ssh root@<talos-openbmc><br />
root@talos:~# obmcutil state<br />
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready<br />
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off<br />
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off<br />
</pre><br />
The CurrentHostState must be Off before continuing with the procedure.<br />
If the CurrentHostState is not Off, please turn off the machine:<br />
<pre>obmcutil chassisoff</pre><br />
<br />
==== Testing the firmware ====<br />
In order to test the firmware, a modified mboxd[https://github.com/meklort/mboxbridge/tree/feature-file-backed] binary can be used.<br />
<br />
First, mboxd must be terminated:<br />
<pre>systemctl stop mboxd</pre><br />
<br />
Next, restart mboxd with the additional -b argument:<br />
<pre>mboxd -f 64M -w 1M -b /tmp/talos.pnor</pre><br />
<br />
Finally, you can test the update pnor image by starting the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Once you've verified that everything is working, stop the machine:<br />
<pre>obmcutil poweroff</pre><br />
'''NOTE: The system must be in the off state before proceeding. This should be verified with obmcutil state as shown earlier.'''<br />
<br />
Before continuing to flash the new pnor image, the original mboxd must be started.<br />
Ctrl^C can be used to terminate mboxd. Once done, restart it using systemctl:<br />
<pre>systemctl start mboxd</pre><br />
<br />
You can now proceed with flassing the firmware.<br />
<br />
==== Flashing the firmware ====<br />
Once off, perform the update:<br />
<pre>pflash -E -p /tmp/talos.pnor</pre><br />
<br />
Start the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Note: the machine may reboot multiple times after the initial flash.<br />
<br />
=== Troubleshooting ===<br />
<br />
==== Always upgrade PNOR and BMC together ====<br />
<br />
Many mismatched PNOR/BMC version combinations lead to weird failures.<br />
<br />
==== Try downgrading the PNOR+BMC firmware ====<br />
<br />
Firmware package 1.04 seems the most reliable at updating the SBE SEEPROM inside the POWER9 chip package.<br />
<br />
==== Always use PROC 0 socket for SBE updates ====<br />
<br />
The BMC firmware and/or FSI driver seem to either forget to update the SBE SEEPROM in the PROC1 (secondary) socket, leading to a bootup with only PROC0 active. When you get a brand new chip you need to install it in PROC0 leaving PROC1 empty, wait for the double-reboot to update the SEEPROM, and then you can move that chip to the PROC1 socket if you like.<br />
<br />
==== Try unplugging the HSF fan power during SBE update ====<br />
<br />
Not kidding about this. The BMC is insanely complicated -- it's got an entire operating system in there for some reason. It even has systemd. The BMC's systemd often gets into a funky loop restarting Hwmon over and over and over, interrupting the SBE SEEPROM reflash every time it does this. Unplugging the PROC0 HSF 4-pin connector gets it to fail hard (due to inability to read the tachometer) and stay failed so the SBE update can proceed. Ugly as this is, it's easier than trying to figure out what systemd thinks it's doing.<br />
<br />
==== SBE_MASTER_VERSION_DOWNLEVEL ====<br />
If you see the following message reported in the console, then the SBE update process did not work as expected:<br />
<pre> 16.74709|Error reported by sbe (0x2200) PLID 0x90000008<br />
16.74823| SBE Image Version Miscompare with Master Target<br />
16.74824| ModuleId 0x0d SBE_MASTER_VERSION_COMPARE<br />
16.74825| ReasonCode 0x2215 SBE_MASTER_VERSION_DOWNLEVEL<br />
16.74826| UserData1 Master Target HUID : 0x0000000000050000<br />
16.74826| UserData2 Master Target Loop Index : 0x0000000000000000</pre><br />
<br />
The machine needs to be reset to finish the update proceedure using the following:<br />
<pre>obmcutil chassisoff<br />
systemctl stop xyz.openbmc_project.State.Host.service<br />
systemctl start xyz.openbmc_project.State.Host.service<br />
obmcutil poweron</pre><br />
The update should now complete as expected.<br />
<br />
A bug report is open[https://github.com/open-power/sbe/issues/7] to track this issue.<br />
<br />
==== internal compiler error: Killed ====<br />
Building the hostboot source code requires a large amount of ram. If your machine runs out, you may see an error similar ot the following:<br />
<pre>powerpc64le-buildroot-linux-gnu-g++.br_real: internal compiler error: Killed (program cc1plus)</pre><br />
To continue you have a few options:<br />
* Reduce the number of parallel jobs being run by appending -j<num> to you build command line<br />
<pre>op-build -j4</pre><br />
* Increase the swap space<br />
* Install additional RAM<br />
<br />
== Building the OpenBMC firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code and check out the tag:<br />
<br />
git clone https://git.raptorcs.com/git/talos-openbmc<br />
cd talos-openbmc<br />
git checkout raptor-v{{CURRENT_BMC_VERSION}}<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-openbmc<br />
export TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rcs/meta-talos/conf<br />
. openbmc-env<br />
bitbake obmc-phosphor-image<br />
</pre><br />
<br />
The resulting firmware can be found in the tmp/deploy/images/talos/ directory.<br />
<br />
If <b>mboxd</b> fails to build, you may need to [https://github.com/openbmc/openbmc/issues/2780 patch mboxd.bb].<br />
<br />
=== Updating the firmware ===<br />
Once firmware has been built, the resulting kernel and rofs binaries need to be copied over to the /run/initramfs/<br />
<pre><br />
scp tmp/deploy/images/talos/image-rofs tmp/deploy/images/talos/image-kernel root@<talos-openbmc>:/run/initramfs/<br />
</pre><br />
<br />
Once the images have been transferred, reboot the BMC:<br />
<pre>root@<talos-openbmc> reboot</pre><br />
<br />
OpenBMC may take a while to reboot. Once complete, you will be able to log back in via ssh.<br />
<br />
=== BMC Recovery procedure via U-Boot ===<br />
{{:Talos_II/U-Boot_Recovery}}<br />
<br />
=== Troubleshooting ===<br />
TODO</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Compiling_Firmware&diff=1565Compiling Firmware2018-09-09T00:53:55Z<p>Meklort: /* Testing the firmware */</p>
<hr />
<div>The following steps can be used to compile and update the firmware on [[Talos_II|Talos™ II]]-based solutions. It's maintained by both [[Raptor Computing Systems|Raptor CS]] and community members.<br />
<br />
== Requirements ==<br />
* At least 25GB of free hard drive space<br />
* 16GB of free RAM<br />
<br />
=== Operating System ===<br />
The build system (op-build) has been primarily tested using Debian stretch. If you are on a different operating system such as Fedora 28, a Debian chroot should be used:<br />
<pre><br />
sudo yum install debootstrap dpkg<br />
sudo debootstrap stretch debian-chroot http://httpredir.debian.org/debian<br />
sudo mount -t proc none debian-chroot/proc/<br />
sudo mount -o bind /sys/ debian-chroot/sys/<br />
sudo mount -o bind /dev/shm/ debian-chroot/dev/shm/<br />
</pre><br />
<br />
Enter the chroot and install the needed packages:<br />
<pre><br />
sudo chroot debian-chroot/<br />
apt-get install software-properties-common locales<br />
# Packages needed for PNOR builds<br />
apt-get install cscope ctags libz-dev libexpat-dev \<br />
python texinfo \<br />
build-essential g++ git bison flex unzip \<br />
libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \<br />
wget bc rsync<br />
# Packages needed for OpenBMC builds<br />
apt-get install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
</pre><br />
<br />
Create a chroot user:<br />
<pre><br />
useradd -m build-user -s /bin/bash<br />
su build-user<br />
cd<br />
</pre><br />
<br />
You can now use the chroot to build the firmware.<br />
<br />
To enter the chroot in the future, you can run the following from a regular terminal:<br />
<pre><br />
sudo chroot debian-chroot/<br />
su build-user<br />
cd<br />
</pre><br />
<br />
== Building the PNOR Firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code:<br />
<pre>git clone -b raptor-v1.05 --recursive https://scm.raptorcs.com/scm/git/talos-op-build</pre><br />
<br />
'''Note: The master branch is often in a non-functional state. The latest firmware branch (raptor-v1.05 at the time of this update) should be used instead.'''<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-op-build<br />
. op-build-env<br />
op-build talos_defconfig<br />
op-build</pre><br />
<br />
To rebuild an individual package (such as hostboot) and recreate the pnor image, the following can be run:<br />
<pre><br />
op-build hostboot-rebuild openpower-pnor-rebuild<br />
</pre><br />
<br />
=== Updating the firmware ===<br />
Copy the firmware to the BMC<br />
<pre>scp ./output/images/talos.pnor root@<talos-openbmc>:/tmp/</pre><br />
<br />
<br />
At this point, you should connect two SSH sessions to OpenBMC.<br />
In the first session, run the following to display the console during bootup:<br />
<pre>ssh -p 2200 root@<talos-openbmc></pre><br />
The console log will be useful in debugging any issues with the firmware that could occur.<br />
<br />
In the second BMC session, ensure the system is off by running obmcutil. You should see the following:<br />
<pre>ssh root@<talos-openbmc><br />
root@talos:~# obmcutil state<br />
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready<br />
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off<br />
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off<br />
</pre><br />
The CurrentHostState must be Off before continuing with the procedure.<br />
If the CurrentHostState is not Off, please turn off the machine:<br />
<pre>obmcutil chassisoff</pre><br />
<br />
==== Testing the firmware ====<br />
In order to test the firmware, a modified mboxd[https://github.com/openbmc/mboxbridge/pull/1] binary can be used.<br />
<br />
First, mboxd must be terminated:<br />
<pre>systemctl stop mboxd</pre><br />
<br />
Next, restart mboxd with the additional -i argument:<br />
<pre>mboxd -f 64M -w 1M -i /tmp/talos.pnor</pre><br />
<br />
Finally, you can test the update pnor image by starting the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Once you've verified that everything is working, stop the machine:<br />
<pre>obmcutil poweroff</pre><br />
'''NOTE: The system must be in the off state before proceeding. This should be verified with obmcutil state as shown earlier.'''<br />
<br />
Before continuing to flash the new pnor image, the original mboxd must be started.<br />
Ctrl^C can be used to terminate mboxd. Once done, restart it using systemctl:<br />
<pre>systemctl start mboxd</pre><br />
<br />
You can now proceed with flassing the firmware.<br />
<br />
==== Flashing the firmware ====<br />
Once off, perform the update:<br />
<pre>pflash -E -p /tmp/talos.pnor</pre><br />
<br />
Start the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Note: the machine may reboot multiple times after the initial flash.<br />
<br />
=== Troubleshooting ===<br />
==== SBE_MASTER_VERSION_DOWNLEVEL ====<br />
If you see the following message reported in the console, then the SBE update process did not work as expected:<br />
<pre> 16.74709|Error reported by sbe (0x2200) PLID 0x90000008<br />
16.74823| SBE Image Version Miscompare with Master Target<br />
16.74824| ModuleId 0x0d SBE_MASTER_VERSION_COMPARE<br />
16.74825| ReasonCode 0x2215 SBE_MASTER_VERSION_DOWNLEVEL<br />
16.74826| UserData1 Master Target HUID : 0x0000000000050000<br />
16.74826| UserData2 Master Target Loop Index : 0x0000000000000000</pre><br />
<br />
The machine needs to be reset to finish the update proceedure using the following:<br />
<pre>obmcutil chassisoff<br />
systemctl stop xyz.openbmc_project.State.Host.service<br />
systemctl start xyz.openbmc_project.State.Host.service<br />
obmcutil poweron</pre><br />
The update should now complete as expected.<br />
<br />
A bug report is open[https://github.com/open-power/sbe/issues/7] to track this issue.<br />
<br />
==== internal compiler error: Killed ====<br />
Building the hostboot source code requires a large amount of ram. If your machine runs out, you may see an error similar ot the following:<br />
<pre>powerpc64le-buildroot-linux-gnu-g++.br_real: internal compiler error: Killed (program cc1plus)</pre><br />
To continue you have a few options:<br />
* Reduce the number of parallel jobs being run by appending -j<num> to you build command line<br />
<pre>op-build -j4</pre><br />
* Increase the swap space<br />
* Install additional RAM<br />
<br />
== Building the OpenBMC firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code and check out the tag:<br />
<br />
git clone https://git.raptorcs.com/git/talos-openbmc<br />
cd talos-openbmc<br />
git checkout raptor-v{{CURRENT_BMC_VERSION}}<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-openbmc<br />
export TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rcs/meta-talos/conf<br />
. openbmc-env<br />
bitbake obmc-phosphor-image<br />
</pre><br />
<br />
The resulting firmware can be found in the tmp/deploy/images/talos/ directory.<br />
<br />
If <b>mboxd</b> fails to build, you may need to [https://github.com/openbmc/openbmc/issues/2780 patch mboxd.bb].<br />
<br />
=== Updating the firmware ===<br />
Once firmware has been built, the resulting kernel and rofs binaries need to be copied over to the /run/initramfs/<br />
<pre><br />
scp tmp/deploy/images/talos/image-rofs tmp/deploy/images/talos/image-kernel root@<talos-openbmc>:/run/initramfs/<br />
</pre><br />
<br />
Once the images have been transferred, reboot the BMC:<br />
<pre>root@<talos-openbmc> reboot</pre><br />
<br />
OpenBMC may take a while to reboot. Once complete, you will be able to log back in via ssh.<br />
<br />
=== BMC Recovery procedure via U-Boot ===<br />
{{:Talos_II/U-Boot_Recovery}}<br />
<br />
=== Troubleshooting ===<br />
TODO</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Compiling_Firmware&diff=1564Compiling Firmware2018-09-08T23:55:06Z<p>Meklort: /* Updating the firmware */</p>
<hr />
<div>The following steps can be used to compile and update the firmware on [[Talos_II|Talos™ II]]-based solutions. It's maintained by both [[Raptor Computing Systems|Raptor CS]] and community members.<br />
<br />
== Requirements ==<br />
* At least 25GB of free hard drive space<br />
* 16GB of free RAM<br />
<br />
=== Operating System ===<br />
The build system (op-build) has been primarily tested using Debian stretch. If you are on a different operating system such as Fedora 28, a Debian chroot should be used:<br />
<pre><br />
sudo yum install debootstrap dpkg<br />
sudo debootstrap stretch debian-chroot http://httpredir.debian.org/debian<br />
sudo mount -t proc none debian-chroot/proc/<br />
sudo mount -o bind /sys/ debian-chroot/sys/<br />
sudo mount -o bind /dev/shm/ debian-chroot/dev/shm/<br />
</pre><br />
<br />
Enter the chroot and install the needed packages:<br />
<pre><br />
sudo chroot debian-chroot/<br />
apt-get install software-properties-common locales<br />
# Packages needed for PNOR builds<br />
apt-get install cscope ctags libz-dev libexpat-dev \<br />
python texinfo \<br />
build-essential g++ git bison flex unzip \<br />
libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \<br />
wget bc rsync<br />
# Packages needed for OpenBMC builds<br />
apt-get install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
</pre><br />
<br />
Create a chroot user:<br />
<pre><br />
useradd -m build-user -s /bin/bash<br />
su build-user<br />
cd<br />
</pre><br />
<br />
You can now use the chroot to build the firmware.<br />
<br />
To enter the chroot in the future, you can run the following from a regular terminal:<br />
<pre><br />
sudo chroot debian-chroot/<br />
su build-user<br />
cd<br />
</pre><br />
<br />
== Building the PNOR Firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code:<br />
<pre>git clone -b raptor-v1.05 --recursive https://scm.raptorcs.com/scm/git/talos-op-build</pre><br />
<br />
'''Note: The master branch is often in a non-functional state. The latest firmware branch (raptor-v1.05 at the time of this update) should be used instead.'''<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-op-build<br />
. op-build-env<br />
op-build talos_defconfig<br />
op-build</pre><br />
<br />
To rebuild an individual package (such as hostboot) and recreate the pnor image, the following can be run:<br />
<pre><br />
op-build hostboot-rebuild openpower-pnor-rebuild<br />
</pre><br />
<br />
=== Updating the firmware ===<br />
Copy the firmware to the BMC<br />
<pre>scp ./output/images/talos.pnor root@<talos-openbmc>:/tmp/</pre><br />
<br />
<br />
At this point, you should connect two SSH sessions to OpenBMC.<br />
In the first session, run the following to display the console during bootup:<br />
<pre>ssh -p 2200 root@<talos-openbmc></pre><br />
The console log will be useful in debugging any issues with the firmware that could occur.<br />
<br />
In the second BMC session, ensure the system is off by running obmcutil. You should see the following:<br />
<pre>ssh root@<talos-openbmc><br />
root@talos:~# obmcutil state<br />
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready<br />
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off<br />
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off<br />
</pre><br />
The CurrentHostState must be Off before continuing with the procedure.<br />
If the CurrentHostState is not Off, please turn off the machine:<br />
<pre>obmcutil chassisoff</pre><br />
<br />
==== Testing the firmware ====<br />
In order to test the firmware, a modified mboxd[https://paste.pound-python.org/show/DXkAsrtMC0P33DgeLa3c/] binary can be used.<br />
<br />
First, mboxd must be terminated:<br />
<pre>systemctl stop mboxd</pre><br />
<br />
Next, restart mboxd with the additional -i argument:<br />
<pre>mboxd -f 64M -w 1M -i /tmp/talos.pnor</pre><br />
<br />
Finally, you can test the update pnor image by starting the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Once you've verified that everything is working, stop the machine:<br />
<pre>obmcutil poweroff</pre><br />
'''NOTE: The system must be in the off state before proceeding. This should be verified with obmcutil state as shown earlier.'''<br />
<br />
Before continuing to flash the new pnor image, the original mboxd must be started.<br />
Ctrl^C can be used to terminate mboxd. Once done, restart it using systemctl:<br />
<pre>systemctl start mboxd</pre><br />
<br />
You can now proceed with flassing the firmware.<br />
<br />
==== Flashing the firmware ====<br />
Once off, perform the update:<br />
<pre>pflash -E -p /tmp/talos.pnor</pre><br />
<br />
Start the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Note: the machine may reboot multiple times after the initial flash.<br />
<br />
=== Troubleshooting ===<br />
==== SBE_MASTER_VERSION_DOWNLEVEL ====<br />
If you see the following message reported in the console, then the SBE update process did not work as expected:<br />
<pre> 16.74709|Error reported by sbe (0x2200) PLID 0x90000008<br />
16.74823| SBE Image Version Miscompare with Master Target<br />
16.74824| ModuleId 0x0d SBE_MASTER_VERSION_COMPARE<br />
16.74825| ReasonCode 0x2215 SBE_MASTER_VERSION_DOWNLEVEL<br />
16.74826| UserData1 Master Target HUID : 0x0000000000050000<br />
16.74826| UserData2 Master Target Loop Index : 0x0000000000000000</pre><br />
<br />
The machine needs to be reset to finish the update proceedure using the following:<br />
<pre>obmcutil chassisoff<br />
systemctl stop xyz.openbmc_project.State.Host.service<br />
systemctl start xyz.openbmc_project.State.Host.service<br />
obmcutil poweron</pre><br />
The update should now complete as expected.<br />
<br />
A bug report is open[https://github.com/open-power/sbe/issues/7] to track this issue.<br />
<br />
==== internal compiler error: Killed ====<br />
Building the hostboot source code requires a large amount of ram. If your machine runs out, you may see an error similar ot the following:<br />
<pre>powerpc64le-buildroot-linux-gnu-g++.br_real: internal compiler error: Killed (program cc1plus)</pre><br />
To continue you have a few options:<br />
* Reduce the number of parallel jobs being run by appending -j<num> to you build command line<br />
<pre>op-build -j4</pre><br />
* Increase the swap space<br />
* Install additional RAM<br />
<br />
== Building the OpenBMC firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code and check out the tag:<br />
<br />
git clone https://git.raptorcs.com/git/talos-openbmc<br />
cd talos-openbmc<br />
git checkout raptor-v{{CURRENT_BMC_VERSION}}<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-openbmc<br />
export TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rcs/meta-talos/conf<br />
. openbmc-env<br />
bitbake obmc-phosphor-image<br />
</pre><br />
<br />
The resulting firmware can be found in the tmp/deploy/images/talos/ directory.<br />
<br />
If <b>mboxd</b> fails to build, you may need to [https://github.com/openbmc/openbmc/issues/2780 patch mboxd.bb].<br />
<br />
=== Updating the firmware ===<br />
Once firmware has been built, the resulting kernel and rofs binaries need to be copied over to the /run/initramfs/<br />
<pre><br />
scp tmp/deploy/images/talos/image-rofs tmp/deploy/images/talos/image-kernel root@<talos-openbmc>:/run/initramfs/<br />
</pre><br />
<br />
Once the images have been transferred, reboot the BMC:<br />
<pre>root@<talos-openbmc> reboot</pre><br />
<br />
OpenBMC may take a while to reboot. Once complete, you will be able to log back in via ssh.<br />
<br />
=== BMC Recovery procedure via U-Boot ===<br />
{{:Talos_II/U-Boot_Recovery}}<br />
<br />
=== Troubleshooting ===<br />
TODO</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Template:CURRENT_BMC_VERSION&diff=1487Template:CURRENT BMC VERSION2018-08-26T19:49:45Z<p>Meklort: </p>
<hr />
<div>1.07</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Compiling_Firmware&diff=1486Compiling Firmware2018-08-26T19:45:42Z<p>Meklort: /* Grabbing the sources */</p>
<hr />
<div>The following steps can be used to compile and update the firmware on [[Talos_II|Talos™ II]]-based solutions. It's maintained by both [[Raptor Computing Systems|Raptor CS]] and community members.<br />
<br />
== Requirements ==<br />
* At least 25GB of free hard drive space<br />
* 16GB of free RAM<br />
<br />
=== Operating System ===<br />
The build system (op-build) has been primarily tested using Debian stretch. If you are on a different operating system such as Fedora 28, a Debian chroot should be used:<br />
<pre><br />
sudo yum install debootstrap dpkg<br />
sudo debootstrap stretch debian-chroot http://httpredir.debian.org/debian<br />
sudo mount -t proc none debian-chroot/proc/<br />
sudo mount -o bind /sys/ debian-chroot/sys/<br />
sudo mount -o bind /dev/shm/ debian-chroot/dev/shm/<br />
</pre><br />
<br />
Enter the chroot and install the needed packages:<br />
<pre><br />
sudo chroot debian-chroot/<br />
apt-get install software-properties-common locales<br />
# Packages needed for PNOR builds<br />
apt-get install cscope ctags libz-dev libexpat-dev \<br />
python texinfo \<br />
build-essential g++ git bison flex unzip \<br />
libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \<br />
wget bc rsync<br />
# Packages needed for OpenBMC builds<br />
apt-get install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
</pre><br />
<br />
Create a chroot user:<br />
<pre><br />
useradd -m build-user -s /bin/bash<br />
su build-user<br />
cd<br />
</pre><br />
<br />
You can now use the chroot to build the firmware.<br />
<br />
To enter the chroot in the future, you can run the following from a regular terminal:<br />
<pre><br />
sudo chroot debian-chroot/<br />
su build-user<br />
cd<br />
</pre><br />
<br />
== Building the PNOR Firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code:<br />
<pre>git clone -b raptor-v1.05 --recursive https://scm.raptorcs.com/scm/git/talos-op-build</pre><br />
<br />
'''Note: The master branch is often in a non-functional state. The latest firmware branch (raptor-v1.05 at the time of this update) should be used instead.'''<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-op-build<br />
. op-build-env<br />
op-build talos_defconfig<br />
op-build</pre><br />
<br />
To rebuild an individual package (such as hostboot) and recreate the pnor image, the following can be run:<br />
<pre><br />
op-build hostboot-rebuild openpower-pnor-rebuild<br />
</pre><br />
<br />
=== Updating the firmware ===<br />
Copy the firmware to the BMC<br />
<pre>scp ./output/images/talos.pnor root@<talos-openbmc>:/tmp/</pre><br />
<br />
<br />
At this point, you should connect two SSH sessions to OpenBMC.<br />
In the first session, run the following to display the console during bootup:<br />
<pre>ssh -p 2200 root@<talos-openbmc></pre><br />
The console log will be useful in debugging any issues with the firmware that could occur.<br />
<br />
In the second BMC session, ensure the system is off by running obmcutil. You should see the following:<br />
<pre>ssh root@<talos-openbmc><br />
root@talos:~# obmcutil state<br />
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready<br />
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off<br />
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off<br />
</pre><br />
The CurrentHostState must be Off before continuing with the procedure.<br />
If the CurrentHostState is not Off, please turn off the machine:<br />
<pre>obmcutil chassisoff</pre><br />
<br />
Once off, perform the update:<br />
<pre>pflash -E -p /tmp/talos.pnor</pre><br />
<br />
Start the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Note: the machine may reboot multiple times after the initial flash.<br />
<br />
=== Troubleshooting ===<br />
==== SBE_MASTER_VERSION_DOWNLEVEL ====<br />
If you see the following message reported in the console, then the SBE update process did not work as expected:<br />
<pre> 16.74709|Error reported by sbe (0x2200) PLID 0x90000008<br />
16.74823| SBE Image Version Miscompare with Master Target<br />
16.74824| ModuleId 0x0d SBE_MASTER_VERSION_COMPARE<br />
16.74825| ReasonCode 0x2215 SBE_MASTER_VERSION_DOWNLEVEL<br />
16.74826| UserData1 Master Target HUID : 0x0000000000050000<br />
16.74826| UserData2 Master Target Loop Index : 0x0000000000000000</pre><br />
<br />
The machine needs to be reset to finish the update proceedure using the following:<br />
<pre>obmcutil chassisoff<br />
systemctl stop xyz.openbmc_project.State.Host.service<br />
systemctl start xyz.openbmc_project.State.Host.service<br />
obmcutil poweron</pre><br />
The update should now complete as expected.<br />
<br />
A bug report is open[https://github.com/open-power/sbe/issues/7] to track this issue.<br />
<br />
==== internal compiler error: Killed ====<br />
Building the hostboot source code requires a large amount of ram. If your machine runs out, you may see an error similar ot the following:<br />
<pre>powerpc64le-buildroot-linux-gnu-g++.br_real: internal compiler error: Killed (program cc1plus)</pre><br />
To continue you have a few options:<br />
* Reduce the number of parallel jobs being run by appending -j<num> to you build command line<br />
<pre>op-build -j4</pre><br />
* Increase the swap space<br />
* Install additional RAM<br />
<br />
== Building the OpenBMC firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code and check out the tag:<br />
<br />
git clone https://git.raptorcs.com/git/talos-openbmc<br />
cd talos-openbmc<br />
git checkout raptor-v{{CURRENT_BMC_VERSION}}<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-openbmc<br />
export TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rcs/meta-talos/conf<br />
. openbmc-env<br />
bitbake obmc-phosphor-image<br />
</pre><br />
<br />
The resulting firmware can be found in the tmp/deploy/images/talos/ directory.<br />
<br />
=== Updating the firmware ===<br />
Once firmware has been built, the resulting kernel and rofs binaries need to be copied over to the /run/initramfs/<br />
<pre><br />
scp tmp/deploy/images/talos/image-rofs tmp/deploy/images/talos/image-kernel root@<talos-openbmc>:/run/initramfs/<br />
</pre><br />
<br />
Once the images have been transferred, reboot the BMC:<br />
<pre>root@<talos-openbmc> reboot</pre><br />
<br />
OpenBMC may take a while to reboot. Once complete, you will be able to log back in via ssh.<br />
<br />
=== BMC Recovery procedure via U-Boot ===<br />
While these instructions have been successfully applied in practice, they are still preliminary. Ask questions in IRC if you are unclear on what to do!<br />
<!-- Hi fellow wiki people! Ask Bdragon in IRC if you have questions about this procedure. <br />
IRC user dragon_pilot was successfully able to recover a nonworking BMC from u-boot, these instructions are the result of that experiment.<br />
Further testing and refinement would be appreciated, preferably by someone who has easy access to an external flasher.<br />
--><br />
<br />
In the event of a failure updating the BMC, but with a functioning u-boot, you can still recover by using U-Boot to manually bootstrap the BMC by manually loading a boot image over the network or BMC serial line.<br />
<br />
If your BMC flash is corrupted to the extent that U-Boot is not loading properly, you '''WILL''' need to remove and flash the BMC flash chip externally.<br />
<br />
* Prepare a TFTP server, and place <code>image-bmc</code>, <code>image-rofs</code>, and <code>image-kernel</code> in the root. (TODO: elaborate on how to set this up)<br />
<br />
* Connect a serial console to the [[Talos_II/Building_FAQ#BMC_serial_port_J7701|BMC serial port]] (J7701, serial port bracket required) and set to 115200 8n1, disable RTS/CTS (hardware flow control).<br />
* Disconnect and reconnect power to the machine to force a BMC restart. Press a key to interrupt auto-boot when prompted.<br />
* Run <code>dhcp x.x.x.x:image-bmc</code>, replacing the IP address of your TFTP server. This will load a copy of the stock boot image into RAM.<br />
* Run <code>bootm 83080000</code>. This will prepare and boot off of the loaded virtual image.<br />
* If your rofs partition is not functional, you will be dropped into the systemd emergency shell at this point. Try both the password you set as well as the default <code>0penBmc</code>, it may be one or the other depending on the state of the rwfs partition. If it boots up properly instead of dropping you into the emergency shell, the problem is probably in your kernel partition and you can retry flashing your <code>image-kernel</code> using the normal procedure. (The rest of these instructions are for the systemd emergency shell.)<br />
* <code>mount -t tmpfs none /tmp</code><br />
* run <code>udhcpc</code> to get an IP address. (TODO: verify that this is the actual command that you run. Do you have to specify the network interface too?)<br />
* <code>cd /tmp</code><br />
* <code>tftp -g -r image-rofs x.x.x.x</code><br />
* <code>tftp -g -r image-kernel x.x.x.x</code><br />
* IMPORTANT: Use <code>md5sum</code>, <code>sha1sum</code>, or <code>sha256sum</code> to verify successful transfer of image-rofs and image-kernel! tftp is a very barebones protocol and relies on transport layer checksumming, which is optional and not always available in UDP!<br />
* Verify that the output of <code>cat /sys/class/mtd/mtd3/name</code> is <code>kernel</code> and the output of <code>cat /sys/class/mtd/mtd4/name</code> is <code>rofs</code>. We will be flashing mtd partitions directly in the next step and this is the last chance to verify that they will be flashed to the correct partition.<br />
* <code>flashcp -v image-kernel /dev/mtd3</code><br />
* <code>flashcp -v image-rofs /dev/mtd4</code><br />
* (TODO: Describe how to reset rwfs in case it was damaged as well?) note: the kernel param for bypassing rwfs is "overlay-filesystem-in-ram". Append it to the existing boot-args before running the bootm command. This can also be used as part of a password reset procedure.<br />
* After the flash is complete, you can run restart the BMC and it should boot successfully.<br />
<br />
* (TODO: Discussion of using Kermit to upload the image without network access) note: I (Bdragon) have successfully done a ram-only boot using cu's built in xmodem support (escape sequence ~X) to do an image transfer into RAM over the BMC serial interface.<br />
* (TODO: Discuss using u-boot's built in cmp tool to perform basic validation of the u-boot image against a second copy loaded into RAM.)<br />
* (TODO: Write a u-boot standalone application to disable the AST watchdog, and write instructions for loading and executing it from the u-boot shell (the "go" command), to work around the cold-boot watchdog issue.)<br />
* (TODO: Load recovery images over USB?) note: The onboard USB port is connected to the USB switch after all, so this might be problematic.<br />
* (TODO: Discussion of u-boot memory map) Short version is: flash lives at 0x20000000 and default base address for the memory loading tools is 0x83000000. So add 0x63000000 to any flash address to get the eqivilent address for an image-bmc file loaded into RAM. For example, the bootable image of a loaded image-bmc is at 0x83080000.<br />
<br />
=== Troubleshooting ===<br />
TODO</div>Meklorthttps://wiki.raptorcs.com/w/index.php?title=Compiling_Firmware&diff=1118Compiling Firmware2018-07-08T21:47:45Z<p>Meklort: /* Operating System */</p>
<hr />
<div>The following steps can be used to compile and update the firmware on [[Talos_II|Talos™ II]]-based solutions. It's maintained by both [[Raptor Computing Systems|Raptor CS]] and community members.<br />
<br />
== Requirements ==<br />
* At least 25GB of free hard drive space<br />
* 16GB of free RAM<br />
<br />
=== Operating System ===<br />
The build system (op-build) has been primarily tested using Debian stretch. If you are on a different operating system such as Fedora 28, a Debian chroot should be used:<br />
<pre><br />
sudo yum install debootstrap dpkg<br />
sudo debootstrap stretch debian-chroot http://httpredir.debian.org/debian<br />
sudo mount -t proc none debian-chroot/proc/<br />
sudo mount -o bind /sys/ debian-chroot/sys/<br />
sudo mount -o bind /dev/shm/ debian-chroot/dev/shm/<br />
</pre><br />
<br />
Enter the chroot and install the needed packages:<br />
<pre><br />
sudo chroot debian-chroot/<br />
apt-get install software-properties-common locales<br />
# Packages needed for PNOR builds<br />
apt-get install cscope ctags libz-dev libexpat-dev \<br />
python texinfo \<br />
build-essential g++ git bison flex unzip \<br />
libssl-dev libxml-simple-perl libxml-sax-perl libxml2-dev libxml2-utils xsltproc \<br />
wget bc rsync<br />
# Packages needed for OpenBMC builds<br />
apt-get install git build-essential libsdl1.2-dev texinfo gawk chrpath diffstat<br />
</pre><br />
<br />
Create a chroot user:<br />
<pre><br />
useradd -m build-user -s /bin/bash<br />
su build-user<br />
cd<br />
</pre><br />
<br />
You can now use the chroot to build the firmware.<br />
<br />
To enter the chroot in the future, you can run the following from a regular terminal:<br />
<pre><br />
sudo chroot debian-chroot/<br />
su build-user<br />
cd<br />
</pre><br />
<br />
== Building the PNOR Firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code:<br />
<pre>git clone --recursive https://scm.raptorcs.com/scm/git/talos-op-build</pre><br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-op-build<br />
. op-build-env<br />
op-build talos_defconfig<br />
op-build</pre><br />
<br />
To rebuild an individual package (such as hostboot) and recreate the pnor image, the following can be run:<br />
<pre><br />
op-build hostboot-rebuild openpower-pnor-rebuild<br />
</pre><br />
<br />
=== Updating the firmware ===<br />
Copy the firmware to the BMC<br />
<pre>scp ./output/images/talos.pnor root@<talos-openbmc>:/tmp/</pre><br />
<br />
<br />
At this point, you should connect two SSH sessions to OpenBMC.<br />
In the first session, run the following to display the console during bootup:<br />
<pre>ssh -p 2200 root@<talos-openbmc></pre><br />
The console log will be useful in debugging any issues with the firmware that could occur.<br />
<br />
In the second BMC session, ensure the system is off by running obmcutil. You should see the following:<br />
<pre>ssh root@<talos-openbmc><br />
root@talos:~# obmcutil state<br />
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready<br />
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off<br />
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off<br />
</pre><br />
The CurrentHostState must be Off before continuing with the procedure.<br />
If the CurrentHostState is not Off, please turn off the machine:<br />
<pre>obmcutil chassisoff</pre><br />
<br />
Once off, perform the update:<br />
<pre>pflash -E -p /tmp/talos.pnor</pre><br />
<br />
Start the machine:<br />
<pre>obmcutil poweron</pre><br />
<br />
Note: the machine may reboot multiple times after the initial flash.<br />
<br />
=== Troubleshooting ===<br />
==== SBE_MASTER_VERSION_DOWNLEVEL ====<br />
If you see the following message reported in the console, then the SBE update process did not work as expected:<br />
<pre> 16.74709|Error reported by sbe (0x2200) PLID 0x90000008<br />
16.74823| SBE Image Version Miscompare with Master Target<br />
16.74824| ModuleId 0x0d SBE_MASTER_VERSION_COMPARE<br />
16.74825| ReasonCode 0x2215 SBE_MASTER_VERSION_DOWNLEVEL<br />
16.74826| UserData1 Master Target HUID : 0x0000000000050000<br />
16.74826| UserData2 Master Target Loop Index : 0x0000000000000000</pre><br />
<br />
The machine needs to be reset to finish the update proceedure using the following:<br />
<pre>obmcutil chassisoff<br />
systemctl stop xyz.openbmc_project.State.Host.service<br />
systemctl start xyz.openbmc_project.State.Host.service<br />
obmcutil poweron</pre><br />
The update should now complete as expected.<br />
<br />
A bug report is open[https://github.com/open-power/sbe/issues/7] to track this issue.<br />
<br />
==== internal compiler error: Killed ====<br />
Building the hostboot source code requires a large amount of ram. If your machine runs out, you may see an error similar ot the following:<br />
<pre>powerpc64le-buildroot-linux-gnu-g++.br_real: internal compiler error: Killed (program cc1plus)</pre><br />
To continue you have a few options:<br />
* Reduce the number of parallel jobs being run by appending -j<num> to you build command line<br />
<pre>op-build -j4</pre><br />
* Increase the swap space<br />
* Install additional RAM<br />
<br />
== Building the OpenBMC firmware ==<br />
=== Grabbing the sources ===<br />
[[Raptor Computing Systems|Raptor CS]] maintains a public git repository containing the complete source code for the firmware.<br />
To download the source code and check out the tag:<br />
<br />
git clone https://git.raptorcs.com/git/talos-openbmc<br />
cd talos-openbmc<br />
git checkout raptor-v{{CURRENT_BMC_VERSION}}<br />
<br />
=== Building the firmware ===<br />
Before building the firmware, all needed support packages must be installed. Please see the README.md file for directions on installing the needed packages.<br />
<br />
Once the packages are installed, the firmware can be build using the following commands:<br />
<pre>cd talos-openbmc<br />
export TEMPLATECONF=meta-openbmc-machines/meta-openpower/meta-rcs/meta-talos/conf<br />
. openbmc-env<br />
bitbake obmc-phosphor-image<br />
</pre><br />
<br />
The resulting firmware can be found in the tmp/deploy/images/talos/ directory.<br />
<br />
=== Updating the firmware ===<br />
Once firmware has been built, the resulting kernel and rofs binaries need to be copied over to the /run/initramfs/<br />
<pre><br />
scp tmp/deploy/images/talos/image-rofs tmp/deploy/images/talos/image-kernel root@<talos-openbmc>:/run/initramfs/<br />
</pre><br />
<br />
Once the images have been transferred, reboot the BMC:<br />
<pre>root@<talos-openbmc> reboot</pre><br />
<br />
OpenBMC may take a while to reboot. Once complete, you will be able to log back in via ssh.<br />
<br />
=== BMC Recovery procedure via U-Boot ===<br />
While these instructions have been successfully applied in practice, they are still preliminary. Ask questions in IRC if you are unclear on what to do!<br />
<!-- Hi fellow wiki people! Ask Bdragon in IRC if you have questions about this procedure. <br />
IRC user dragon_pilot was successfully able to recover a nonworking BMC from u-boot, these instructions are the result of that experiment.<br />
Further testing and refinement would be appreciated, preferably by someone who has easy access to an external flasher.<br />
--><br />
<br />
In the event of a failure updating the BMC, but with a functioning u-boot, you can still recover by using U-Boot to manually bootstrap the BMC by manually loading a boot image over the network or BMC serial line.<br />
<br />
If your BMC flash is corrupted to the extent that U-Boot is not loading properly, you '''WILL''' need to remove and flash the BMC flash chip externally.<br />
<br />
* Prepare a TFTP server, and place <code>image-bmc</code>, <code>image-rofs</code>, and <code>image-kernel</code> in the root. (TODO: elaborate on how to set this up)<br />
<br />
* Connect a serial console to the [[Talos_II/Building_FAQ#BMC_serial_port_J7701|BMC serial port]] (J7701, serial port bracket required) and set to 115200 8n1, disable RTS/CTS (hardware flow control).<br />
* Disconnect and reconnect power to the machine to force a BMC restart. Press a key to interrupt auto-boot when prompted.<br />
* Run <code>dhcp x.x.x.x:image-bmc</code>, replacing the IP address of your TFTP server. This will load a copy of the stock boot image into RAM.<br />
* Run <code>bootm 83080000</code>. This will prepare and boot off of the loaded virtual image.<br />
* If your rofs partition is not functional, you will be dropped into the systemd emergency shell at this point. Try both the password you set as well as the default <code>0penBmc</code>, it may be one or the other depending on the state of the rwfs partition. If it boots up properly instead of dropping you into the emergency shell, the problem is probably in your kernel partition and you can retry flashing your <code>image-kernel</code> using the normal procedure. (The rest of these instructions are for the systemd emergency shell.)<br />
* <code>mount -t tmpfs none /tmp</code><br />
* run <code>udhcpc</code> to get an IP address. (TODO: verify that this is the actual command that you run. Do you have to specify the network interface too?)<br />
* <code>cd /tmp</code><br />
* <code>tftp -g -r image-rofs x.x.x.x</code><br />
* <code>tftp -g -r image-kernel x.x.x.x</code><br />
* IMPORTANT: Use <code>md5sum</code>, <code>sha1sum</code>, or <code>sha256sum</code> to verify successful transfer of image-rofs and image-kernel! tftp is a very barebones protocol and relies on transport layer checksumming, which is optional and not always available in UDP!<br />
* Verify that the output of <code>cat /sys/class/mtd/mtd3/name</code> is <code>kernel</code> and the output of <code>cat /sys/class/mtd/mtd4/name</code> is <code>rofs</code>. We will be flashing mtd partitions directly in the next step and this is the last chance to verify that they will be flashed to the correct partition.<br />
* <code>flashcp -v image-kernel /dev/mtd3</code><br />
* <code>flashcp -v image-rofs /dev/mtd4</code><br />
* (TODO: Describe how to reset rwfs in case it was damaged as well?)<br />
* After the flash is complete, you can run restart the BMC and it should boot successfully.<br />
<br />
* (TODO: Discussion of using Kermit to upload the image without network access)<br />
* (TODO: Load recovery images over USB?)<br />
* (TODO: Discussion of u-boot memory map)<br />
<br />
=== Troubleshooting ===<br />
TODO</div>Meklort