[BPI-R4] TODO List

I will try this one also. Thanks.

@jcdutton Btw we can change this todo list to add another item: hw qos/speed limit support. It seems should be implemented using tc flower api. Downstream implementation here: autobuild_mac80211_release/target/linux/mediatek/patches-5.4/999-3012-flow-offload-add-mtkhnat-qdma-qos.patch - openwrt/feeds/mtk-openwrt-feeds - Gitiles

My build.sh does not apply any patchesā€¦it builds kernel and modules and handles defconfigs for all boards in similar way so you have no struggle with different crosscompilers,defconfigs and binary files (r2 uses uImage where arm64 uses fit image)

1 Like

Ok. I build Kernel with your script and using O= option in make file. Using the script the kernel gets stuck. Using O= and prepare a FIT file using mt7988a-bananapi-bpi-r4.dtb and mt7988a-bananapi-bpi-r4-sd.dtbo as overlay Iā€™m getting a strange error:

MT7988> bootm ${kaddr}
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.9.0 BPi-R4
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000ec
     Data Size:    8768739 Bytes = 8.4 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   a008ebc6d013911ce6c32ed519c932e503e003b5
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4885cec8
     Data Size:    27815 Bytes = 27.2 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   c8726081dd8997a2d42d44005a4d46dbe0cd7b6c
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x4885cec8 to 0x47000000
## Loading fdt from FIT Image at 48000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT overlay blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48863c4c
     Data Size:    1364 Bytes = 1.3 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   a70dda1de96ed61efd4ead914f1ffef4bf2e139f
   Verifying Hash Integrity ... sha1+ OK
failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND
base fdt does not have a /__symbols__ node
make sure you've compiled with -@
Could not find a valid device tree

If I try to boot only fdt-base, Iā€™m not getting errors but same is getting stuck.

MT7988> bootm ${kaddr}#conf-base
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-base' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.9.0 BPi-R4
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000ec
     Data Size:    8768739 Bytes = 8.4 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   a008ebc6d013911ce6c32ed519c932e503e003b5
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-base' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4885cec8
     Data Size:    27815 Bytes = 27.2 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   c8726081dd8997a2d42d44005a4d46dbe0cd7b6c
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x4885cec8 to 0x47000000
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000ff7ed000, end 00000000ff7f6ca6 ... OK
Working FDT set to ff7ed000

Starting kernel ...

I guess you do not use my fit source (bpi-r4.its) or defconfig,right?

Just try compiling my kernel as isā€¦

NOOOPE! I used the .itb file. I know the differences between them. Your .its file I used to create other FIT images.

I build the kernel with your build.sh importconfig / build.sh config (added few drivers more) / build.sh . Then I just copied bpi-r4-6.9.0-main.itb or bpi-r4.itb from directory where I build it with build.sh to TFTP folder and tried to boot it:

MT7988> setenv consoleargs "earlycon=uart8250,mmio32,0x11000000 console=ttyS0,115200n1 earlyprintk debug=7 loglevel=8 pci=pcie_
bus_perf consoleblank=0"
MT7988> setenv rootfs "root=/dev/mmcblk0p6 rootfstype=ext4 rootwait"
MT7988> setenv bootargs $consoleargs $rootfs
MT7988> 
MT7988> bootp ${kaddr} 10.42.0.1:bpi-r4-6.9.0-main.itb
BOOTP broadcast 1
DHCP client bound to address 10.42.0.145 (3 ms)
Using ethernet@15100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.145
Filename 'bpi-r4-6.9.0-main.itb'.
Load address: 0x48000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #######
         19.3 MiB/s
done
Bytes transferred = 8689788 (84987c hex)
MT7988> iminfo ${kaddr}

