[BPI-R2] Kernel Development

john posted hwnat-patch for openwrt

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/mediatek/patches-5.4/0999-hnat.patch;h=ad04e355e62ade948c701b8ff9f7165f4ce347b3;hb=8021652478db50f5739bc2d8d8425cabc6e5d957

Yes that good to hear. I saw this was pushed to OpenWRT trunk.

Also 4.14 support in Mediatek was dropped and they made 5.4 kernel the default.

fetched openwrt source yesterdayā€¦there was 4.19 default and 5.4 default debug kernel

indeed, it has changed: https://github.com/openwrt/openwrt/commit/86db1f69c4fbaaa987a391351f17c852bcf39cfa

could you try hwnat? maybe i can add it to my 5.4

I can try later today to compile an OpenWRT image from trunk to test the new HW NAT functionality in Mediatek.

But what do I need to select as Target Images ext4 and tar.gz ?

I used tar.gz and unpacked to sdcard containing my debianā€¦just created a 3rd partition and changed root+console in uenv.txtā€¦

https://wiki.fw-web.de/doku.php?id=en:bpi-r2:openwrt

btw. can anybody test trgmii-mode?

I have compiled latest OpenWRT trunk and successfully generated a tar.gz file but the file size is rather small around 2.7 MB. I do not see in the archive any kernel or boot folder.

-rw-r--r-- 1 cioby users 2.7M Apr  6 21:24 openwrt-mediatek-mt7623-bpi_bananapi-r2-rootfs.tar.gz

the size is because there are not much tools integrated (needs to be selected in menuconfig)ā€¦itā€™s bootable, but you have to select tools you need

Strange I cannot see any kernel inside the tar.gz archive This is the folder content

du -sch *
580K    bin
4.0K    dev
680K    etc
1.8M    lib
4.0K    mnt
4.0K    overlay
4.0K    proc
8.0K    rom
4.0K    root
568K    sbin
4.0K    sys
4.0K    tmp
5.5M    usr
0       var
1.1M    www
11M     total

It is only rootfsā€¦i use my existing kernel (used for debian) but load rootfs of openwrtā€¦

So I should unpack your 5.4 kernel from your github repo into the sdcard partition ?

I see OpenWRT has 5.4.28 as latest kernel but your repo has released 5.4.27 then 5.4.30

you can install my kernel on BPI-BOOT-partition and unpack tar.gz to another partition (in my case newly created 3rd partition), change uenv.txt (root to mmcblk0p3 and console to make ttyS0 first)

i guess you need to copy modules from debian to openwrt too, but this is only a quick test for building dual-boot function on existing image till openwrt can build a complete image

i have not found out how to select some packages without selecting them in menuconfigā€¦iā€™m searching for a kind of defconfig for the selected arch/soc/board

I managed to boot using your latest 5.4.30 kernel and it almost completed but the i did not get to the CLI when connected to the serial port. I can type but do not see any shell prompt. Below is the boot log.

Boot from SD
fatload (uEnv.txt) failed
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
bootargs=board=bpi-r2 earlyprintk console=tty1 fbcon=map:0 console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait vmalloc=496M debug=7 initcall_debug=0 video=1920x1080 drm.debug7
8452480 bytes read in 422 ms (19.1 MiB/s)
## Booting kernel from Legacy Image at 80200000 ...
   Image Name:   Linux Kernel 5.4.30-main
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    8452416 Bytes = 8.1 MiB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

