BPI-R4 GPU support project

So I have embarked on an odd project, just to see if it can be done. I am trying to get my AMD RX580 to work with the Banana Pi R4 but am running into issues with trying to map a big enough BAR space. I have been following Jeff Geerling’s attempts to do similar things on the raspberry pi for inspiration. Increase the BAR memory address space for PCIe devices on the Raspberry Pi Compute Module 4 · GitHub

It looks like I need 512MB to get rid of any BAR issues, and the only way to get that to fit is to move up in memory. I tried 0x16 instead of 0x28 set in the mt7988a.dtsi file:

ranges = <0x81000000 0x00 0x28000000 0x00
	  0x28000000 0x00 0x00200000>,
	 <0x82000000 0x00 0x28200000 0x00
	  0x28200000 0x00 0x07e00000>;

[    3.384469] pci 0002:00:00.0: BAR 9: no space for [mem size 0x18000000 64bit pref]
[    3.392027] pci 0002:00:00.0: BAR 9: failed to assign [mem size 0x18000000 64bit pref]
[    3.399935] pci 0002:00:00.0: BAR 8: assigned [mem 0x28200000-0x282fffff]
[    3.406714] pci 0002:00:00.0: BAR 0: assigned [mem 0x28300000-0x28307fff 64bit]
[    3.414018] pci 0002:00:00.0: BAR 7: assigned [io  0x200000-0x200fff]
[    3.420450] pci 0002:01:00.0: BAR 0: no space for [mem size 0x10000000 64bit pref]
[    3.428008] pci 0002:01:00.0: BAR 0: failed to assign [mem size 0x10000000 64bit pref]
[    3.435914] pci 0002:01:00.0: BAR 2: no space for [mem size 0x00200000 64bit pref]
[    3.443471] pci 0002:01:00.0: BAR 2: failed to assign [mem size 0x00200000 64bit pref]
[    3.451374] pci 0002:01:00.0: BAR 5: assigned [mem 0x28200000-0x2823ffff]
[    3.458155] pci 0002:01:00.0: BAR 6: assigned [mem 0x28240000-0x2825ffff pref]
[    3.465366] pci 0002:01:00.1: BAR 0: assigned [mem 0x28260000-0x28263fff 64bit]
[    3.472675] pci 0002:01:00.0: BAR 4: assigned [io  0x200000-0x2000ff]
[    3.479106] pci 0002:00:00.0: PCI bridge to [bus 01]
[    3.484065] pci 0002:00:00.0:   bridge window [io  0x200000-0x200fff]
[    3.490495] pci 0002:00:00.0:   bridge window [mem 0x28200000-0x282fffff]

TO

ranges = <0x81000000 0x00 0x28000000 0x00
	  0x28000000 0x00 0x00200000>,
	 <0x82000000 0x00 0x16000000 0x00
	  0x16000000 0x00 0x20000000>;

[    3.374405] pci 0002:00:00.0: BAR 9: assigned [mem 0x18000000-0x2fffffff 64bit pref]
[    3.382136] pci 0002:00:00.0: BAR 8: assigned [mem 0x16000000-0x160fffff]
[    3.388915] pci 0002:00:00.0: BAR 0: assigned [mem 0x16100000-0x16107fff 64bit]
[    3.396219] pci 0002:00:00.0: BAR 7: assigned [io  0x200000-0x200fff]
[    3.402651] pci 0002:01:00.0: BAR 0: assigned [mem 0x20000000-0x2fffffff 64bit pref]
[    3.410392] pci 0002:01:00.0: BAR 2: assigned [mem 0x18000000-0x181fffff 64bit pref]
[    3.418136] pci 0002:01:00.0: BAR 5: assigned [mem 0x16000000-0x1603ffff]
[    3.424917] pci 0002:01:00.0: BAR 6: assigned [mem 0x16040000-0x1605ffff pref]
[    3.432125] pci 0002:01:00.1: BAR 0: assigned [mem 0x16060000-0x16063fff 64bit]
[    3.439434] pci 0002:01:00.0: BAR 4: assigned [io  0x200000-0x2000ff]
[    3.445867] pci 0002:00:00.0: PCI bridge to [bus 01]
[    3.450821] pci 0002:00:00.0:   bridge window [io  0x200000-0x200fff]
[    3.457252] pci 0002:00:00.0:   bridge window [mem 0x16000000-0x160fffff]
[    3.464030] pci 0002:00:00.0:   bridge window [mem 0x18000000-0x2fffffff 64bit pref]

This does solve the BAR issue, but it seems to cause another issue. I can no longer talk to the ROM BAR when attempting modprobe amdgpu.

Before moving to 0x16:

root@OpenWrt:~# modprobe amdgpu
[  223.070487] [drm] amdgpu kernel modesetting enabled.
[  223.075582] amdgpu 0002:01:00.0: assign IRQ: got 115
[  223.080689] amdgpu 0002:01:00.0: enabling device (0000 -> 0003)
[  223.086629] [drm] initializing kernel modesetting (POLARIS10 0x1002:0x67DF 0x1458:0x22FC 0xE7).
[  223.095346] [drm] register mmio base: 0x28200000
[  223.099950] [drm] register mmio size: 262144
[  223.104323] [drm] add ip block number 0 <vi_common>
[  223.109190] [drm] add ip block number 1 <gmc_v8_0>
[  223.113984] [drm] add ip block number 2 <tonga_ih>
[  223.118763] [drm] add ip block number 3 <gfx_v8_0>
[  223.123545] [drm] add ip block number 4 <sdma_v3_0>
[  223.128411] [drm] add ip block number 5 <powerplay>
[  223.133280] [drm] add ip block number 6 <dm>
[  223.137538] [drm] add ip block number 7 <uvd_v6_0>
[  223.142319] [drm] add ip block number 8 <vce_v3_0>
[  223.355252] amdgpu 0002:01:00.0: amdgpu: Fetched VBIOS from ROM BAR
[  223.361514] amdgpu: ATOM BIOS: xxx-xxx-xxx
[  223.365630] [drm] UVD is enabled in VM mode
[  223.369801] [drm] UVD ENC is enabled in VM mode
[  223.374326] [drm] VCE enabled in VM mode
[  223.378238] amdgpu 0002:01:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported
[  223.386321] amdgpu 0002:01:00.0: amdgpu: PCIE atomic ops is not supported
[  223.393107] [drm] GPU posting now...
[  223.528769] [drm] vm size is 64 GB, 2 levels, block size is 10-bit, fragment size is 9-bit
[  223.557315] amdgpu 0002:01:00.0: amdgpu: VRAM: 8192M 0x000000F400000000 - 0x000000F5FFFFFFFF (8192M used)
[  223.566885] amdgpu 0002:01:00.0: amdgpu: GART: 256M 0x000000FF00000000 - 0x000000FF0FFFFFFF
[  223.575235] [drm] Detected VRAM RAM=8192M, BAR=0M
[  223.579928] [drm] RAM width 256bits GDDR5
[  223.584060] [drm] amdgpu: 8192M of VRAM memory ready
[  223.589015] [drm] amdgpu: 1964M of GTT memory ready.
[  223.594020] [drm] GART: num cpu pages 65536, num gpu pages 65536
[  223.602023] [drm] PCIE GART of 256M enabled (table at 0x000000F5FFF80000).
[  223.609009] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[  223.636698] [drm] Chained IB support enabled!
[  223.668590] amdgpu: hwmgr_sw_init smu backed is polaris10_smu
[  223.736536] [drm] Found UVD firmware Version: 1.130 Family ID: 16
[  223.761840] [drm] Found VCE firmware Version: 53.26 Binary ID: 3
[  223.769200] amdgpu 0002:01:00.0: enabling bus mastering
[  223.838080] [drm:amdgpu_mm_wdoorbell [amdgpu]] *ERROR* writing beyond doorbell aperture: 0x000001e8!
[  228.114505] amdgpu: SMU load firmware failed
[  228.118773] amdgpu: fw load failed
[  228.122172] amdgpu: smu firmware loading failed
[  228.126695] amdgpu 0002:01:00.0: amdgpu: amdgpu_device_ip_init failed
[  228.133130] amdgpu 0002:01:00.0: amdgpu: Fatal error during GPU init
[  228.139471] amdgpu 0002:01:00.0: amdgpu: amdgpu: finishing device.

