[Banana Pi BPI-R64] Mainline OpenWRT image

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

yes, use the command: dd of=/dev/mmcblk0 if=openwrt-mediatek-mt7622-bpi_bananapi-r64-rootdisk-ext4-fullimage-emmc.img

can you show which partitions are recognized and mmc-parts from bootlog? do you have any mtd-options set in cmdline?

hi frank, no, it boots from devnum=0(emmc) and I didn’t change options. log.txt (22.6 KB)

thanks, Water

I’m not sure why this is happening for you. Anyone else having this issue?

@Water do you have these filesystems in your .config file? [R64] Mainline OpenWRT image

[   10.939955] hub 2-0:1.0: USB hub found
[   10.943718] hub 2-0:1.0: 1 port detected
[   10.948056] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01T00:00:10 UTC (946684810)
[   10.962387] EXT4-fs (mmcblk0p7): warning: mounting unchecked fs, running e2fsck is recommended
[   10.972505] EXT4-fs (mmcblk0p7): mounted filesystem without journal. Opts: (null)
[   10.980019] VFS: Mounted root (ext4 filesystem) on device 179:7.
[   10.986184] Freeing unused kernel memory: 384K
[   11.005630] Run /sbin/init as init process
[   11.065150] init: Console is alive

hi graphine,

yes, i have.

CONFIG_PACKAGE_kmod-fs-afs is not set

CONFIG_PACKAGE_kmod-fs-antfs is not set

CONFIG_PACKAGE_kmod-fs-autofs4=y

CONFIG_PACKAGE_kmod-fs-btrfs is not set

CONFIG_PACKAGE_kmod-fs-cifs is not set

CONFIG_PACKAGE_kmod-fs-configfs is not set

CONFIG_PACKAGE_kmod-fs-cramfs is not set

CONFIG_PACKAGE_kmod-fs-exfat is not set

CONFIG_PACKAGE_kmod-fs-exportfs is not set

CONFIG_PACKAGE_kmod-fs-ext4=y CONFIG_PACKAGE_kmod-fs-f2fs=y

CONFIG_PACKAGE_kmod-fs-fscache is not set

CONFIG_PACKAGE_kmod-fs-hfs is not set

CONFIG_PACKAGE_kmod-fs-hfsplus is not set

CONFIG_PACKAGE_kmod-fs-isofs is not set

CONFIG_PACKAGE_kmod-fs-jfs=y CONFIG_PACKAGE_kmod-fs-ksmbd=y

CONFIG_PACKAGE_kmod-fs-minix is not set

CONFIG_PACKAGE_kmod-fs-msdos is not set

CONFIG_PACKAGE_kmod-fs-nfs is not set

CONFIG_PACKAGE_kmod-fs-nfs-common is not set

CONFIG_PACKAGE_kmod-fs-nfs-common-rpcsec is not set

CONFIG_PACKAGE_kmod-fs-nfs-v3 is not set

CONFIG_PACKAGE_kmod-fs-nfs-v4 is not set

CONFIG_PACKAGE_kmod-fs-nfsd is not set

CONFIG_PACKAGE_kmod-fs-ntfs=y

CONFIG_PACKAGE_kmod-fs-reiserfs is not set

CONFIG_PACKAGE_kmod-fs-squashfs=y

CONFIG_PACKAGE_kmod-fs-udf is not set

CONFIG_PACKAGE_kmod-fs-vfat=y

best regards, Water

Hi graphine. You create image for emmc, but can you create image for sd card? Because sometimes need load from sd.

I will try to do that, needs different preloader/gpt and small changes in dts.