## Checking Image at 48000000 ...
   FIT image found
   FIT description: U-Boot fitImage for bpi-r4 aarch64 kernel
    Image 0 (kernel-1)
     Description:  Linux Kernel 6.9.0-main
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000e4
     Data Size:    8644795 Bytes = 8.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   756e34c0fa1b4179dd0b8cb1ddcd8b9115a302b1
    Image 1 (fdt-base)
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4883ea9c
     Data Size:    36871 Bytes = 36 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   691df0eaac37a425055fbdddc6dbd7f40e683040
    Image 2 (fdt-ov-sd)
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48847b7c
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
    Image 3 (fdt-ov-emmc)
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x488481a4
     Data Size:    1554 Bytes = 1.5 KiB
     Architecture: Unknown Architecture
    Image 4 (fdt-ov-wifi)
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48848814
     Data Size:    2311 Bytes = 2.3 KiB
     Architecture: Unknown Architecture
    Default Configuration: 'conf-sd'
    Configuration 0 (conf-base)
     Description:  Boot Linux kernel with base FDT blob
     Kernel:       kernel-1
     FDT:          fdt-base
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 1 (conf-sd)
     Description:  Boot Linux kernel with SD FDT blob
     Kernel:       kernel-1
     FDT:          fdt-base
                   fdt-ov-sd
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 2 (conf-emmc)
     Description:  Boot Linux kernel with EMMC FDT blob
     Kernel:       kernel-1
     FDT:          fdt-base
                   fdt-ov-emmc
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 3 (wifi)
     Description:  WIFI FDT Overlay
     Kernel:       unavailable
     FDT:          fdt-ov-wifi
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 4 (conf-sd-wifi)
     Description:  Boot Linux kernel with SD + WIFI FDT blob
     Kernel:       kernel-1
     FDT:          fdt-base
                   fdt-ov-sd
                   fdt-ov-wifi
     Hash algo:    sha1
     Hash value:   unavailable
## Checking hash(es) for FIT Image at 48000000 ...
   Hash(es) for Image 0 (kernel-1): sha1+ 
   Hash(es) for Image 1 (fdt-base): sha1+ 
   Hash(es) for Image 2 (fdt-ov-sd): 
   Hash(es) for Image 3 (fdt-ov-emmc): 
   Hash(es) for Image 4 (fdt-ov-wifi): 
MT7988> bootm ${kaddr}
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  Linux Kernel 6.9.0-main
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000e4
     Data Size:    8644795 Bytes = 8.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   756e34c0fa1b4179dd0b8cb1ddcd8b9115a302b1
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4883ea9c
     Data Size:    36871 Bytes = 36 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   691df0eaac37a425055fbdddc6dbd7f40e683040
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x4883ea9c to 0x47000000
## Loading fdt from FIT Image at 48000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  Flattened Device Tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48847b7c
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
   Verifying Hash Integrity ... OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000ff7eb000, end 00000000ff7f72b3 ... OK
Working FDT set to ff7eb000

Starting kernel ...

Iā€™ve tried @jcdutton 6.9.0-rc1 version and same results:

MT7988> setenv consoleargs "earlycon=uart8250,mmio32,0x11000000 console=ttyS0,115200n1 earlyprintk debug=7 loglevel=8 pci=pcie"
MT7988> setenv rootfs "root=/dev/mmcblk0p6 rootfstype=ext4 rootwait"
MT7988> setenv bootargs $consoleargs $rootfs
MT7988> setenv kaddr  0x48000000
MT7988> bootp ${kaddr} 10.42.0.1:Linux-6.9.0-rc1-bpi-r4-jcd6.itb
BOOTP broadcast 1
DHCP client bound to address 10.42.0.145 (3 ms)
Using ethernet@15100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.145
Filename 'Linux-6.9.0-rc1-bpi-r4-jcd6.itb'.
Load address: 0x48000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #####
         18.8 MiB/s
done
Bytes transferred = 8655000 (841098 hex)
MT7988> iminfo ${kaddr}