After moving to 0x16

root@OpenWrt:/lib/modules/6.6.92# modprobe amdgpu
[   95.048985] [drm] amdgpu kernel modesetting enabled.
[   95.054057] amdgpu 0002:01:00.0: assign IRQ: got 115
[   95.059205] amdgpu 0002:01:00.0: enabling device (0000 -> 0003)
[   95.065130] [drm] initializing kernel modesetting (POLARIS10 0x1002:0x67DF 0x1458:0x22FC 0xE7).
[   95.073910] [drm] register mmio base: 0x16000000
[   95.078523] [drm] register mmio size: 262144
[   95.082874] [drm] add ip block number 0 <vi_common>
[   95.087755] [drm] add ip block number 1 <gmc_v8_0>
[   95.092534] [drm] add ip block number 2 <tonga_ih>
[   95.097433] [drm] add ip block number 3 <gfx_v8_0>
[   95.102211] [drm] add ip block number 4 <sdma_v3_0>
[   95.107094] [drm] add ip block number 5 <powerplay>
[   95.111960] [drm] add ip block number 6 <dm>
[   95.116227] [drm] add ip block number 7 <uvd_v6_0>
[   95.121015] [drm] add ip block number 8 <vce_v3_0>
[   95.125875] amdgpu 0002:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000
[   95.134593] amdgpu 0002:01:00.0: Invalid PCI ROM header signature: expecting 0xaa55, got 0x0000
[   95.143309] amdgpu 0002:01:00.0: amdgpu: Unable to locate a BIOS ROM
[   95.149657] amdgpu 0002:01:00.0: amdgpu: Fatal error during GPU init
[   95.156002] amdgpu 0002:01:00.0: amdgpu: amdgpu: finishing device.
[   95.162189] amdgpu: probe of 0002:01:00.0 failed with error -22

I have tried disabling all other pcie devices in the mt7988a-banana-bpi-r4.dtsi file, and then setting pcie3(where my m.2 to pci-e adapter is plugged in) to the memory range of pcie2 since it starts at 0x20, but I seem to get the same Invalid PCI ROM header error.

I saw in the documentation that the BAR size can be 256MB, so maybe it is just impossible for me to stretch them to 512MB?

0x2000_0000 0x27FF_FFFF 256MB PCIE2 data block (64-bit address)
0x2800_0000 0x2FFF_FFFF 256MB PCIE3 data block (64-bit address)
0x3000_0000 0x37FF_FFFF 256MB PCIE0 data block (64-bit address)
0x3800_0000 0x3FFF_FFFF 256MB PCIE1 data block (64-bit address)

But when I lspci -vv I do see this line which makes me think it is possible.

Capabilities: [200 v1] Physical Resizable BAR
                BAR 0: current size: 256MB, supported: 256MB 512MB 1GB 2GB 4GB 8GB

Here is a copy of /proc/iomem I was using to try to find enough room to fit a 512MB BAR space.

root@OpenWrt:~# cat /proc/iomem
0c000000-0c03ffff : GICD
0c080000-0c27ffff : GICR
1000b000-1000bfff : 1001f000.pinctrl eint
1001b000-1001bfff : 1001b000.topckgen topckgen@1001b000
1001c000-1001cfff : 1001c000.watchdog watchdog@1001c000
1001f000-1001ffff : 1001f000.pinctrl gpio_base
10048000-10048fff : 10048000.pwm pwm@10048000
10080000-10080fff : 10080000.pcs pcs@10080000
10081000-10081fff : 10081000.pcs pcs@10081000
100e0000-100e0fff : 100e0000.mcusys mcusys@100e0000
10217080-102170ff : 11003000.i2c i2c@11003000
10217180-102171ff : 11005000.i2c i2c@11005000
11000000-1100001f : serial
11000100-1100011f : serial
11000200-1100021f : serial
11003000-11003fff : 11003000.i2c i2c@11003000
11005000-11005fff : 11005000.i2c i2c@11005000
11007000-110070ff : 11007000.spi spi@11007000
1100a000-1100afff : 1100a000.lvts lvts@1100a000
11200000-11202dff : 11200000.usb mac
11203e00-11203eff : 11200000.usb ippc
11230000-11230fff : 11230000.mmc mmc@11230000
11c10000-11c10fff : 1001f000.pinctrl iocfg_tr_base
11c50000-11c506ff : phy-soc:[email protected] usb-phy@11c50000
11c50700-11c50fff : phy-soc:[email protected] usb-phy@11c50700
11d00000-11d00fff : 1001f000.pinctrl iocfg_br_base
11d20000-11d20fff : 1001f000.pinctrl iocfg_rb_base
11d60000-11d60fff : 11230000.mmc mmc@11230000
11e00000-11e00fff : 1001f000.pinctrl iocfg_lb_base
11e10000-11e103ff : phy-soc:[email protected] usb-phy@11e10000
11e13400-11e138ff : phy-soc:[email protected] usb-phy@11e13000
11f00000-11f00fff : 1001f000.pinctrl iocfg_tl_base
11f20000-11f2ffff : 11f20000.phy phy@11f20000
11f30000-11f3ffff : 11f30000.phy phy@11f30000
11f50000-11f50fff : 11f50000.efuse efuse@11f50000
15020000-15027fff : 15020000.switch switch@15020000
15100000-1517ffff : 15100000.ethernet ethernet@15100000
15400000-1577ffff : 15100000.ethernet ethernet@15100000
40000000-42ffffff : System RAM
  42ff0000-42ffffff : reserved