[    4.820418] printk: console [ttyS0] enabled
[    4.828819] printk: bootconsole [earlycon0] disabled
[    4.860008] 11002000.serial: ttyS1 at MMIO 0x11002000 (irq = 202, base_baud = 1625000) is a ST16650V2
[    4.890474] 11003000.serial: ttyS2 at MMIO 0x11003000 (irq = 203, base_baud = 1625000) is a ST16650V2
[    4.901062] mtk_rng 1020f000.rng: registered RNG driver
[    4.901210] random: fast init done
[    4.906616] [drm:drm_core_init] Initialized
[    4.909949] random: crng init done
[    4.917506] mediatek-drm 14000000.dispsys: Adding component match for /ovl@14007000
[    4.925248] mediatek-drm 14000000.dispsys: Adding component match for /rdma@14008000
[    4.933127] mediatek-drm 14000000.dispsys: Adding component match for /color@1400b000
[    4.941070] mediatek-drm 14000000.dispsys: Adding component match for /rdma@14012000
[    4.948858] mediatek-drm 14000000.dispsys: Adding component match for /dpi@14014000
[    4.958601] mediatek-hdmi-phy 10209100.phy: Using default TX DRV impedance: 4.2k/36
[    4.968800] [drm] hdmi-audio-codec driver bound to HDMI
[    4.984541] loop: module loaded
[    4.987966] [WMT-DETECT][I]wmt_detect_driver_init:driver(major 154) installed success
[    4.995859] [SDIO-DETECT][I]sdio_detect_init:sdio_register_driver() ret=0
[    5.002894] MTK-BTIF[E]hal_btif_clk_get_and_prepare(286):[CCF]clk_btif=b99b2adc
[    5.010254] MTK-BTIF[E]hal_btif_clk_get_and_prepare(292):[CCF]clk_btif_apdma=b63ef73b
[    5.020283] mt6323-regulator mt6323-regulator: Chip ID = 0x2023
[    5.035609] Uniform Multi-Platform E-IDE driver
[    5.040325] ide-gd driver 1.18
[    5.044003] mdio_bus fixed-0: GPIO lookup for consumer reset
[    5.049725] mdio_bus fixed-0: using lookup tables for GPIO lookup
[    5.055832] mdio_bus fixed-0: No GPIO consumer reset found
[    5.061363] libphy: Fixed MDIO Bus: probed
[    5.088736] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mac@0/fixed-link[0]'
[    5.099883] mdio_bus mdio-bus: GPIO lookup for consumer reset
[    5.105638] mdio_bus mdio-bus: using device tree for GPIO lookup
[    5.111694] of_get_named_gpiod_flags: can't parse 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus[0]'
[    5.121991] of_get_named_gpiod_flags: can't parse 'reset-gpio' property of node '/ethernet@1b100000/mdio-bus[0]'
[    5.132189] mdio_bus mdio-bus: using lookup tables for GPIO lookup
[    5.138385] mdio_bus mdio-bus: No GPIO consumer reset found
[    5.143958] libphy: mdio: probed
[    5.147495] mt7530 mdio-bus:00: GPIO lookup for consumer reset
[    5.153369] mt7530 mdio-bus:00: using device tree for GPIO lookup
[    5.159511] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus/switch@0[0]' - status (0)
[    5.171301] gpio gpiochip0: Persistence not supported for GPIO 33
[    5.177674] mtk_soc_eth 1b100000.ethernet: generated random MAC address 2a:8e:25:b7:4e:04
[    5.186420] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xe14c0000, irq 239
[    5.196094] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    5.201401] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 1
[    5.212349] xhci-mtk 1a1c0000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    5.221506] xhci-mtk 1a1c0000.usb: irq 236, io mem 0x1a1c0000
[    5.228406] hub 1-0:1.0: USB hub found
[    5.232223] hub 1-0:1.0: 1 port detected
[    5.236619] xhci-mtk 1a1c0000.usb: xHCI Host Controller
[    5.241905] xhci-mtk 1a1c0000.usb: new USB bus registered, assigned bus number 2
[    5.249348] xhci-mtk 1a1c0000.usb: Host supports USB 3.0 SuperSpeed
[    5.255725] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.264634] hub 2-0:1.0: USB hub found
[    5.268478] hub 2-0:1.0: 1 port detected
[    5.273573] xhci-mtk 1a240000.usb: xHCI Host Controller
[    5.278878] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 3
[    5.289664] xhci-mtk 1a240000.usb: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    5.298824] xhci-mtk 1a240000.usb: irq 237, io mem 0x1a240000
[    5.305667] hub 3-0:1.0: USB hub found
[    5.309528] hub 3-0:1.0: 1 port detected
[    5.313916] xhci-mtk 1a240000.usb: xHCI Host Controller
[    5.319192] xhci-mtk 1a240000.usb: new USB bus registered, assigned bus number 4
[    5.326608] xhci-mtk 1a240000.usb: Host supports USB 3.0 SuperSpeed
[    5.332990] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.342036] hub 4-0:1.0: USB hub found
[    5.345860] hub 4-0:1.0: 1 port detected
[    5.350544] usbcore: registered new interface driver usb-storage
[    5.357014] mousedev: PS/2 mouse device common for all mice
[    5.364241] mt6397-rtc mt6323-rtc: registered as rtc0
[    5.371330] Registered IR keymap rc-empty
[    5.375453] rc rc0: mtk_cir as /devices/platform/10013000.cir/rc/rc0
[    5.382203] rc rc0: lirc_dev: driver mtk_cir registered at minor = 0, raw IR receiver, no transmitter
[    5.391637] input: mtk_cir as /devices/platform/10013000.cir/rc/rc0/input0
[    5.399022] mtk_cir 10013000.cir: Initialized MT7623 IR driver, sample period = 46us
[    5.407739] mtk-jpeg 15004000.jpegdec: decoder device registered as /dev/video3 (81,0)
[    5.416446] MTK_WDT_NONRST_REG(0)
[    5.420650] mtk-wdt 10007000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    5.429414] device-mapper: ioctl: 4.41.0-ioctl (2019-09-16) initialised: [email protected]
[    5.438314] device-mapper: multipath round-robin: version 1.2.0 loaded
[    5.444856] device-mapper: multipath queue-length: version 0.2.0 loaded
[    5.451497] device-mapper: multipath service-time: version 0.3.0 loaded
[    5.458337] device-mapper: raid: Loading target version 1.14.0
[    5.464709] cpu cpu0: dummy supplies not allowed for exclusive requests
[    5.473773] mtk-msdc 11240000.mmc: GPIO lookup for consumer cd
[    5.479659] mtk-msdc 11240000.mmc: using device tree for GPIO lookup
[    5.486061] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/mmc@11240000[0]' - status (0)
[    5.495596] gpio gpiochip0: Persistence not supported for GPIO 261
[    5.501809] mtk-msdc 11240000.mmc: Got CD GPIO
[    5.506260] mtk-msdc 11240000.mmc: GPIO lookup for consumer wp
[    5.512119] mtk-msdc 11240000.mmc: using device tree for GPIO lookup
[    5.518503] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11240000[0]'
[    5.527303] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11240000[0]'
[    5.536025] mtk-msdc 11240000.mmc: using lookup tables for GPIO lookup
[    5.542569] mtk-msdc 11240000.mmc: No GPIO consumer wp found
[    5.575383] mtk-msdc 11230000.mmc: GPIO lookup for consumer wp
[    5.581276] mtk-msdc 11230000.mmc: using device tree for GPIO lookup
[    5.587654] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/mmc@11230000[0]'
[    5.596478] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/mmc@11230000[0]'
[    5.605204] mtk-msdc 11230000.mmc: using lookup tables for GPIO lookup
[    5.611753] mtk-msdc 11230000.mmc: No GPIO consumer wp found
[    5.644527] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/blue[0]' - status (0)
[    5.651153] mmc0: host does not support reading read-only switch, assuming write-enable
[    5.653587] gpio gpiochip0: Persistence not supported for GPIO 240
[    5.663777] mmc0: new high speed SDHC card at address 0001
[    5.667719] no flags found for gpios
[    5.674500] mmcblk0: mmc0:0001 EB1QT 29.8 GiB 
[    5.677010] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/green[0]' - status (0)
[    5.690428] gpio gpiochip0: Persistence not supported for GPIO 241
[    5.691899]  mmcblk0: p1 p2
[    5.696622] no flags found for gpios
[    5.703202] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/red[0]' - status (0)
[    5.712154] gpio gpiochip0: Persistence not supported for GPIO 239
[    5.718361] no flags found for gpios
[    5.730513] hidraw: raw HID events driver (C) Jiri Kosina
[    5.736110] usbcore: registered new interface driver usbhid
[    5.741731] usbhid: USB HID core driver
[    5.746934] mtk-iommu-v1 10205000.mmsys_iommu: bound 14010000.larb (ops mtk_smi_larb_component_ops)
[    5.756040] mtk-iommu-v1 10205000.mmsys_iommu: bound 16010000.larb (ops mtk_smi_larb_component_ops)
[    5.765120] mtk-iommu-v1 10205000.mmsys_iommu: bound 15001000.larb (ops mtk_smi_larb_component_ops)
[    5.775446] drop_monitor: Initializing network drop monitor service
[    5.782721] NET: Registered protocol family 10
[    5.788326] Segment Routing with IPv6
[    5.792080] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.798752] NET: Registered protocol family 17
[    5.803272] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    5.816841] NET: Registered protocol family 41
[    5.821495] 8021q: 802.1Q VLAN Support v1.8
[    5.826190] ThumbEE CPU extension supported.
[    5.830532] Registering SWP/SWPB emulation handler
[    5.835649] Loading compiled-in X.509 certificates
[    5.862948] mtk-pcie 1a140000.pcie: host bridge /pcie@1a140000 ranges:
[    5.869605] mtk-pcie 1a140000.pcie:    IO 0x1a160000..0x1a16ffff -> 0x1a160000
[    5.876854] mtk-pcie 1a140000.pcie:   MEM 0x60000000..0x6fffffff -> 0x60000000
[    5.932460] mtk-pcie 1a140000.pcie: PCI host bridge to bus 0000:00
[    5.938718] pci_bus 0000:00: root bus resource [bus 00-ff]
[    5.944213] pci_bus 0000:00: root bus resource [io  0x0000-0xffff] (bus address [0x1a160000-0x1a16ffff])
[    5.953721] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    5.960648] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    5.966689] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    5.973048] pci 0000:00:00.0: supports D1
[    5.977063] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    5.983284] pci 0000:00:01.0: [14c3:0801] type 01 class 0x060400
[    5.989376] pci 0000:00:01.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    5.995714] pci 0000:00:01.0: supports D1
[    5.999766] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    6.008500] PCI: bus0: Fast back to back transfers disabled
[    6.014091] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.022136] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    6.030362] pci 0000:01:00.0: [168c:003c] type 00 class 0x028000
[    6.036421] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    6.043282] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    6.050105] pci 0000:01:00.0: supports D1 D2
[    6.056561] mmc1: new high speed MMC card at address 0001
[    6.063278] mmcblk1: mmc1:0001 8WPD3R 7.28 GiB 
[    6.068679] mmcblk1boot0: mmc1:0001 8WPD3R partition 1 4.00 MiB
[    6.075374] mmcblk1boot1: mmc1:0001 8WPD3R partition 2 4.00 MiB
[    6.084375] PCI: bus1: Fast back to back transfers disabled
[    6.090025] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    6.096908] pci 0000:02:00.0: [1b21:0611] type 00 class 0x010185
[    6.103000] pci 0000:02:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[    6.110076] pci 0000:02:00.0: reg 0x10: [io  size 0x0008]
[    6.115486] pci 0000:02:00.0: reg 0x14: initial BAR value 0x00000000 invalid
[    6.122564] pci 0000:02:00.0: reg 0x14: [io  size 0x0004]
[    6.127991] pci 0000:02:00.0: reg 0x18: initial BAR value 0x00000000 invalid
[    6.135043] pci 0000:02:00.0: reg 0x18: [io  size 0x0008]
[    6.140466] pci 0000:02:00.0: reg 0x1c: initial BAR value 0x00000000 invalid
[    6.147518] pci 0000:02:00.0: reg 0x1c: [io  size 0x0004]
[    6.152940] pci 0000:02:00.0: reg 0x20: initial BAR value 0x00000000 invalid
[    6.160007] pci 0000:02:00.0: reg 0x20: [io  size 0x0010]
[    6.165417] pci 0000:02:00.0: reg 0x24: [mem 0x00000000-0x000001ff]
[    6.171710] pci 0000:02:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    6.178830] mmcblk1rpmb: mmc1:0001 8WPD3R partition 3 512 KiB, chardev (246:0)
[    6.210687] PCI: bus2: Fast back to back transfers disabled
[    6.216295] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    6.223022] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x601fffff]
[    6.229852] pci 0000:00:00.0: BAR 9: assigned [mem 0x60200000-0x602fffff pref]
[    6.237086] pci 0000:00:01.0: BAR 8: assigned [mem 0x60300000-0x603fffff]
[    6.243900] pci 0000:00:01.0: BAR 9: assigned [mem 0x60400000-0x604fffff pref]
[    6.251157] pci 0000:00:00.0: BAR 1: assigned [mem 0x60500000-0x6050ffff]
[    6.257976] pci 0000:00:01.0: BAR 1: assigned [mem 0x60510000-0x6051ffff]
[    6.264772] pci 0000:00:01.0: BAR 7: assigned [io  0x1000-0x1fff]
[    6.270890] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x601fffff 64bit]
[    6.278236] pci 0000:01:00.0: BAR 6: assigned [mem 0x60200000-0x6020ffff pref]
[    6.285467] pci 0000:00:00.0: PCI bridge to [bus 01]
[    6.290449] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x601fffff]
[    6.297243] pci 0000:00:00.0:   bridge window [mem 0x60200000-0x602fffff pref]
[    6.304495] pci 0000:02:00.0: BAR 6: assigned [mem 0x60400000-0x6040ffff pref]
[    6.311738] pci 0000:02:00.0: BAR 5: assigned [mem 0x60300000-0x603001ff]
[    6.318549] pci 0000:02:00.0: BAR 4: assigned [io  0x1000-0x100f]
[    6.324650] pci 0000:02:00.0: BAR 0: assigned [io  0x1010-0x1017]
[    6.330762] pci 0000:02:00.0: BAR 2: assigned [io  0x1018-0x101f]
[    6.336864] pci 0000:02:00.0: BAR 1: assigned [io  0x1020-0x1023]
[    6.342979] pci 0000:02:00.0: BAR 3: assigned [io  0x1024-0x1027]
[    6.349091] pci 0000:00:01.0: PCI bridge to [bus 02]
[    6.354059] pci 0000:00:01.0:   bridge window [io  0x1000-0x1fff]
[    6.360170] pci 0000:00:01.0:   bridge window [mem 0x60300000-0x603fffff]
[    6.366963] pci 0000:00:01.0:   bridge window [mem 0x60400000-0x604fffff pref]
[    6.374471] pcieport 0000:00:00.0: enabling device (0140 -> 0142)
[    6.380836] pcieport 0000:00:00.0: PME: Signaling with IRQ 250
[    6.387069] pcieport 0000:00:00.0: AER: enabled with IRQ 250
[    6.393145] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    6.399497] pcieport 0000:00:01.0: PME: Signaling with IRQ 231
[    6.405704] pcieport 0000:00:01.0: AER: enabled with IRQ 231
[    6.411847] ahci 0000:02:00.0: version 3.0
[    6.415967] ahci 0000:02:00.0: enabling device (0140 -> 0143)
[    6.421884] ahci 0000:02:00.0: SSS flag set, parallel bus scan disabled
[    6.428585] ahci 0000:02:00.0: AHCI 0001.0200 32 slots 2 ports 6 Gbps 0x3 impl IDE mode
[    6.436601] ahci 0000:02:00.0: flags: 64bit ncq sntf stag led clo pmp pio slum part ccc sxs 
[    6.446686] scsi host0: ahci
[    6.450346] scsi host1: ahci
[    6.453540] ata1: SATA max UDMA/133 abar m512@0x60300000 port 0x60300100 irq 231
[    6.461002] ata2: SATA max UDMA/133 abar m512@0x60300000 port 0x60300180 irq 231
[    6.468879] mediatek-dpi 14014000.dpi: Found bridge node: /hdmi@14015000
[    6.475864] mediatek-drm 14000000.dispsys: bound 14007000.ovl (ops mtk_disp_ovl_component_ops)
[    6.484550] mediatek-drm 14000000.dispsys: bound 14008000.rdma (ops mtk_disp_rdma_component_ops)
[    6.493370] mediatek-drm 14000000.dispsys: bound 1400b000.color (ops mtk_disp_color_component_ops)
[    6.502356] mediatek-drm 14000000.dispsys: bound 14012000.rdma (ops mtk_disp_rdma_component_ops)
[    6.511200] [drm:drm_connector_init] cmdline mode for connector HDMI-A-1  1920x1080@60Hz
[    6.519328] mediatek-drm 14000000.dispsys: bound 14014000.dpi (ops mtk_dpi_component_ops)
[    6.527583] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[    6.534220] [drm] No driver support for vblank timestamp query.
[    6.540183] [drm:drm_minor_register] 
[    6.543848] [drm:drm_minor_register] 
[    6.547890] [drm:drm_minor_register] new minor registered 0
[    6.553630] [drm:drm_sysfs_connector_add] adding "HDMI-A-1" to sysfs
[    6.560019] [drm:drm_sysfs_hotplug_event] generating hotplug event
[    6.566249] [drm] Initialized mediatek 1.0.0 20150513 for 14000000.dispsys on minor 0
[    6.574120] [drm:drm_client_modeset_probe] 
[    6.578328] [drm:drm_mode_object_get] OBJ ID: 32 (2)
[    6.583304] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:32:HDMI-A-1]
[    6.590813] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:32:HDMI-A-1] status updated from unknown to disconnected
[    6.602142] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:32:HDMI-A-1] disconnected
[    6.610778] [drm:drm_client_modeset_probe] No connectors reported connected with modes
[    6.618714] [drm:drm_client_modeset_probe] connector 32 enabled? no
[    6.624988] [drm:drm_client_modeset_probe] Not using firmware configuration
[    6.631969] [drm:drm_client_modeset_probe] picking CRTCs for 4096x4096 config
[    6.639123] [drm:drm_mode_object_put.part.1] OBJ ID: 32 (2)
[    6.644703] [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 0 primary plane
[    6.652551] [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 1 primary plane
[    6.660393] [drm] Cannot find any crtc or sizes
[    6.665315] mt7530 mdio-bus:00: GPIO lookup for consumer reset
[    6.671192] mt7530 mdio-bus:00: using device tree for GPIO lookup
[    6.677320] of_get_named_gpiod_flags: parsed 'reset-gpios' property of node '/ethernet@1b100000/mdio-bus/switch@0[0]' - status (0)
[    6.689117] gpio gpiochip0: Persistence not supported for GPIO 33
[    6.695301] [drm:drm_sysfs_hotplug_event] generating hotplug event
[    6.701574] [drm:drm_client_modeset_probe] 
[    6.705775] [drm:drm_mode_object_get] OBJ ID: 32 (2)
[    6.710774] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:32:HDMI-A-1]
[    6.718287] [drm:drm_helper_probe_single_connector_modes] [CONNECTOR:32:HDMI-A-1] disconnected
[    6.726913] [drm:drm_client_modeset_probe] No connectors reported connected with modes
[    6.734860] [drm:drm_client_modeset_probe] connector 32 enabled? no
[    6.741151] [drm:drm_client_modeset_probe] Not using firmware configuration
[    6.748134] [drm:drm_client_modeset_probe] picking CRTCs for 4096x4096 config
[    6.755278] [drm:drm_mode_object_put.part.1] OBJ ID: 32 (2)
[    6.760871] [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 0 primary plane
[    6.768724] [drm:__drm_fb_helper_initial_config_and_unlock] test CRTC 1 primary plane
[    6.776557] [drm] Cannot find any crtc or sizes
[    6.781110] mediatek-drm 14000000.dispsys: [drm:drm_client_dev_hotplug] fbdev: ret=0
[    6.795658] mdio_bus dsa-0.0: GPIO lookup for consumer reset
[    6.799364] ata1: SATA link down (SStatus 0 SControl 300)
[    6.801362] mdio_bus dsa-0.0: using lookup tables for GPIO lookup
[    6.812840] mdio_bus dsa-0.0: No GPIO consumer reset found
[    6.818725] mdio_bus dsa-0.0:00: GPIO lookup for consumer reset
[    6.824656] mdio_bus dsa-0.0:00: using lookup tables for GPIO lookup
[    6.831047] mdio_bus dsa-0.0:00: No GPIO consumer reset found
[    6.837237] mdio_bus dsa-0.0:01: GPIO lookup for consumer reset
[    6.843195] mdio_bus dsa-0.0:01: using lookup tables for GPIO lookup
[    6.849570] mdio_bus dsa-0.0:01: No GPIO consumer reset found
[    6.855761] mdio_bus dsa-0.0:02: GPIO lookup for consumer reset
[    6.861725] mdio_bus dsa-0.0:02: using lookup tables for GPIO lookup
[    6.868102] mdio_bus dsa-0.0:02: No GPIO consumer reset found
[    6.874252] mdio_bus dsa-0.0:03: GPIO lookup for consumer reset
[    6.880212] mdio_bus dsa-0.0:03: using lookup tables for GPIO lookup
[    6.886572] mdio_bus dsa-0.0:03: No GPIO consumer reset found
[    6.892731] mdio_bus dsa-0.0:04: GPIO lookup for consumer reset
[    6.898695] mdio_bus dsa-0.0:04: using lookup tables for GPIO lookup
[    6.905054] mdio_bus dsa-0.0:04: No GPIO consumer reset found
[    6.910923] libphy: dsa slave smi: probed
[    6.915271] mt7530 mdio-bus:00 wan (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[    6.924533] mt7530 mdio-bus:00 lan0 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[    6.933815] mt7530 mdio-bus:00 lan1 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[    6.943089] mt7530 mdio-bus:00 lan2 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[    6.952356] mt7530 mdio-bus:00 lan3 (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[    6.961626] of_get_named_gpiod_flags: can't parse 'link-gpios' property of node '/ethernet@1b100000/mdio-bus/switch@0/ports/port@6/fixed-link[0]'
[    6.974939] mt7530 mdio-bus:00: configuring for fixed/rgmii link mode
[    6.986467] mt7530 mdio-bus:00: Link is Up - 1Gbps/Full - flow control rx/tx
[    6.994192] DSA: tree 0 setup
[    6.997753] mt6397-rtc mt6323-rtc: setting system clock to 2010-01-01T00:00:14 UTC (1262304014)
[    7.006748] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    7.017628] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    7.024645] ALSA device list:
[    7.027624]   No soundcards found.
[    7.031589] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    7.040240] cfg80211: failed to load regulatory.db
[    7.141371] ata2: SATA link down (SStatus 0 SControl 300)
[    7.146909] md: Waiting for all devices to be available before autodetect
[    7.153728] md: If you don't use raid, use raid=noautodetect
[    7.160168] md: Autodetecting RAID arrays.
[    7.164276] md: autorun ...
[    7.167067] md: ... autorun DONE.
[    7.183647] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    7.191878] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
[    7.200728] devtmpfs: mounted
[    7.206955] Freeing unused kernel memory: 1024K
[    7.238132] Run /sbin/init as init process
[    7.377630] init: Console is alive
[    7.381914] init: - watchdog -
[    7.390556] kmodloader: no module folders for kernel version 5.4.30-bpi-r2-main found
[    7.406605] init: - preinit -
[    7.527799] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/rgmii link mode
[    7.535985] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.544541] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.558799] mt7530 mdio-bus:00 lan1: configuring for phy/gmii link mode
[    7.565805] 8021q: adding VLAN 0 to HW filter on device lan1
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   11.658390] mount_root: mounting /dev/root
[   11.690962] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   11.700771] insmod: no module folders for kernel version 5.4.30-bpi-r2-main found
Failed to find the folder holding the modules
[   11.711604] insmod: no module folders for kernel version 5.4.30-bpi-r2-main found
Failed to find the folder holding the modules
[   11.723241] insmod: no module folders for kernel version 5.4.30-bpi-r2-main found
Failed to find the folder holding the modules
[   11.734978] insmod: no module folders for kernel version 5.4.30-bpi-r2-main found
Failed to find the folder holding the modules
[   11.777885] urandom-seed: Seed file not found (/etc/urandom.seed)
[   11.808930] procd: - early -
[   11.811910] procd: - watchdog -
[   12.489406] procd: - watchdog -
[   12.493394] procd: - ubus -
[   12.548161] procd: - init -
[   12.693199] kmodloader: no module folders for kernel version 5.4.30-bpi-r2-main found
[   12.716076] urngd: v1.0.2 started.
[   17.581343] mtk_soc_eth 1b100000.ethernet eth0: Link is Down
[   17.610806] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/rgmii link mode
[   17.619048] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   17.625630] mt7530 mdio-bus:00 lan0: configuring for phy/gmii link mode
[   17.635576] 8021q: adding VLAN 0 to HW filter on device lan0
[   17.642357] br-lan: port 1(lan0) entered blocking state
[   17.647634] br-lan: port 1(lan0) entered disabled state
[   17.653947] device lan0 entered promiscuous mode
[   17.658714] device eth0 entered promiscuous mode
[   17.664093] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   17.682685] mt7530 mdio-bus:00 lan1: configuring for phy/gmii link mode
[   17.695558] 8021q: adding VLAN 0 to HW filter on device lan1
[   17.702522] br-lan: port 2(lan1) entered blocking state
[   17.707803] br-lan: port 2(lan1) entered disabled state
[   17.715588] device lan1 entered promiscuous mode
[   17.724138] mt7530 mdio-bus:00 lan2: configuring for phy/gmii link mode
[   17.732186] 8021q: adding VLAN 0 to HW filter on device lan2
[   17.739397] br-lan: port 3(lan2) entered blocking state
[   17.744658] br-lan: port 3(lan2) entered disabled state
[   17.751186] device lan2 entered promiscuous mode
[   17.762833] mt7530 mdio-bus:00 lan3: configuring for phy/gmii link mode
[   17.771151] 8021q: adding VLAN 0 to HW filter on device lan3
[   17.778273] br-lan: port 4(lan3) entered blocking state
[   17.783550] br-lan: port 4(lan3) entered disabled state
[   17.791407] device lan3 entered promiscuous mode
[   17.804311] mt7530 mdio-bus:00 wan: configuring for phy/gmii link mode
[   17.811602] 8021q: adding VLAN 0 to HW filter on device wan
[   20.958460] mt7530 mdio-bus:00 wan: Link is Up - 1Gbps/Full - flow control rx/tx
[   20.965906] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready



[   37.037914] vusb: disabling
[   37.040745] vmc: disabling
[   37.043461] vmch: disabling
[   37.046262] vgp1: disabling
[   37.049138] vcamaf: disabling



^C

As i said aboveā€¦you need to swap tty1 (hdmi) and ttyS0 (serial)

console=ttyS0,115200 console=tty1 fbcon=map:0

In your uEnv.txt (BPI-BOOT/bananapi/bpi-r2/linux/uEnv.txt

Have started work on 5.7ā€¦i used different vlan-patch than on 5.4 but seems to work well

https://github.com/frank-w/BPI-R2-4.14/tree/5.7-rc?files=1

Wifi/hdmi also ported, quick-tested and merged to rc-treeā€¦

i have also replaced old vlan-patch in 5.4 with the new one because old one have problems on deleting vlans (all vlan are disabled)ā€¦have also ported vlan-patch to 4.19 to have vlan also working there

1 Like

Hi Frank,

Sorry but I donā€™t understand the new build system (on the 5.7-rc kernel branch, Iā€™m not very familiar with ARM boot too^).

With the old system, when I build my kernel, I could choose to generate deb packages and installed it on my board, on the next reboot, I was on the new kernel.

Now, I built my kernel, generated deb packages with pack_debs command (only 12M when old 5.5 and 5.4 was 50/60Mo ?) but when I installed them on board and reboot, i boot only on the old kernel. Deb package doesā€™t install uImage on /boot/bananapi/bpi-r2/linux folder but vmlinuz and systemmap on /boot folder (like a classic linux).

Can I have the good procedure to install the new kernel ?

5.4 has additional patches for deb creation i have not yet mergedā€¦

just install directly to sd-card (option 2 in build.sh)

if you install debs you need to change uenv.txt to boot to new kernel

you can do also use pack-optionā€¦ basicly there is for r2 only 1 uImage-file needs to be copied to BPI-BOOT-partititon (bananapi/bpi-r2/linux/) and modules-folder have to be copied to BPI-ROOT-partition (/lib/modules/) the tar.gz contains folders BPI-BOOT and BPI-ROOTā€¦just unpack to the named partition on your SDā€¦but install to SD-card is easier

Maybe it is right here, maybe it isnā€™t.

@frank-w Your Kernel README says, there is crypto support on 4.14. I just did a quick test.

~ uname -a
Linux bananapir2 4.14.184-bpi-r2-main #6 SMP Fri Jun 19 07:50:36 UTC 2020 armv7l GNU/Linux

~ cryptsetup benchmark  
# Tests are approximate using memory only (no storage IO).
PBKDF2-sha1       115380 iterations per second for 256-bit key
PBKDF2-sha256     170666 iterations per second for 256-bit key
PBKDF2-sha512     103532 iterations per second for 256-bit key
PBKDF2-ripemd160   93622 iterations per second for 256-bit key
PBKDF2-whirlpool   19574 iterations per second for 256-bit key
argon2i       4 iterations, 133240 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
argon2id      4 iterations, 134992 memory, 4 parallel threads (CPUs) for 256-bit key (requested 2000 ms time)
Required kernel crypto interface not available.
Ensure you have algif_skcipher kernel module loaded.

Is the intention to compile it manually?

Cryptodev needs to be compiled separately,but is packed/installed if ko exists

Can anyone help me with the cfg80211 api-change for r2 internal wifi (mt6625)?

[BPI-R2] internal Wifi/BT (MT6625L) - Kernel

5.8-wifi and 5.8-hdmi are working in my quick test

2 Likes