## Checking Image at 48000000 ...
   FIT image found
   FIT description: EasyOS Banana Pi R4 MT7988 FIT Image
    Image 0 (kernel-1)
     Description:  EasyOS Linux Kernel 6.9.0 BPi-R4
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000ec
     Data Size:    8609853 Bytes = 8.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   92f8ac6e685aaf46a7d2986466484523ef9668fa
    Image 1 (fdt-base)
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48836224
     Data Size:    36850 Bytes = 36 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   ea67991b555bdb7804c9228252045e6baef8d1d5
    Image 2 (fdt-ov-sd)
     Description:  BPi-R4 SD MMC FDT overlay blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4883f2f4
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
    Image 3 (fdt-ov-emmc)
     Description:  BPi-R4 eMMC FDT overlay blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4883f964
     Data Size:    1554 Bytes = 1.5 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   57ef67c8d0cdaa3cff850f1923dc90cff6a992f6
    Image 4 (fdt-ov-wifi)
     Description:  BPi-R4 WiFi FDT overlay blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4884001c
     Data Size:    2311 Bytes = 2.3 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   17cd8c60c48fdc3e40b55b409a9aef41a7b6a9a3
    Default Configuration: 'conf-sd'
    Configuration 0 (conf-base)
     Description:  Boot EasyOS Linux kernel 6.9.0 with base FDT blob
     Kernel:       kernel-1
     FDT:          fdt-base
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 1 (conf-sd)
     Description:  Boot EasyOS Linux kernel 6.9.0 with SD FDT blob
     Kernel:       kernel-1
     FDT:          fdt-base
                   fdt-ov-sd
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 2 (conf-emmc)
     Description:  Boot EasyOS Linux kernel 6.9.0 with EMMC FDT blob
     Kernel:       kernel-1
     FDT:          fdt-base
                   fdt-ov-emmc
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 3 (wifi)
     Description:  WIFI FDT Overlay
     Kernel:       unavailable
     FDT:          fdt-ov-wifi
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 4 (conf-sd-wifi)
     Description:  Boot EasyOS Linux kernel 6.9.0 with SD + WIFI FDT blob
     Kernel:       kernel-1
     FDT:          fdt-base
                   fdt-ov-sd
                   fdt-ov-wifi
     Hash algo:    sha1
     Hash value:   unavailable
## Checking hash(es) for FIT Image at 48000000 ...
   Hash(es) for Image 0 (kernel-1): sha1+ 
   Hash(es) for Image 1 (fdt-base): sha1+ 
   Hash(es) for Image 2 (fdt-ov-sd): sha1+ 
   Hash(es) for Image 3 (fdt-ov-emmc): sha1+ 
   Hash(es) for Image 4 (fdt-ov-wifi): sha1+ 
MT7988> bootm ${kaddr}
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.9.0 BPi-R4
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000ec
     Data Size:    8609853 Bytes = 8.2 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   92f8ac6e685aaf46a7d2986466484523ef9668fa
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x48836224
     Data Size:    36850 Bytes = 36 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   ea67991b555bdb7804c9228252045e6baef8d1d5
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x48836224 to 0x47000000
## Loading fdt from FIT Image at 48000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT overlay blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4883f2f4
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000ff7eb000, end 00000000ff7f729e ... OK
Working FDT set to ff7eb000

Starting kernel ...

Git Kernel version:

commit df6bdc5d68762ed2a23b846e52c359d8ce848ff8 (HEAD -> v6.9-rc1-bpi, origin/v6.9-rc1-bpi)
Author: 
Date:   Fri May 31 21:13:32 2024 +0100

    Add some build scripts for combining Adtran SDG-8734v and SDG-8733v in a single fit-multi.itb file
    

Example of booting 6.1.73 using similar .its file to build FIT:

MT7988> setenv kaddr  0x48000000
MT7988> setenv consoleargs "earlycon=uart8250,mmio32,0x11000000 console=ttyS0,115200n1 earlyprintk debug=7 loglevel=8 pci=pcie_
bus_perf consoleblank=0"
MT7988> setenv rootfs "root=/dev/mmcblk0p6 rootfstype=ext4 rootwait"
MT7988> setenv bootargs $consoleargs $rootfs
MT7988> bootp ${kaddr} 10.42.0.1:Linux-6.1.13-bpi-r4.itb
Unknown command 'bootp' - try 'help'
MT7988> bootp ${kaddr} 10.42.0.1:Linux-6.1.13-bpi-r4.itb
BOOTP broadcast 1
DHCP client bound to address 10.42.0.145 (2 ms)
Using ethernet@15100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.145
Filename 'Linux-6.1.13-bpi-r4.itb'.
Load address: 0x48000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###########################
         18.7 MiB/s
done
Bytes transferred = 7065604 (6bd004 hex)
MT7988> iminfo ${kaddr}

## Checking Image at 48000000 ...
   FIT image found
   FIT description: EasyOS Banana Pi R4 MT7988 FIT Image
    Image 0 (kernel-1)
     Description:  EasyOS Linux Kernel 6.1.73 BPi-R4
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000ec
     Data Size:    7005598 Bytes = 6.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   30fb6e22891b24f2c00a9b181e0ab675b0738a61
    Image 1 (fdt-sd)
     Description:  BPi-R4 SD MMC FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x486ae780
     Data Size:    28885 Bytes = 28.2 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   26dafddceb18f54cb2a8d5572b78dcb79c2e6660
    Image 2 (fdt-emmc)
     Description:  BPi-R4 eMMC FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x486b58f4
     Data Size:    28999 Bytes = 28.3 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   081292eee54b38d1687e5bc292d7101d2560976d
    Default Configuration: 'conf-sd'
    Configuration 0 (conf-sd)
     Description:  Boot EasyOS Linux kernel 6.1.73 with SD FDT blob
     Kernel:       kernel-1
     FDT:          fdt-sd
     Hash algo:    sha1
     Hash value:   unavailable
    Configuration 1 (conf-emmc)
     Description:  Boot EasyOS Linux kernel 6.1.73 with EMMC FDT blob
     Kernel:       kernel-1
     FDT:          fdt-emmc
     Hash algo:    sha1
     Hash value:   unavailable
## Checking hash(es) for FIT Image at 48000000 ...
   Hash(es) for Image 0 (kernel-1): sha1+ 
   Hash(es) for Image 1 (fdt-sd): sha1+ 
   Hash(es) for Image 2 (fdt-emmc): sha1+ 
MT7988> bootm ${kaddr}
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.1.73 BPi-R4
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000ec
     Data Size:    7005598 Bytes = 6.7 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   30fb6e22891b24f2c00a9b181e0ab675b0738a61
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x486ae780
     Data Size:    28885 Bytes = 28.2 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   26dafddceb18f54cb2a8d5572b78dcb79c2e6660
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x486ae780
Working FDT set to 486ae780
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000ff7ed000, end 00000000ff7f70d4 ... OK
Working FDT set to ff7ed000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    0.000000] Linux version 6.1.73 (adrian@Rzyen5900X) (aarch64-linux-gnu-gcc (Debian 13.2.0-12) 13.2.0, GNU ld (GNU Binutils 
for Debian) 2.42.50.20240710) #1 SMP Sun Jul 14 16:35:56 CEST 2024
[    0.000000] Machine model: Bananapi BPI-R4
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[    0.000000] printk: bootconsole [uart8250] enabled
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004304ffff]
[    0.000000]   node   0: [mem 0x0000000043050000-0x000000013fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000013fffffff]

As soon as bootm was given, I got similar out for FIT and Kernel boots. Very strange ā€¦

Yes! I managed to boot 6.9.0 @frank-w !