43000000-4304ffff : reserved
43050000-47cbffff : System RAM
  46010000-46baffff : Kernel code
  46bb0000-46c1ffff : reserved
  46c20000-46d6ffff : Kernel data
47cc0000-47dbffff : reserved
47dc0000-4f5fffff : System RAM
4f600000-4f6bffff : reserved
4f6c0000-4f6fffff : System RAM
4f700000-4fefffff : reserved
4ff00000-13fffffff : System RAM
  fa7d1000-fe7dbfff : reserved
  13b000000-13f5fffff : reserved
  13f6ab000-13f76afff : reserved
  13f76b000-13f76bfff : reserved
  13f76c000-13f7b3fff : reserved
  13f7b6000-13f7b6fff : reserved
  13f7b7000-13f7b7fff : reserved
  13f7b8000-13f7c8fff : reserved
  13f7c9000-13fffffff : reserved

So really my main question is does anyone know why I suddenly cannot access ROM BAR space when I move to either 0x16 or 0x20? Also if anyone knows of anywhere to read up more on this kind of stuff I’d appreciate it. Hopefully this dumb project makes someone laugh.

2 Likes

So far no luck in expanding the BAR size to 512MB, but 256MB expansion does work. I ended up swapping out the RX580 with an Nvidia GTX660, a much older gpu that I had lying around. Luckily this gpu only required a 256MB bar, so modifying mt7988a.dtsi and changing the range to:

ranges = <0x81000000 0x00 0x28000000 0x00
	  0x28000000 0x00 0x00200000>,
	 <0x82000000 0x00 0x28200000 0x00
	  0x28200000 0x00 0x10000000>;

I was able to get full detection of the GPU!

