[Banana Pi BPI-R64] Mainline OpenWRT image

But this is flash memory nature. If you shat down electricity when writing occurs it can be fail. So there is a safe extraction in windows.

How to get the SATA port worked?

it’s said in the Wiki that it needs to to give GPIO90 low level

the gpio chip is visible but not accessible for me

root@OpenWrt:~# cat /sys/kernel/debug/gpio gpiochip0: GPIOs 409-511, parent: platform/10211000.pinctrl, pinctrl_moore: gpio-409 ( |factory ) in hi IRQ gpio-463 ( |mt753x-reset ) out hi gpio-490 ( |cd ) in hi IRQ ACTIVE LOW gpio-497 ( |bpi-r64:pio:red ) out lo gpio-498 ( |bpi-r64:pio:green ) out lo gpio-499 ( |asm_sel ) in lo gpio-511 ( |wps ) in hi IRQ

root@OpenWrt:~# echo 499 > /sys/class/gpio/export ash: write error: Resource busy

any idea?

You have to define in dts see here

edit: changed link to new version with fixed “okay”

Just like @frank-w said. The dts used in my repo is https://github.com/graphine27/openwrt/blob/r64-emmc/target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64-rootdisk.dts

But you have sata and sata_phy still disabled (any asm_sel needs to be output-low). I see i have ok instead of okay…it needs to be “okay”

btw. your “resource busy” is because the gpio is blocked by gpio-hog driver so you cannot access it via sysfs or similar

thank you, it works!

seems this image not support mt7615e module wifi 5g

I built my own image with d4f5b37a08d64dce5f9d690f381b0e1c3f253913 on r64-emmc branch.

after i enable hwnat via luci firewall options, kernel will panic(oops) randomly.

it will always crash because “Unable to handle kernel paging request at virtual address ffffff883e35ffa0”, the address ffffff883e35ffa0 is always the same.

obviously nbd’s code is too new that i cannot search out any things about this kernel panic on google

anyone have idea about this?

I guess hnat is not ready yet. Have you the oops without it? Can you give a full traceback of the oops?

It’s only affecting hw nat offload function.

it’s midnight here, i just closed my computer few minutes ago.

I will submit that full log tomorrow, if you are interested, (in my memory) the stack is

fffffffxxxx(no symbol, seems to be a strange address? maybe stack is corrupted?) mtk_flow_offload (static function in driver/net/ethernet/mediatek/mtk_soc_eth.c) on calling next before return, finally oops at mtk_flow_offload_add(at driver/net/ethernet/mediatek/mtk_offload.c ) function line “rcu_assign_pointer(eth->foe_flow_table[rhash], NULL);” in offload flow deletion routine.

The oops instruction is last asm of that c code, ldr x(num),[x0]

Maybe it’s better to create an issue on openwrts github.

It seems to be working in a limited fashion for me. Try:

wifi down

echo 1 > /sys/kernel/debug/ieee80211/phy0/mt76/dbdc

wifi reconf

You should then be able to see “Band 2” with the command: iw list

yes, create an issue on github may be good, i just wonder if anyone have encountered this problem.

if i am the only one, this may not be a kernel bug, but related to my own build environment. if anyone else can reproduce this, it must be a kernel bug.

log here: https://pastebin.com/HgzXvD9j

update: created as FS#3561 https://bugs.openwrt.org/index.php?do=details&task_id=3561

Thanks for report and trace/objdump (unfortunately i have not enough knowledge to understand it). Maybe data needs to be aligned to 4k pagesize (address is not)?

thanks for reply, seems cannot work

@graphine,

thank s for you help.

I get your branch try to build the image, but I get the error when boot it always cannot mount the rootfs. do you meet this issue before?log.txt (5.1 KB)

thanks, Water

Did you select Banana Pi R64 (rootdisk) as device?

@graphine thanks for reply. not I select Banana Pi R64 as device, will try follow your advise!

thanks, Water

@graphine,

still the same error. [ 11.067074] hub 2-0:1.0: USB hub found [ 11.070834] hub 2-0:1.0: 1 port detected [ 11.075184] rtc_mt7622 10212800.rtc: setting system clock to 2021-01-06T13:38:08 UTC (1609940288) [ 11.084853] VFS: Cannot open root device “mmcblk0p7” or unknown-block(179,7): error -6 [ 11.092768] Please append a correct “root=” boot option; here are the available partitions: [ 11.101117] b300 7634944 mmcblk0 [ 11.101119] driver: mmcblk [ 11.107910] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,7) [ 11.116339] SMP: stopping secondary CPUs [ 11.120253] Kernel Offset: disabled [ 11.123732] CPU features: 0x0002,04002004 [ 11.127730] Memory Limit: none [ 11.130775] Rebooting in 1 seconds…

Did you write the fullimage?

dd of=/dev/mmcblk0 bs=512 seek=0 if=openwrt-mediatek-mt7622-bpi_bananapi-r64-rootdisk-ext4-fullimage-emmc.img