MT7988> setenv consoleargs "earlycon=uart8250,mmio32,0x11000000 console=ttyS0,115200n1 earlyprintk debug=7 loglevel=8 pci=pcie_
bus_perf consoleblank=0"
MT7988> setenv rootfs "root=/dev/mmcblk0p6 rootfstype=ext4 rootwait"
MT7988> setenv bootargs $consoleargs $rootfs
MT7988> setenv kaddr  0x48000000
MT7988> bootp ${kaddr} 10.42.0.1:Image-6.9.0-bpi-r4.itb
BOOTP broadcast 1
DHCP client bound to address 10.42.0.145 (3 ms)
Using ethernet@15100000 device
TFTP from server 10.42.0.1; our IP address is 10.42.0.145
Filename 'Image-6.9.0-bpi-r4.itb'.
Load address: 0x48000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##########################################
         20.5 MiB/s
done
Bytes transferred = 7285004 (6f290c hex)
MT7988> bootm ${kaddr}
## Loading kernel from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'kernel-1' kernel subimage
     Description:  EasyOS Linux Kernel 6.9.0 BPi-R4
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x480000ec
     Data Size:    7239839 Bytes = 6.9 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    sha1
     Hash value:   8ae5f17565e3550fd2202d44313dbdf481538798
   Verifying Hash Integrity ... sha1+ OK
## Loading fdt from FIT Image at 48000000 ...
   Using 'conf-sd' configuration
   Trying 'fdt-base' fdt subimage
     Description:  BPi-R4 base FDT blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x486e7a84
     Data Size:    36871 Bytes = 36 KiB
     Architecture: AArch64
     Load Address: 0x47000000
     Hash algo:    sha1
     Hash value:   691df0eaac37a425055fbdddc6dbd7f40e683040
   Verifying Hash Integrity ... sha1+ OK
   Loading fdt from 0x486e7a84 to 0x47000000
## Loading fdt from FIT Image at 48000000 ...
   Trying 'fdt-ov-sd' fdt subimage
     Description:  BPi-R4 SD MMC FDT overlay blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x486f0b68
     Data Size:    1482 Bytes = 1.4 KiB
     Architecture: Unknown Architecture
     Hash algo:    sha1
     Hash value:   4ddb0442509f1e0e66f70270ad0aad5b57894599
   Verifying Hash Integrity ... sha1+ OK
   Booting using the fdt blob at 0x47000000
Working FDT set to 47000000
   Uncompressing Kernel Image to 44000000
   Loading Device Tree to 00000000ff7eb000, end 00000000ff7f72b3 ... OK
Working FDT set to ff7eb000

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd090]
[    0.000000] Linux version 6.9.0 (adrian@Rzyen5900X) (aarch64-linux-gnu-gcc (Debian 13.2.0-12) 13.2.0, GNU ld (GNU Binutils f
or Debian) 2.42.50.20240710) #12 SMP Sun Jul 14 23:21:00 CEST 2024
[    0.000000] Machine model: Banana Pi BPI-R4
[    0.000000] earlycon: uart8250 at MMIO32 0x0000000011000000 (options '')
[    0.000000] printk: legacy bootconsole [uart8250] enabled
[    0.000000] OF: reserved mem: 0x0000000042ff0000..0x0000000042ffffff (64 KiB) map non-reusable ramoops@42ff0000
[    0.000000] OF: reserved mem: 0x0000000043000000..0x000000004304ffff (320 KiB) nomap non-reusable secmon@43000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000ffffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004304ffff]
[    0.000000]   node   0: [mem 0x0000000043050000-0x000000013fffffff]

But not with the build.sh binary! I found out what was the problem in my build: dtc needs DTC_FLAGS="-@" to build the correct DTBOs.

So these are my stepts:

git clone https://github.com/frank-w/BPI-Router-Linux/ -b 6.9-main linux-6.9.0-bpi-r4
cd linux-6.9.0-bpi-r4
export BUILD=build-mt7988
rm -rf ${BUILD}/INSTALL
# Build default BPI-R4 config
make ARCH=arm64 O=${BUILD}/ mt7988a_bpi-r4_defconfig
# Edit as your needs
make ARCH=arm64 O=${BUILD}/ menuconfig
make DTC_FLAGS=-@ O=${BUILD}/ ARCH=arm64 LOCALVERSION= -j$(nproc)
make DTC_FLAGS=-@ O=${BUILD}/ ARCH=arm64 LOCALVERSION= INSTALL_PATH=INSTALL
INSTALL_MOD_PATH=INSTALL INSTALL_DTS_PATH=INSTALL INSTALL_HDR_PATH=INSTALL/headers all headers_install dtbs_install modules_install Image install zinstall -j24