[    2.266315] mtk-pcie-gen3 11290000.pcie: host bridge /soc/pcie@11290000 ranges:
[    2.273661] mtk-pcie-gen3 11290000.pcie: Parsing ranges property...
[    2.279924] mtk-pcie-gen3 11290000.pcie:       IO 0x0028000000..0x00281fffff -> 0x0028000000
[    2.288367] mtk-pcie-gen3 11290000.pcie:      MEM 0x0028200000..0x00381fffff -> 0x0028200000
[    2.337679] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.347487] mmc0: new high speed SDHC card at address 1388
[    2.353624] mmcblk0: mmc0:1388 USD00 29.5 GiB
[    2.360414] Alternate GPT is invalid, using primary GPT.
[    2.365745]  mmcblk0: p1 p2 p3 p4 p5 p6 p7
[    2.563345] mtk-pcie-gen3 11290000.pcie: set IO trans window[0]: cpu_addr = 0x28000000, pci_addr = 0x28000000, size = 0x200000
[    2.574739] mtk-pcie-gen3 11290000.pcie: set MEM trans window[1]: cpu_addr = 0x28200000, pci_addr = 0x28200000, size = 0x200000
[    2.586204] mtk-pcie-gen3 11290000.pcie: set MEM trans window[2]: cpu_addr = 0x28400000, pci_addr = 0x28400000, size = 0x400000
[    2.597668] mtk-pcie-gen3 11290000.pcie: set MEM trans window[3]: cpu_addr = 0x28800000, pci_addr = 0x28800000, size = 0x800000
[    2.609132] mtk-pcie-gen3 11290000.pcie: set MEM trans window[4]: cpu_addr = 0x29000000, pci_addr = 0x29000000, size = 0x1000000
[    2.620681] mtk-pcie-gen3 11290000.pcie: set MEM trans window[5]: cpu_addr = 0x2a000000, pci_addr = 0x2a000000, size = 0x2000000
[    2.632232] mtk-pcie-gen3 11290000.pcie: set MEM trans window[6]: cpu_addr = 0x2c000000, pci_addr = 0x2c000000, size = 0x4000000
[    2.643781] mtk-pcie-gen3 11290000.pcie: set MEM trans window[7]: cpu_addr = 0x30000000, pci_addr = 0x30000000, size = 0x8000000
[    2.655331] mtk-pcie-gen3 11290000.pcie: not enough translate table for addr: 0x38000000, limited to [8]
[    2.665064] mtk-pcie-gen3 11290000.pcie: PCI host bridge to bus 0002:00
[    2.671671] pci_bus 0002:00: root bus resource [bus 00-ff]
[    2.677156] pci_bus 0002:00: root bus resource [io  0x0000-0x1fffff] (bus address [0x28000000-0x281fffff])
[    2.686799] pci_bus 0002:00: root bus resource [mem 0x28200000-0x381fffff]
[    2.693663] pci_bus 0002:00: scanning bus
[    2.697683] pci 0002:00:00.0: [14c3:7988] type 01 class 0x060400
[    2.703693] pci 0002:00:00.0: reg 0x10: [mem 0x00000000-0x00007fff 64bit]
[    2.710529] pci 0002:00:00.0: PME# supported from D0 D3hot D3cold
[    2.716615] pci 0002:00:00.0: PME# disabled
[    2.722063] pci_bus 0002:00: fixups for bus
[    2.726242] pci 0002:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    2.732932] pci 0002:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.740932] pci 0002:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    2.747671] pci_bus 0002:01: scanning bus
[    2.751699] pci 0002:01:00.0: [10de:11c0] type 00 class 0x030000
[    2.757717] pci 0002:01:00.0: reg 0x10: [mem 0x00000000-0x00ffffff]
[    2.763991] pci 0002:01:00.0: reg 0x14: [mem 0x00000000-0x07ffffff 64bit pref]
[    2.771216] pci 0002:01:00.0: reg 0x1c: [mem 0x00000000-0x01ffffff 64bit pref]
[    2.778438] pci 0002:01:00.0: reg 0x24: initial BAR value 0x00000000 invalid
[    2.785476] pci 0002:01:00.0: reg 0x24: [io  size 0x0080]
[    2.790872] pci 0002:01:00.0: reg 0x30: [mem 0x00000000-0x0007ffff pref]
[    2.797713] pci 0002:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0002:00:00.0 (capable of 126.016 Gb/s with 8.0 GT/s PCIe x16 link)
[    2.812961] pci 0002:01:00.1: [10de:0e0b] type 00 class 0x040300
[    2.818980] pci 0002:01:00.1: reg 0x10: [mem 0x00000000-0x00003fff]
[    2.853085] pci_bus 0002:01: fixups for bus
[    2.857260] pci_bus 0002:01: bus scan returning with max=01
[    2.862820] pci_bus 0002:01: busn_res: [bus 01-ff] end is updated to 01
[    2.869431] pci_bus 0002:00: bus scan returning with max=01
[    2.875010] pci 0002:00:00.0: BAR 9: assigned [mem 0x2c000000-0x37ffffff 64bit pref]
[    2.882741] pci 0002:00:00.0: BAR 8: assigned [mem 0x28800000-0x29ffffff]
[    2.889518] pci 0002:00:00.0: BAR 0: assigned [mem 0x28200000-0x28207fff 64bit]
[    2.896823] pci 0002:00:00.0: BAR 7: assigned [io  0x1000-0x1fff]
[    2.902907] pci 0002:01:00.0: BAR 1: assigned [mem 0x30000000-0x37ffffff 64bit pref]
[    2.910651] pci 0002:01:00.0: BAR 3: assigned [mem 0x2c000000-0x2dffffff 64bit pref]
[    2.918395] pci 0002:01:00.0: BAR 0: assigned [mem 0x29000000-0x29ffffff]
[    2.925176] pci 0002:01:00.0: BAR 6: assigned [mem 0x28800000-0x2887ffff pref]
[    2.932385] pci 0002:01:00.1: BAR 0: assigned [mem 0x28880000-0x28883fff]
[    2.939166] pci 0002:01:00.0: BAR 5: assigned [io  0x1000-0x107f]
[    2.945253] pci 0002:00:00.0: PCI bridge to [bus 01]
[    2.950206] pci 0002:00:00.0:   bridge window [io  0x1000-0x1fff]
[    2.956292] pci 0002:00:00.0:   bridge window [mem 0x28800000-0x29ffffff]
[    2.963070] pci 0002:00:00.0:   bridge window [mem 0x2c000000-0x37ffffff 64bit pref]
[    2.970809] pci 0002:00:00.0: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  256
[    2.979258] pci 0002:01:00.0: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  256
[    2.987703] pci 0002:01:00.1: Max Payload Size set to  256/ 256 (was  128), Max Read Rq  256
[    2.996212] pcieport 0002:00:00.0: assign IRQ: got 115
[    3.001344] pcieport 0002:00:00.0: enabling device (0000 -> 0003)
[    3.007438] pcieport 0002:00:00.0: enabling bus mastering
[    3.013214] mtk-pcie-gen3 11290000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11290c00 data 0
[    3.021645] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[    3.030074] mtk-pcie-gen3 11290000.pcie: msi#0x2 address_hi 0x0 address_lo 0x11290c00 data 2
[    3.038500] mtk-pcie-gen3 11290000.pcie: msi#0x3 address_hi 0x0 address_lo 0x11290c00 data 3
[    3.046926] mtk-pcie-gen3 11290000.pcie: msi#0x4 address_hi 0x0 address_lo 0x11290c00 data 4
[    3.055352] mtk-pcie-gen3 11290000.pcie: msi#0x5 address_hi 0x0 address_lo 0x11290c00 data 5
[    3.063779] mtk-pcie-gen3 11290000.pcie: msi#0x6 address_hi 0x0 address_lo 0x11290c00 data 6
[    3.072203] mtk-pcie-gen3 11290000.pcie: msi#0x7 address_hi 0x0 address_lo 0x11290c00 data 7
[    3.080629] mtk-pcie-gen3 11290000.pcie: msi#0x8 address_hi 0x0 address_lo 0x11290c00 data 8
[    3.089053] mtk-pcie-gen3 11290000.pcie: msi#0x9 address_hi 0x0 address_lo 0x11290c00 data 9
[    3.097482] mtk-pcie-gen3 11290000.pcie: msi#0xa address_hi 0x0 address_lo 0x11290c00 data 10
[    3.105994] mtk-pcie-gen3 11290000.pcie: msi#0xb address_hi 0x0 address_lo 0x11290c00 data 11
[    3.114512] mtk-pcie-gen3 11290000.pcie: msi#0xc address_hi 0x0 address_lo 0x11290c00 data 12
[    3.123022] mtk-pcie-gen3 11290000.pcie: msi#0xd address_hi 0x0 address_lo 0x11290c00 data 13
[    3.131535] mtk-pcie-gen3 11290000.pcie: msi#0xe address_hi 0x0 address_lo 0x11290c00 data 14
[    3.140048] mtk-pcie-gen3 11290000.pcie: msi#0xf address_hi 0x0 address_lo 0x11290c00 data 15
[    3.148561] mtk-pcie-gen3 11290000.pcie: msi#0x10 address_hi 0x0 address_lo 0x11290c00 data 16
[    3.157162] mtk-pcie-gen3 11290000.pcie: msi#0x11 address_hi 0x0 address_lo 0x11290c00 data 17
[    3.165761] mtk-pcie-gen3 11290000.pcie: msi#0x12 address_hi 0x0 address_lo 0x11290c00 data 18
[    3.174361] mtk-pcie-gen3 11290000.pcie: msi#0x13 address_hi 0x0 address_lo 0x11290c00 data 19
[    3.182958] mtk-pcie-gen3 11290000.pcie: msi#0x14 address_hi 0x0 address_lo 0x11290c00 data 20
[    3.191557] mtk-pcie-gen3 11290000.pcie: msi#0x15 address_hi 0x0 address_lo 0x11290c00 data 21
[    3.200157] mtk-pcie-gen3 11290000.pcie: msi#0x16 address_hi 0x0 address_lo 0x11290c00 data 22
[    3.208756] mtk-pcie-gen3 11290000.pcie: msi#0x17 address_hi 0x0 address_lo 0x11290c00 data 23
[    3.217358] mtk-pcie-gen3 11290000.pcie: msi#0x18 address_hi 0x0 address_lo 0x11290c00 data 24
[    3.225958] mtk-pcie-gen3 11290000.pcie: msi#0x19 address_hi 0x0 address_lo 0x11290c00 data 25
[    3.234557] mtk-pcie-gen3 11290000.pcie: msi#0x1a address_hi 0x0 address_lo 0x11290c00 data 26
[    3.243156] mtk-pcie-gen3 11290000.pcie: msi#0x1b address_hi 0x0 address_lo 0x11290c00 data 27
[    3.251753] mtk-pcie-gen3 11290000.pcie: msi#0x1c address_hi 0x0 address_lo 0x11290c00 data 28
[    3.260353] mtk-pcie-gen3 11290000.pcie: msi#0x1d address_hi 0x0 address_lo 0x11290c00 data 29
[    3.268951] mtk-pcie-gen3 11290000.pcie: msi#0x1e address_hi 0x0 address_lo 0x11290c00 data 30
[    3.277551] mtk-pcie-gen3 11290000.pcie: msi#0x1f address_hi 0x0 address_lo 0x11290c00 data 31
[    3.286571] mtk-pcie-gen3 11290000.pcie: msi#0x0 address_hi 0x0 address_lo 0x11290c00 data 0
[    3.295070] pcieport 0002:00:00.0: PME: Signaling with IRQ 116
[    3.301013] pcieport 0002:00:00.0: AER: enabled with IRQ 116
[    3.306739] pcieport 0002:00:00.0: save config 0x00: 0x798814c3
[    3.312649] pcieport 0002:00:00.0: save config 0x04: 0x00100407
[    3.318561] pcieport 0002:00:00.0: save config 0x08: 0x06040001
[    3.324473] pcieport 0002:00:00.0: save config 0x0c: 0x00010000
[    3.330381] pcieport 0002:00:00.0: save config 0x10: 0x28200004
[    3.336291] pcieport 0002:00:00.0: save config 0x14: 0x00000000
[    3.342198] pcieport 0002:00:00.0: save config 0x18: 0x00010100
[    3.348108] pcieport 0002:00:00.0: save config 0x1c: 0x20001111
[    3.354020] pcieport 0002:00:00.0: save config 0x20: 0x29f02880
[    3.359927] pcieport 0002:00:00.0: save config 0x24: 0x37f12c01
[    3.365837] pcieport 0002:00:00.0: save config 0x28: 0x00000000
[    3.371745] pcieport 0002:00:00.0: save config 0x2c: 0x00000000
[    3.377654] pcieport 0002:00:00.0: save config 0x30: 0x28002800
[    3.383563] pcieport 0002:00:00.0: save config 0x34: 0x00000080
[    3.389470] pcieport 0002:00:00.0: save config 0x38: 0x00000000
[    3.395379] pcieport 0002:00:00.0: save config 0x3c: 0x00020173
[    3.401398] nouveau 0002:01:00.0: assign IRQ: got 115
[    3.406452] nouveau 0002:01:00.0: enabling device (0000 -> 0003)
[    3.412531] nouveau 0002:01:00.0: NVIDIA GK106 (0e6000a1)
[    3.417974] mtk-pcie-gen3 11290000.pcie: msi#0x1 address_hi 0x0 address_lo 0x11290c00 data 1
[    3.526237] nouveau 0002:01:00.0: bios: version 80.06.58.00.14
[    3.533650] nouveau 0002:01:00.0: enabling bus mastering
[    3.623715] nouveau 0002:01:00.0: fb: 2048 MiB GDDR5
[    3.729987] nouveau 0002:01:00.0: DRM: VRAM: 2048 MiB
[    3.735041] nouveau 0002:01:00.0: DRM: GART: 1048576 MiB
[    3.740345] nouveau 0002:01:00.0: DRM: TMDS table version 2.0
[    3.746088] nouveau 0002:01:00.0: DRM: DCB version 4.0
[    3.751216] nouveau 0002:01:00.0: DRM: DCB outp 00: 02000f00 00000000
[    3.757647] nouveau 0002:01:00.0: DRM: DCB outp 01: 01000f02 00020030
[    3.764078] nouveau 0002:01:00.0: DRM: DCB outp 03: 02011f62 00020010
[    3.770506] nouveau 0002:01:00.0: DRM: DCB outp 04: 04822fb6 0f420010
[    3.776937] nouveau 0002:01:00.0: DRM: DCB outp 05: 04022f72 00020010
[    3.783367] nouveau 0002:01:00.0: DRM: DCB outp 06: 08033f82 00020030
[    3.789796] nouveau 0002:01:00.0: DRM: DCB conn 00: 00001030
[    3.795446] nouveau 0002:01:00.0: DRM: DCB conn 01: 00010161
[    3.801091] nouveau 0002:01:00.0: DRM: DCB conn 02: 00020246
[    3.806740] nouveau 0002:01:00.0: DRM: DCB conn 03: 01000331
[    3.827662] nouveau 0002:01:00.0: DRM: MM: using COPY for buffer copies
[    5.835037] nouveau 0002:01:00.0: DRM: core caps notifier timeout
[    5.843201] [drm] Initialized nouveau 1.4.0 20120801 for 0002:01:00.0 on minor 0
root@OpenWrt:~# lspci -vv
0002:00:00.0 PCI bridge: MEDIATEK Corp. Device 7988 (rev 01) (prog-if 00 [Normal decode])
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 116
        Region 0: Memory at 28200000 (64-bit, non-prefetchable) [size=32K]
        Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
        I/O behind bridge: 1000-1fff [size=4K] [16-bit]
        Memory behind bridge: 28800000-29ffffff [size=24M] [32-bit]
        Prefetchable memory behind bridge: 2c000000-37ffffff [size=192M] [32-bit]
        Secondary status: 66MHz- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort+ <SERR- <PERR-
        BridgeCtl: Parity- SERR+ NoISA- VGA- VGA16- MAbort- >Reset- FastB2B-
                PriDiscTmr- SecDiscTmr- DiscTmrStat- DiscTmrSERREn-
        Capabilities: [80] Express (v2) Root Port (Slot-), IntMsgNum 0
                DevCap: MaxPayload 256 bytes, PhantFunc 0
                        ExtTag+ RBE+ TEE-IO-
                DevCtl: CorrErr+ NonFatalErr+ FatalErr+ UnsupReq+
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 256 bytes, MaxReadReq 256 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #1, Speed 8GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <2us, L1 <8us
                        ClockPM- Surprise+ LLActRep+ BwNot+ ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes, LnkDisable- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s, Width x1
                        TrErr- Train- SlotClk+ DLActive+ BWMgmt- ABWMgmt-
                RootCap: CRSVisible+
                RootCtl: ErrCorrectable- ErrNon-Fatal- ErrFatal- PMEIntEna+ CRSVisible+
                RootSta: PME ReqID 0000, PMEStatus- PMEPending-
                DevCap2: Completion Timeout: Range ABCD, TimeoutDis+ NROPrPrP- LTR+
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt+ EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- LN System CLS Not Supported, TPHComp- ExtTPHComp- ARIFwd-
                         AtomicOpsCap: Routing- 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis- ARIFwd-
                         AtomicOpsCtl: ReqEn- EgressBlck-
                         IDOReq- IDOCompl- LTR+ EmergencyPowerReductionReq-
                         10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS-
                LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+ EqualizationPhase1+
                         EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [e0] MSI: Enable+ Count=1/32 Maskable+ 64bit+
                Address: 0000000011290c00  Data: 0000
                Masking: fffffffe  Pending: 00000000
        Capabilities: [f8] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [100 v1] Vendor Specific Information: ID=1556 Rev=1 Len=008 <?>
        Capabilities: [110 v1] L1 PM Substates
                L1SubCap: PCI-PM_L1.2+ PCI-PM_L1.1+ ASPM_L1.2+ ASPM_L1.1+ L1_PM_Substates+
                          PortCommonModeRestoreTime=3us PortTPowerOnTime=28us
                L1SubCtl1: PCI-PM_L1.2- PCI-PM_L1.1- ASPM_L1.2- ASPM_L1.1-
                           T_CommonMode=0us LTR1.2_Threshold=0ns
                L1SubCtl2: T_PwrOn=10us
        Capabilities: [200 v2] Advanced Error Reporting
                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr-
                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- AdvNonFatalErr+
                AERCap: First Error Pointer: 00, ECRCGenCap- ECRCGenEn- ECRCChkCap- ECRCChkEn-
                        MultHdrRecCap- MultHdrRecEn- TLPPfxPres- HdrLogCap-
                HeaderLog: 00000000 00000000 00000000 00000000
                RootCmd: CERptEn+ NFERptEn+ FERptEn+
                RootSta: CERcvd- MultCERcvd- UERcvd- MultUERcvd-
                         FirstFatal- NonFatalMsg- FatalMsg- IntMsgNum 0
                ErrorSrc: ERR_COR: 0000 ERR_FATAL/NONFATAL: 0000
        Capabilities: [300 v1] Secondary PCI Express
                LnkCtl3: LnkEquIntrruptEn- PerformEqu-
                LaneErrStat: 0
        Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -2

