Difference between revisions of "Add GPU Firmware To BOOTKERNFW"

From RCS Wiki
Jump to navigation Jump to search
Line 2: Line 2:
  
 
Make sure mtd-utils is installed  
 
Make sure mtd-utils is installed  
:$ apt install mtd-utils
+
:<pre>$ apt install mtd-utils</pre>
 
Generate Image (tmp/firmware should contain the missing firmware that is complained about when booting. E.g. "radeon/PITCAIRN_pfp.bin" or "amdgpu/polaris10_mc.bin")
 
Generate Image (tmp/firmware should contain the missing firmware that is complained about when booting. E.g. "radeon/PITCAIRN_pfp.bin" or "amdgpu/polaris10_mc.bin")
:$ /sbin/./mkfs.jffs2 -r tmp/firmware/ -o /boot/firmware_jffs_image.bin --pagesize=4KB
+
:<pre>$ /sbin/./mkfs.jffs2 -r tmp/firmware/ -o /boot/firmware_jffs_image.bin --pagesize=4KB</pre>
  
  
Line 12: Line 12:
  
 
Make sure you can see BOOTKRNFW (should return: mtd5: 000e0000 00010000 "BOOTKERNFW"):
 
Make sure you can see BOOTKRNFW (should return: mtd5: 000e0000 00010000 "BOOTKERNFW"):
:$ cat /proc/mtd | grep BOOTKERNFW
+
:<pre>$ cat /proc/mtd | grep BOOTKERNFW</pre>
  
 
Find flash_erase (mine was in /var/petitboot/mnt/dev/nvme0n1p2/usr/sbin/):
 
Find flash_erase (mine was in /var/petitboot/mnt/dev/nvme0n1p2/usr/sbin/):
:$ find / -name flash_erase
+
:<pre>$ find / -name flash_erase</pre>
  
 
Erase /dev/mtd5:
 
Erase /dev/mtd5:
:$ /var/petitboot/mnt/dev/nvme0n1p2/usr/sbin/./flash_erase /dev/mtd5 0 0
+
:<pre>$ /var/petitboot/mnt/dev/nvme0n1p2/usr/sbin/./flash_erase /dev/mtd5 0 0</pre>
  
 
Flash /dev/mtd5:
 
Flash /dev/mtd5:
:$ dd if=/boot/firmware_jffs_image.bin of=/dev/mtd5 bs=64k
+
:<pre>$ dd if=/boot/firmware_jffs_image.bin of=/dev/mtd5 bs=64k</pre>
  
 
Reboot back into petitboot shell and check to see if the firmware made it as expected:
 
Reboot back into petitboot shell and check to see if the firmware made it as expected:
:$ ls /lib/firmware/
+
:<pre>$ ls /lib/firmware/</pre>
  
  

Revision as of 22:44, 6 May 2018

Using Debian (or installed linux of choice)

Make sure mtd-utils is installed

$ apt install mtd-utils

Generate Image (tmp/firmware should contain the missing firmware that is complained about when booting. E.g. "radeon/PITCAIRN_pfp.bin" or "amdgpu/polaris10_mc.bin")

$ /sbin/./mkfs.jffs2 -r tmp/firmware/ -o /boot/firmware_jffs_image.bin --pagesize=4KB


Petitboot

Reboot into petitboot shell.

Make sure you can see BOOTKRNFW (should return: mtd5: 000e0000 00010000 "BOOTKERNFW"):

$ cat /proc/mtd | grep BOOTKERNFW

Find flash_erase (mine was in /var/petitboot/mnt/dev/nvme0n1p2/usr/sbin/):

$ find / -name flash_erase

Erase /dev/mtd5:

$ /var/petitboot/mnt/dev/nvme0n1p2/usr/sbin/./flash_erase /dev/mtd5 0 0

Flash /dev/mtd5:

$ dd if=/boot/firmware_jffs_image.bin of=/dev/mtd5 bs=64k

Reboot back into petitboot shell and check to see if the firmware made it as expected:

$ ls /lib/firmware/


Note: If you are still getting an error message about not being to find vga bios, it may be because your gpu is being initialized before /lib/firmware is mounted. You can check this by running dmesg from petitboot. my gpu was trying to load around 6.5 seconds and the mtd wasn't actually mounted until 7.25... I was able to successfully load the firmware after after /dev/mtd5 was mounted by running "rmmod amdgpu && modprobe amdgpu" from petitboot. I'm not sure if you will be able to do that or if you will need "rmmod amdgpu-pro && modprobe amdgpu-pro" for the wx series cards.