LOCALVERSION= I used to not get sometimes a Kernel name with ā€œ+ā€ sign in the end of the name.

Under ${BUILD} directory Iā€™ve created this Linux-6.9.0-bpi-r4.its file:

/dts-v1/;

/ {
        description = "EasyOS Banana Pi R4 MT7988 FIT Image";
        #address-cells = <1>;

        images {
                kernel-1 {
                        description = "EasyOS Linux Kernel 6.9.0 BPi-R4";
                        data = /incbin/("arch/arm64/boot/Image.gz");
                        type = "kernel";
                        arch = "arm64";
                        os = "linux";
                        compression = "gzip";
                        load = <0x44000000>;
                        entry = <0x44000000>;
                        hash-1 {
                                algo = "sha1";
                        };
                };
                fdt-base {
                        description = "BPi-R4 base FDT blob";
                        data = /incbin/("arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dtb");
                        type = "flat_dt";
                        arch = "arm64";
                        load = <0x47000000>;
                        compression = "none";
                        hash-1 {
                                algo = "sha1";
                        };
                };
                fdt-ov-sd {
                        description = "BPi-R4 SD MMC FDT overlay blob";
                        data = /incbin/("arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-sd.dtbo");
                        type = "flat_dt";
                        hash-1 {
                                algo = "sha1";
                        };
                };
                fdt-ov-emmc {
                        description = "BPi-R4 eMMC FDT overlay blob";
                        data = /incbin/("arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-emmc.dtbo");
                        type = "flat_dt";
                        hash-1 {
                                algo = "sha1";
                        };
                };
                fdt-ov-wifi {
                        description = "BPi-R4 WiFi FDT overlay blob";
                        data = /incbin/("arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4-wifi-mt7996a.dtbo");
                        type = "flat_dt";
                        hash-1 {
                                algo = "sha1";
                        };
                };
        };
        configurations {
                default = "conf-sd";

                conf-base {
                        description = "Boot EasyOS Linux kernel 6.9.0 with base FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-base";
                        //ramdisk = "ramdisk-1";
                        hash-1 {
                                algo = "sha1";
                        };
                };
                conf-sd {
                        description = "Boot EasyOS Linux kernel 6.9.0 with SD FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-base", "fdt-ov-sd";
                        //ramdisk = "ramdisk-1";
                        hash-1 {
                                algo = "sha1";
                        };
                };
                conf-emmc {
                        description = "Boot EasyOS Linux kernel 6.9.0 with EMMC FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-base", "fdt-ov-emmc";
                        //ramdisk = "ramdisk-1";
                        hash-1 {
                                algo = "sha1";
                        };
                };
                wifi {
                        description = "WIFI FDT Overlay";
                        fdt = "fdt-ov-wifi";
                        hash-1 {
                                algo = "sha1";
                        };
                };
                conf-sd-wifi {
                        description = "Boot EasyOS Linux kernel 6.9.0 with SD + WIFI FDT blob";
                        kernel = "kernel-1";
                        fdt = "fdt-base", "fdt-ov-sd", "fdt-ov-wifi";
                        //ramdisk = "ramdisk-1";
                        hash-1 {
                                algo = "sha1";
                        };
                };
        };

};

Make FIT image:

mkimage -f Linux-6.9.0-bpi-r4.its Linux-6.9.0-bpi-r4.itb

Then using these commands in U-boot to load kernel from TFTP server:

setenv consoleargs "earlycon=uart8250,mmio32,0x11000000 console=ttyS0,115200n1 earlyprintk debug=7 loglevel=8 pci=pcie_bus_perf consoleblank=0"
setenv rootfs "root=/dev/mmcblk0p6 rootfstype=ext4 rootwait"
setenv bootargs $consoleargs $rootfs

setenv kaddr  0x48000000

bootp ${kaddr} 10.42.0.1:Linux-6.9.0-bpi-r4.itb

Why the FIT image generated by your build.sh script didnā€™t worked ā€¦ I have no clue :|. But at least we can build the kernel without using the script.

LE// There is a problem with this 6.9.0:

root@EasyOS:/home/adrian# ip a l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host noprefixroute 
       valid_lft forever preferred_lft forever

Doesnā€™t see the network interfaces. I will check the Linux Kernel configuration. Hope the DTB/DTBO are ok.

It is a script and i already set this flag

Yes. I saw it after searching into the script. Thanks for pointing it.

Ok. Iā€™ve notice why your Kernel or any 6.9.x kernel is not booting. Is about the config. I took the config from 6.1.73, put it on your 6.9 and I could boot. As soon I use default mt7988a_bpi-r4_defconfig it doesnā€™t boot. Now Iā€™m trying to enable options in 6.1.73 base config to see which is the option which is not allowing the kernel to boot.

Where do you get this? If you took it from openwrt it is only a subset of options and miss the generic options set before.

But you should create a new topic as this is unrelated to ā€œtodo listā€

mt7988a_bpi-r4_defconfig I took from you linux-6.9.0-bpi-r4 generated by ./build.sh or by make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=build-mt7988 mt7988a_bpi-r4_defconfig

I created a new folder build-7988_2 and copied the config from 6.1.73 BSP version.

Then I open 2 terminals side-by-side and run make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- O=build-7988 and O=build-7988_2 and Iā€™ve checked the options.

As soon I activated some options in the working configuration (comparing with configuration of the kernel that is not booting) also this one failed to boot. Now Iā€™m looking to these 2:

507c507
< CONFIG_RELOCATABLE=y
---
> # CONFIG_RELOCATABLE is not set
714,715d713
< CONFIG_ARCH_HAS_RELR=y
< CONFIG_RELR=y

When Iā€™m setting [*] Build a relocatable kernel image then the kernel is not booting. Took me 6h to find out this issue.

I still have 2 options to check:

CONFIG_STACKPROTECTOR_STRONG=y
CONFIG_COMPAT_32BIT_TIME=y

Hi,

Which is the status of RSS/LRO in 6.9 or 6.10?

I did some tests with frank-w kernels 6.9 with rsslro version and I was able to get between 5.5 and 6.1Gbps traffic between the SFP ports in routing mode. But the main branch is limited around 3.1 Gbps.

To get 6.1 Gbps with RSS/LRO Kernel version I have to use multiple streams and I notice the traffic is distributed over all CPUs.

Afaik it is same state like the 6.9 tree as we all bound to different things :frowning: also want rss/lro working to have 10g finally working but busy with other zhings

1 Like

any updates on rss/lro for mt7988a?

is rss/lro even working on mtk sdk? I had a quick test on bpiā€™s openwrt mp4.0 sdk image and it doesnā€™t appear so. or am i missing something?

@jcdutton could you change the OP to wiki mode? Then people commenting updates could update your todo list as well. Would make it easier to track, if all todos are in the first post and not spread across the whole thread.

There is an option for that in the triple dot menu at the bottom right of the post.

@totkeks I have turned it into a wiki. Thank you for showing me how.

Not yet,also waiting for it, got info that some users were working on it,but saw no code yet

Currently upstreaming some parts for basic support we already have in openwrt/my repo to have it mainline.

I was looking at the rss/lro for mt7988a at one point, but concluded it was going to make the driver source code so messy, I gave up. I think the solution is to break the mt7988 driver into a separate driver and keep the code much cleaner and easier to read that way.

So from the test above, we still need something else to reach full 10gbps speed even after rss/lro landed. Whatā€™s still limiting the speed?