0002:01:00.0 VGA compatible controller: NVIDIA Corporation GK106 [GeForce GTX 660] (rev a1) (prog-if 00 [VGA controller])
        Subsystem: eVga.com. Corp. Device 2662
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 117
        Region 0: Memory at 29000000 (32-bit, non-prefetchable) [size=16M]
        Region 1: Memory at 30000000 (64-bit, prefetchable) [size=128M]
        Region 3: Memory at 2c000000 (64-bit, prefetchable) [size=32M]
        Region 5: I/O ports at 1000 [size=128]
        Expansion ROM at 28800000 [virtual] [disabled] [size=512K]
        Capabilities: [60] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
                Address: 0000000011290c00  Data: 0001
        Capabilities: [78] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 256 bytes, MaxReadReq 256 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #1, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <512ns, L1 <4us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM Disabled; RCB 64 bytes, LnkDisable- CommClk+
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range AB, TimeoutDis+ NROPrPrP- LTR-
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn-
                         IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                         10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                LnkCap2: Supported Link Speeds: 2.5-8GT/s, Crosslink- Retimer- 2Retimers- DRS-
                LnkCtl2: Target Link Speed: 8GT/s, EnterCompliance- SpeedDis-
                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
                         Compliance Preset/De-emphasis: -6dB de-emphasis, 0dB preshoot
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete+ EqualizationPhase1+
                         EqualizationPhase2+ EqualizationPhase3+ LinkEqualizationRequest+
                         Retimer- 2Retimers- CrosslinkRes: unsupported
        Capabilities: [b4] Vendor Specific Information: Len=14 <?>
        Capabilities: [100 v1] Virtual Channel
                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1
                Arb:    Fixed- WRR32- WRR64- WRR128-
                Ctrl:   ArbSelect=Fixed
                Status: InProgress-
                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
                        Status: NegoPending- InProgress-
        Capabilities: [128 v1] Power Budgeting <?>
        Capabilities: [600 v1] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
        Capabilities: [900 v1] Secondary PCI Express
                LnkCtl3: LnkEquIntrruptEn- PerformEqu-
                LaneErrStat: 0
        Kernel driver in use: nouveau

