Banana Pi BPI-R64 (MT7622) openwrt (Kernel 4.19) Source code on github

Banana Pi BPI-R64 (MT7622) openwrt (Kernel 4.19) Source code on github

What about kernel 5.4?

you can see this pthread:

But this is not permanent solution. Compile procedure very complicated.

I have troubles getting files written and getting settings saved. Here’s what I’ve done:

  1. Compiled the image above.
  2. Zeroed out and written mtk-bpi-r64-SD.img to SD card.

Still I’m getting JFFS errors and nothing is saved after reboot:

[  181.738553] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[  181.747275] jffs2: empty_blocks 0, bad_blocks 0, c->nr_blocks 16284

Kernel command line is as follows:

[    0.000000] Kernel command line: earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1          initrd=0x4400000
0,0x615E36 loglevel=8 androidboot.hardware=mt7622 swiotlb=512           earlyprintk block2mtd.block2mtd=/dev/mmcblk1,655
36,SD,5 mtdparts=SD:768k(mbr)ro,512k(uboot)ro,512k(Config)ro,256k(Factory)ro,32M(Kernel),32M(recovery),1024M(rootfs),204
8M(usrdata),-(bmtpool) rootfstype=squashfs,jffs2

Rootfs is squashfs and is mounted correctly.

[   14.886375] 9 cmdlinepart partitions found on MTD device SD
[   14.892116] Creating 9 MTD partitions on "SD":
[   14.896706] 0x000000000000-0x0000000c0000 : "mbr"
[   14.901911] 0x0000000c0000-0x000000140000 : "uboot"
[   14.907237] 0x000000140000-0x0000001c0000 : "Config"
[   14.912634] 0x0000001c0000-0x000000200000 : "Factory"
[   14.918129] 0x000000200000-0x000002200000 : "Kernel"
[   14.923518] 0x000002200000-0x000004200000 : "recovery"
[   14.929117] 0x000004200000-0x000044200000 : "rootfs"
[   14.934499] mtd: device 6 (rootfs) set to be root filesystem
[   14.941024] 1 squashfs-split partitions found on MTD device rootfs
[   14.947437] 0x000004840000-0x000044200000 : "rootfs_data"
[   14.953329] 0x000044200000-0x0000c4200000 : "usrdata"
[   14.958822] 0x0000c4200000-0x0003ad400000 : "bmtpool"
[   14.964300] block2mtd: mtd0: [SD] erase_size = 64KiB [65536]
[   14.970306] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01 00:01:03 UTC (946684863)
[   14.982279] VFS: Mounted root (squashfs filesystem) readonly on device 31:6.

Here’s df output

root@OpenWrt:/# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 6.3M      6.3M         0 100% /rom
tmpfs                   499.1M     60.0K    499.0M   0% /tmp
tmpfs                   499.1M     40.0K    499.0M   0% /tmp/root
overlayfs:/tmp/root     499.1M     40.0K    499.0M   0% /
tmpfs                   512.0K         0    512.0K   0% /dev
  1. @sinovoip could you please help get RW filesystem working?
  2. What are the benefits of squashfs root and overlayfs as RW volume anyway? Should I fall back to ext4 RW rootfs and forget all the hassle with both 4.19 and 5.4 kernels?

How to compile this solution?

hi svintuss, I see this problem before, after I write the whole SD memories bytes to 0xff, the overlayfs change to mtdblock7(rootfs_data part). you can try it

i try to compile this image in ubuntu,but there are some error when i complie. error message is as follows:

‘’’ checking for library containing fdatasync… none required checking for fdatasync… (cached) yes checking for cap_get_file in -lcap… no configure: error: libcap library was not found or not usable Makefile:151: recipe for target ‘/home/rst/work_dir/bpi-r64-openwrt/BPI-R64-openwrt/build_dir/target-aarch64_cortex-a53_musl/coreutils-8.32/.configured_68b329da9893e34099c7d8ad5cb9c940’ failed make[3]: *** [/home/rst/work_dir/bpi-r64-openwrt/BPI-R64-openwrt/build_dir/target-aarch64_cortex-a53_musl/coreutils-8.32/.configured_68b329da9893e34099c7d8ad5cb9c940] Error 1 ‘’’

i alredy install libcap-dev,but also complie fail,can u help me,please,thx

hi sirshi,

can you share the whole error log? I guess maybe you enable the wrong config.