0002:01:00.1 Audio device: NVIDIA Corporation GK106 HDMI Audio Controller (rev a1)
        Subsystem: eVga.com. Corp. Device 2662
        Control: I/O- Mem- BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Interrupt: pin B routed to IRQ 0
        Region 0: Memory at 28880000 (32-bit, non-prefetchable) [disabled] [size=16K]
        Capabilities: [60] Power Management version 3
                Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
        Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
                Address: 0000000000000000  Data: 0000
        Capabilities: [78] Express (v2) Endpoint, IntMsgNum 0
                DevCap: MaxPayload 256 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
                        ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 0W TEE-IO-
                DevCtl: CorrErr- NonFatalErr- FatalErr- UnsupReq-
                        RlxdOrd+ ExtTag+ PhantFunc- AuxPwr- NoSnoop+
                        MaxPayload 256 bytes, MaxReadReq 256 bytes
                DevSta: CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
                LnkCap: Port #1, Speed 8GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <512ns, L1 <4us
                        ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp+
                LnkCtl: ASPM L0s L1 Enabled; RCB 64 bytes, LnkDisable- CommClk-
                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
                LnkSta: Speed 2.5GT/s (downgraded), Width x1 (downgraded)
                        TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
                DevCap2: Completion Timeout: Range AB, TimeoutDis+ NROPrPrP- LTR-
                         10BitTagComp- 10BitTagReq- OBFF Not Supported, ExtFmt- EETLPPrefix-
                         EmergencyPowerReduction Not Supported, EmergencyPowerReductionInit-
                         FRS- TPHComp- ExtTPHComp-
                         AtomicOpsCap: 32bit- 64bit- 128bitCAS-
                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
                         AtomicOpsCtl: ReqEn-
                         IDOReq- IDOCompl- LTR- EmergencyPowerReductionReq-
                         10BitTagReq- OBFF Disabled, EETLPPrefixBlk-
                LnkSta2: Current De-emphasis Level: -3.5dB, EqualizationComplete- EqualizationPhase1-
                         EqualizationPhase2- EqualizationPhase3- LinkEqualizationRequest-
                         Retimer- 2Retimers- CrosslinkRes: unsupported

Next came hours and hours of tinkering and compiling the video packages so I could add Wayland and Weston to the device. I ended up having to use the main branch of Openwrt as I ran into a missing libdrm-nouveau dependency issue.

Once Wayland, Weston, and all other required drivers and software were installed I attempted to start Weston, but ran into an interesting error:

root@OpenWrt:~# weston
Date: 2025-06-19 GMT
[16:53:07.411] weston 14.0.1
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: 14.0.1
[16:53:07.411] Command line: weston
[16:53:07.411] OS: Linux, 6.6.93, #0 SMP Mon Jun 16 21:10:54 2025, aarch64
[16:53:07.411] Flight recorder: enabled
[16:53:07.411] Starting with no config file.
[16:53:07.412] Output repaint window is 7 ms maximum.
[16:53:07.412] WARNING: Weston was started from /dev/ttyS0. Messages will be dropped if not written to a file.
               Use --log for capturing Weston logs to a file.
[16:53:07.412] Loading module '/usr/lib/libweston-14/drm-backend.so'
[16:53:07.413] initializing drm backend
[16:53:07.413] Trying libseat launcher...
[16:53:07.413] [libseat/libseat.c:73] Seat opened with backend 'seatd'
[16:53:07.413] [libseat/backend/seatd.c:212] Enabling seat
[16:53:07.414] libseat: session control granted
[16:53:07.428] using /dev/dri/card0
[16:53:07.429] DRM: does not support atomic modesetting
[16:53:07.429] DRM: supports GBM modifiers
[16:53:07.429] DRM: does not support Atomic async page flip
[16:53:07.429] DRM: supports picture aspect ratio
[16:53:07.490] Loading module '/usr/lib/libweston-14/gl-renderer.so'
[16:53:07.495] Using rendering device: /dev/dri/renderD128
[16:53:07.495] EGL version: 1.5
[16:53:07.495] EGL vendor: Mesa Project
[16:53:07.495] EGL client APIs: OpenGL OpenGL_ES
[16:53:07.495] warning: Disabling render GPU timeline and explicit synchronization due to missing EGL_ANDROID_native_fence_sync extension
[16:53:07.495] EGL features:
               EGL Wayland extension: yes
               context priority: no
               buffer age: yes
               partial update: no
               swap buffers with damage: no
               configless context: yes
               surfaceless context: yes
               dmabuf support: modifiers
[16:53:07.501] GL version: OpenGL ES 3.2 Mesa 25.0.5
[16:53:07.501] GLSL version: OpenGL ES GLSL ES 3.20
[16:53:07.501] GL vendor: Mesa
[16:53:07.501] GL renderer: NVE6
[16:53:07.534] GL ES 3.2 - renderer features:
               read-back format: ARGB8888
               glReadPixels supports y-flip: yes
               glReadPixels supports PBO: yes
               wl_shm 10 bpc formats: yes
               wl_shm 16 bpc formats: yes
               wl_shm half-float formats: yes
               internal R and RG formats: yes
               OES_EGL_image_external: yes
[16:53:07.534] Using GL renderer
[16:53:07.557] warning: no input devices on entering Weston. Possible causes:
        - no permissions to read /dev/input/event*
        - seats misconfigured (Weston backend option 'seat', udev device property ID_SEAT)
[16:53:07.557] failed to create input devices
[  313.377683] nouveau 0002:01:00.0: seatd[2123]: failed to idle channel 2 [seatd[2123]]
[16:53:22.587] fatal: failed to create compositor backend
Segmentation fault

Since the device did not see an input device, it crashed. I ended up having to add these packages:

kmod-input-core
kmod-input-evdev
kmod-hid
kmod-hid-generic
kmod-usb-hid        

I also earlier had to install these to get Weston to install correctly:
kmod-sound-core
alsa-lib

Once the new packages were installed and a USB mouse was plugged in I got:

root@OpenWrt:~# weston
Date: 2025-06-19 GMT
[18:10:46.841] weston 14.0.1
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: 14.0.1
[18:10:46.842] Command line: weston
[18:10:46.842] OS: Linux, 6.6.93, #0 SMP Mon Jun 16 21:10:54 2025, aarch64
[18:10:46.842] Flight recorder: enabled
[18:10:46.842] Starting with no config file.
[18:10:46.842] Output repaint window is 7 ms maximum.
[18:10:46.842] WARNING: Weston was started from /dev/ttyS0. Messages will be dropped if not written to a file.
               Use --log for capturing Weston logs to a file.
[18:10:46.842] Loading module '/usr/lib/libweston-14/drm-backend.so'
[18:10:46.844] initializing drm backend
[18:10:46.844] Trying libseat launcher...
[18:10:46.844] [libseat/libseat.c:73] Seat opened with backend 'seatd'
[18:10:46.844] [libseat/backend/seatd.c:212] Enabling seat
[18:10:46.844] libseat: session control granted
[18:10:46.861] using /dev/dri/card0
[18:10:46.861] DRM: does not support atomic modesetting
[18:10:46.861] DRM: supports GBM modifiers
[18:10:46.861] DRM: does not support Atomic async page flip
[18:10:46.861] DRM: supports picture aspect ratio
[18:10:47.000] Loading module '/usr/lib/libweston-14/gl-renderer.so'
[18:10:47.[  233.661016] weston[4237]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
005] Using rendering device: /dev/dri/renderD128
[18:10:47.005] EGL version: 1.5
[18:10:47.005] EGL vendor: Mesa Project
[18:10:47.005] EGL client APIs: OpenGL OpenGL_ES
[18:10:47.005] warning: Disabling render GPU timeline and explicit synchronization due to missing EGL_ANDROID_native_fence_sync extension
[18:10:47.005] EGL features:
               EGL Wayland extension: yes
               context priority: no
               buffer age: yes
               partial update: no
               swap buffers with damage: no
               configless context: yes
               surfaceless context: yes
               dmabuf support: modifiers
[18:10:47.037] GL version: OpenGL ES 3.2 Mesa 25.0.5
[18:10:47.037] GLSL version: OpenGL ES GLSL ES 3.20
[18:10:47.037] GL vendor: Mesa
[18:10:47.038] GL renderer: NVE6
[18:10:47.104] GL ES 3.2 - renderer features:
               read-back format: ARGB8888
               glReadPixels supports y-flip: yes
               glReadPixels supports PBO: yes
               wl_shm 10 bpc formats: yes
               wl_shm 16 bpc formats: yes
               wl_shm half-float formats: yes
               internal R and RG formats: yes
               OES_EGL_image_external: yes
[18:10:47.105] Using GL renderer
[18:10:47.195] event0  - Logitech USB-PS/2 Optical Mouse: is tagged by udev as: Mouse
[18:10:47.196] event0  - Logitech USB-PS/2 Optical Mouse: device is a pointer
[18:10:47.197] libinput: configuring device "Logitech USB-PS/2 Optical Mouse".
[18:10:47.209] DRM: head 'DVI-I-1' found, connector 85 is disconnected.
[18:10:47.285] DRM: EDID for the following head fails conformity:
Block 1, CTA-861 Extension Block:
  Colorimetry Data Block: Reserved bits MD0-MD3 must be 0.

[18:10:47.285] DRM: head 'HDMI-A-1' found, connector 88 is connected, EDID make 'Sony', model 'SONY TV  *00', serial '0x01010101'
               Supported EOTF modes: SDR
               Supported colorimetry modes: default
[18:10:47.443] DRM: head 'DP-1' found, connector 90 is disconnected.
[18:10:47.445] DRM: head 'DVI-D-1' found, connector 93 is disconnected.
[18:10:47.445] Registered plugin API 'weston_drm_output_api_v1' of size 40
[18:10:47.445] Color manager: no-op
                 protocol support: no
[18:10:47.445] Output 'HDMI-A-1' attempts EOTF mode SDR and colorimetry mode default.
[18:10:47.445] Output 'HDMI-A-1' using color profile: stock sRGB color profile
[18:10:47.446] Chosen EGL config details: id:  33 rgba: 8 8 8 0 buf: 24 dep:  0 stcl: 0 int: 1-1 type: win vis_id: XRGB8888 (0x34325258)
[18:10:47.446] Output HDMI-A-1 (crtc 83) video modes:
               [email protected] 256:135, current, 297.0 MHz
               [email protected] 16:9, 297.0 MHz
               [email protected] 16:9, 297.0 MHz
               [email protected] 16:9, 297.0 MHz
               [email protected], 148.5 MHz
               [email protected] 16:9, 148.5 MHz
               [email protected] 16:9, 148.4 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected] 16:9, 148.5 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected], 119.0 MHz
               [email protected], 108.0 MHz
               [email protected], 108.0 MHz
               [email protected], 108.0 MHz
               [email protected], 74.2 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected] 16:9, 74.2 MHz
               [email protected] 16:9, 59.4 MHz
               [email protected], 65.0 MHz
               [email protected], 40.0 MHz
               [email protected] 16:9, 27.0 MHz
               [email protected] 4:3, 27.0 MHz
               [email protected] 16:9, 27.0 MHz
               [email protected] 4:3, 27.0 MHz
               [email protected] 16:9, 27.0 MHz
               [email protected] 4:3, 27.0 MHz
               [email protected] 4:3, 25.2 MHz
               [email protected], 25.2 MHz
               [email protected] 4:3, 25.2 MHz
[18:10:47.447] associating input device event0 with output HDMI-A-1 (none by udev)
[18:10:47.447] Output 'HDMI-A-1' enabled with head(s) HDMI-A-1
[18:10:47.447] Compositor capabilities:
               arbitrary surface rotation: yes
               screen capture uses y-flip: yes
               cursor planes: yes
               arbitrary resolutions: no
               view mask clipping: yes
               explicit sync: no
               color operations: yes
               presentation clock: CLOCK_MONOTONIC, id 1
               presentation clock resolution: 0.000000001 s
[18:10:47.447] Loading module '/usr/lib/weston/desktop-shell.so'
[18:10:47.447] launching '/usr/libexec/weston-keyboard'
[18:10:47.449] launching '/usr/libexec/weston-desktop-shell'

Everything is detected and running! Except, no output on the screen :frowning:

My best guess right now is that I am interacting via UART or SSH, so I don’t have a proper terminal for it to start on? I am wondering if I need to add support for the pcie in U-boot like here:

I tried turning on Virtual terminal in make kernel_menuconfig, but am unsure if this did anything or if I just don’t know what I am doing here. Any help is appreciated!

Flashed frank-w’s U-boot which does detect the gpu via pci command, but still not output just yet.

BPI-R4> pci
BusDevFun  VendorId   DeviceId   Device Class       Sub-Class
_____________________________________________________________
00.00.00   0x14c3     0x7988     Bridge device           0x04
01.00.00   0x10de     0x11c0     Display controller      0x00
01.00.01   0x10de     0x0e0b     Multimedia device       0x03

Did you try something like adding

console=tty1 consoleblank=0

To the kernel commandline?

I guess getting a tty on the video output would be the first step, worrying about acceleration later…

You could also try adding this to the above:

video=1920x1080@60

Linux drivers should function, without the setup of bootloaders earlier in the bootchain.

Do you have

CONFIG_FRAMEBUFFER_CONSOLE=y

Thanks! I started messing around with the enabling the framebuffer, but am still running into issues. I can enable DRM under Graphics Support in kernel_menuconfig and also enable legacy fbdev support to ensure I get a /dev/fb0, but am still getting an error about detecting the HDMI connection. If I use a DVI connection I get no error but it still doesn’t seem to work.

[    6.354253] [drm] Initialized nouveau 1.4.0 20120801 for 0002:01:00.0 on minor 0
[    6.916550] nouveau 0002:01:00.0: DRM: [DRM/00000003:sor-0002-0f42] [ACQUIRE proto:TMDS head:1 hdmi:1 max_ac_packet:41 rekey:56 scdc:0 hda:1] or:108 link:128 (ret:-22)
[    8.919488] nouveau 0002:01:00.0: DRM: core notifier timeout
[   10.919541] nouveau 0002:01:00.0: DRM: base-0: timeout
[   12.919589] nouveau 0002:01:00.0: DRM: base-1: timeout
[   12.985039] nouveau 0002:01:00.0: [drm] fb0: nouveaudrmfb frame buffer device

If I go into frame buffer devices and select the Nvidia framebuffer support driver here I get a different error:

[    0.067609] nvidiafb_setup START
[    3.902289] nvidiafb 0002:01:00.0: assign IRQ: got 115
[    3.907423] nvidiafb_probe START
[    3.910645] nvidiafb 0002:01:00.0: enabling device (0000 -> 0003)
[    3.916746] nvidiafb: Device ID: 10de11c0
[    3.920831] nvidiafb: unknown NV_ARCH

I did find information here for getting a USB Displaylink device working with OpenWRT http://h-wrt.com/en/doc/video I have a displaylink, so just to see if I was going down the correct path, I followed the instructions on that site and was able to get output onto my monitor!

It’s not what I want, but it is a good step in the right direction. For now I need to figure out why the Nvidia framebuffer driver doesn’t detect my gpu’s architecture. It is possible I have a 3rd party bios flashed on this card, I do remember messing around with that a long time ago. Might be best to plug it into an x86 machine and flash it back to stock just to be safe.

Else, I may need to just ignore the framebuffer driver and focus on the DRM one. Still lots to research, I am very new to this!

Also nice! Can’t open that link though…

Changed it to a http link but I do get DNS issues trying to access it at work vs. at home. Can try Googling for H-WRT as well then go to Documentation then Display.

Could I be missing firmware? With AMD gpu’s I had to enable the driver in kernel_menuconfig but also add the firmware in menuconfig, whereas Nouveau only has the kernel driver and no firmware. I was reading this may be because the firmware is Nvidia’s and therefore cannot be packaged and must be manually added by me? Anyone have experience with installing Nouveau even on x86?