[Banana Pi BPI-R64] Mainline OpenWRT image

The / dev / mmcblk0p7 partition was damaged. I booted from ubuntu and ran e2fsck / dev / mmcblk0p7. I assume this situation was caused by a power outage of the router. It seems to me that ext-4 is not very good to use in this case.

Ext4 is as good as any other writable filesystem for itā€¦you can minimize this problem by using a readonly rootfs and a squashfs overlay,but sometimes data needs to be written and powerloss may result in data corruption

It would be great to do as you said. But I donā€™t have the skills to do this. I have not found a good article on ā€œhow to do thisā€.

Iā€™m not too. Thats why iā€™m still using ext4 :smiley:

I am build images with actual core 5.4.81:

Full image: https://cloud.mail.ru/public/3knc/5DpiqwZUp

Sysupgrade: https://cloud.mail.ru/public/5tpW/46L59RzHA

I just want notice that I use sata port in thise images. That mean pci-e ports dont used. Because they canā€™t use together.

only cn9 is blocked if sata is enabledā€¦cn25 can be used together with sata

Hi. Do your images only have a / dev / root partition?

What you mean? I only build image. I donā€™t develop it.

The images are not reliable. There are no overlayfs in the images. This causes the flash memory to fail. When updating, all settings are overwritten in any case.

But we have not options becose R64 not working in 5.4 core without ext4.

because the mtd-issue? maybe a option is missing there (something with root_dev), see here

For me intresting why if I increast root dir. Router canā€™t run. Even if I have set 104 Mb, router is crush. Only 100 Mb.

I have try build openwrt with 493-ubi-set-ROOT_DEV-to-ubiblock-rootfs-if-unset.patch but imge donā€™t build, it give error.

the patch is for another board, but i guess it fixes the mtd-issue in 5.4 (but only for this board)ā€¦maybe we need to do something similar for r2 or just enable the option defined there

so just drop the patch and add option CONFIG_MTD_ROOTFS_ROOT_DEVā€¦if it does not work i guess we need a similar approach like the patch doesā€¦but for r2/r64

Ext 4 file system work good. It have only one problem root partrition volume limit 100 Mb. If we overcome this issue, we have best firmware.

i have no idea where this limitation came fromā€¦which partiton is mounted as rootfs and how is your partition sheme (fdisk)?

Fdisk list:

The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Disk /dev/mmcblk0: 7.28 GiB, 7818182656 bytes, 15269888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 82BDC9F4-D4EB-4A03-8069-761A8B23F07B

Device         Start    End Sectors  Size Type
/dev/mmcblk0p1  1024   1535     512  256K Linux filesystem
/dev/mmcblk0p2  1536   2559    1024  512K Linux filesystem
/dev/mmcblk0p3  2560   3583    1024  512K Linux filesystem
/dev/mmcblk0p4  3584   4095     512  256K Linux filesystem
/dev/mmcblk0p5  4096  45055   40960   20M Linux filesystem
/dev/mmcblk0p6 45056  65536   20481   10M Linux filesystem
/dev/mmcblk0p7 65537 270336  204800  100M Linux filesystem

mmcblk0p5 this linux core

mmcblk0p6 FAT

mmcblk0p7 Root dir ext4

and you have resized /dev/mmcblk0p7 for your test above 100M? how did you do this?

basicly this should be work:

for the backup-error: normally a gpt writes backup of main-sector (second sector contains main information followed by more data in following sectors, first sector is mbr) to the last sector of disc. this error is shown if there is no backup-data thereā€¦but this can also be on different location because size of emmc is not equal to size of 8GB sdcardā€¦so last sector is different

I am set root patrition volume in menuconfig target images rootfs size. This is log after boot from image with 105 Mb size root partriton.

[    0.840408] pci_bus 0000:00: root bus resource [mem 0x20000000-0x27ffffff]
[    0.844308] ata1: SATA link down (SStatus 0 SControl 300)
[    0.847278] pci_bus 0000:00: scanning bus
[    0.848398] pci_bus 0000:00: fixups for bus
[    0.860849] pci_bus 0000:00: bus scan returning with max=00
[    0.866605] mtk-pcie 1a145000.pcie: host bridge /pcie@1a145000 ranges:
[    0.873132] mtk-pcie 1a145000.pcie: Parsing ranges property...
[    0.878968] mtk-pcie 1a145000.pcie:   MEM 0x28000000..0x2fffffff -> 0x2800000                                                                                                                                                             0
[    0.986337] mtk-pcie 1a145000.pcie: Port1 link down
[    0.991308] mtk-pcie 1a145000.pcie: PCI host bridge to bus 0001:00
[    0.997489] pci_bus 0001:00: root bus resource [bus 00-ff]
[    1.002973] pci_bus 0001:00: root bus resource [mem 0x28000000-0x2fffffff]
[    1.009842] pci_bus 0001:00: scanning bus
[    1.014901] pci_bus 0001:00: fixups for bus
[    1.019082] pci_bus 0001:00: bus scan returning with max=00
[    1.024770] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-request                                                                                                                                                             s property
[    1.032942] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver register                                                                                                                                                             ed
[    1.602147] mt753x gsw@0: LAN/WAN VLAN setting=wllll
[    1.607380] mt753x gsw@0: Switch is MediaTek MT7531BE rev 0
[    5.104769] mt753x gsw@0: >>>>>>>>>>>>>>>>>>>>>>>>>>>>> START CALIBRATION:
[    5.112748] mt753x gsw@0: -------- gephy-calbration (port:0) --------
[    5.128386] CALDLY = 40
[    5.322179]  GE Rext AnaCal Saturation!
[    5.326269] GE Rxet cal something wrong2
[    5.490013]  GE R50 AnaCal Saturation!
[    5.494017]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    5.653777]  GE R50 AnaCal Saturation!
[    5.657781]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    5.817538]  GE R50 AnaCal Saturation!
[    5.821543]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    5.981296]  GE R50 AnaCal Saturation!
[    5.985300]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    5.993069]  GE 1e_174(0x8080), 1e_175(0x8080)
[    6.030360]  GE Tx offset AnaCal Done! (pair-0)(2)(0x21) 0x1e_172=0x2120
[    6.055244]  GE Tx offset AnaCal Done! (pair-1)(2)(0x21) 0x1e_172=0x2121
[    6.075569]  GE Tx offset AnaCal Done! (pair-2)(1)(0x1) 0x1e_173=0x120
[    6.104834]  GE Tx offset AnaCal Done! (pair-3)(3)(0x3) 0x1e_173=0x103
[    6.167934]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x5415)
[    6.228585]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1d1d)
[    6.270022]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x1921)
[    6.305797]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x1921)
[    6.361387] PORT 0 RX_DC_OFFSET
[    6.374062] before pairA output = 1e
[    6.379414] after pairA output = 0
[    6.384515] before pairB output = 1d
[    6.389867] after pairB output = ff
[    6.395054] before pairC output = f
[    6.400320] after pairC output = ff
[    6.405508] before pairD output = f
[    6.410775] after pairD output = ff
[    6.414515] mt753x gsw@0: -------- gephy-calbration (port:1) --------
[    6.430151] CALDLY = 40
[    6.587986]  GE R50 AnaCal Saturation!
[    6.591990]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    6.751749]  GE R50 AnaCal Saturation!
[    6.755753]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    6.915517]  GE R50 AnaCal Saturation!
[    6.919521]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    7.079276]  GE R50 AnaCal Saturation!
[    7.083279]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    7.091047]  GE 1e_174(0x8080), 1e_175(0x8080)
[    7.132887]  GE Tx offset AnaCal Done! (pair-0)(3)(0x22) 0x1e_172=0x2220
[    7.162331]  GE Tx offset AnaCal Done! (pair-1)(3)(0x22) 0x1e_172=0x2222
[    7.191767]  GE Tx offset AnaCal Done! (pair-2)(3)(0x22) 0x1e_173=0x2220
[    7.225761]  GE Tx offset AnaCal Done! (pair-3)(4)(0x23) 0x1e_173=0x2223
[    7.289033]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x5816)
[    7.327017]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1616)
[    7.374114]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x131b)
[    7.421214]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x1b23)
[    7.476804] PORT 1 RX_DC_OFFSET
[    7.489477] before pairA output = d
[    7.494744] after pairA output = 1
[    7.499843] before pairB output = 1d
[    7.505198] after pairB output = fe
[    7.510387] before pairC output = 1e
[    7.515736] after pairC output = ff
[    7.520922] before pairD output = 1d
[    7.526275] after pairD output = 1
[    7.529923] mt753x gsw@0: -------- gephy-calbration (port:2) --------
[    7.545560] CALDLY = 40
[    7.703400]  GE R50 AnaCal Saturation!
[    7.707404]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    7.867156]  GE R50 AnaCal Saturation!
[    7.871160]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    8.030918]  GE R50 AnaCal Saturation!
[    8.034922]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    8.194675]  GE R50 AnaCal Saturation!
[    8.198679]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    8.206450]  GE 1e_174(0x8080), 1e_175(0x8080)
[    8.243733]  GE Tx offset AnaCal Done! (pair-0)(2)(0x21) 0x1e_172=0x2120
[    8.268613]  GE Tx offset AnaCal Done! (pair-1)(2)(0x21) 0x1e_172=0x2121
[    8.293494]  GE Tx offset AnaCal Done! (pair-2)(2)(0x21) 0x1e_173=0x2120
[    8.322933]  GE Tx offset AnaCal Done! (pair-3)(3)(0x22) 0x1e_173=0x2122
[    8.403200]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x5014)
[    8.435518]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1818)
[    8.465625]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x1921)
[    8.495732]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x161e)
[    8.551324] PORT 2 RX_DC_OFFSET
[    8.563997] before pairA output = f
[    8.569263] after pairA output = ff
[    8.574449] before pairB output = f
[    8.579711] after pairB output = 0
[    8.584811] before pairC output = e
[    8.590078] after pairC output = ff
[    8.595267] before pairD output = 1d
[    8.600620] after pairD output = fe
[    8.604362] mt753x gsw@0: -------- gephy-calbration (port:3) --------
[    8.619999] CALDLY = 40
[    8.777834]  GE R50 AnaCal Saturation!
[    8.781837]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    8.941590]  GE R50 AnaCal Saturation!
[    8.945594]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    9.105353]  GE R50 AnaCal Saturation!
[    9.109357]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    9.269112]  GE R50 AnaCal Saturation!
[    9.273116]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[    9.280886]  GE 1e_174(0x8080), 1e_175(0x8080)
[    9.313616]  GE Tx offset AnaCal Done! (pair-0)(1)(0x1) 0x1e_172=0x120
[    9.356551]  GE Tx offset AnaCal Done! (pair-1)(6)(0x25) 0x1e_172=0x125
[    9.395017]  GE Tx offset AnaCal Done! (pair-2)(5)(0x24) 0x1e_173=0x2420
[    9.415342]  GE Tx offset AnaCal Done! (pair-3)(1)(0x1) 0x1e_173=0x2401
[    9.489857]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x5415)
[    9.527846]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1616)
[    9.557950]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x171f)
[    9.593716]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x1a22)
[    9.649303] PORT 3 RX_DC_OFFSET
[    9.661977] before pairA output = e
[    9.667244] after pairA output = ff
[    9.672429] before pairB output = e
[    9.677696] after pairB output = 1
[    9.682795] before pairC output = e
[    9.688061] after pairC output = 0
[    9.693159] before pairD output = f
[    9.698426] after pairD output = ff
[    9.702163] mt753x gsw@0: -------- gephy-calbration (port:4) --------
[    9.717800] CALDLY = 40
[    9.875635]  GE R50 AnaCal Saturation!
[    9.879639]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   10.039396]  GE R50 AnaCal Saturation!
[   10.043400]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   10.203156]  GE R50 AnaCal Saturation!
[   10.207160]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   10.366918]  GE R50 AnaCal Saturation!
[   10.370921]  GE R50 AnaCal Done! (32) (0x0)(0x80)
[   10.378689]  GE 1e_174(0x8080), 1e_175(0x8080)
[   10.420534]  GE Tx offset AnaCal Done! (pair-0)(3)(0x22) 0x1e_172=0x2220
[   10.445414]  GE Tx offset AnaCal Done! (pair-1)(2)(0x21) 0x1e_172=0x2221
[   10.465739]  GE Tx offset AnaCal Done! (pair-2)(1)(0x1) 0x1e_173=0x120
[   10.485893]  GE Tx offset AnaCal Done! (pair-3)(1)(0x1) 0x1e_173=0x101
[   10.588648]  GE Tx amp AnaCal Done! (pair-0)(1e_12 = 0x4010)
[   10.649294]  GE Tx amp AnaCal Done! (pair-1)(1e_17 = 0x1111)
[   10.719049]  GE Tx amp AnaCal Done! (pair-2)(1e_19 = 0x1018)
[   10.783142]  GE Tx amp AnaCal Done! (pair-3)(1e_21 = 0x1119)
[   10.838737] PORT 4 RX_DC_OFFSET
[   10.851409] before pairA output = 1e
[   10.856763] after pairA output = fe
[   10.861949] before pairB output = f
[   10.867215] after pairB output = 1
[   10.872315] before pairC output = e
[   10.877581] after pairC output = fe
[   10.882767] before pairD output = f
[   10.888032] after pairD output = 0
[   10.894165] mt753x gsw@0: Port 0 Link is Up - 100Mbps/Full
[   10.900267] mt753x gsw@0: Port 1 Link is Up - 1Gbps/Full
[   10.905701] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[   10.910939] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus numbe                                                                                                                                                             r 1
[   10.919984] xhci-mtk 1a0c0000.usb: hcc params 0x01403198 hci version 0x96 qui                                                                                                                                                             rks 0x0000000000210010
[   10.929052] xhci-mtk 1a0c0000.usb: irq 129, io mem 0x1a0c0000
[   10.935194] hub 1-0:1.0: USB hub found
[   10.938959] hub 1-0:1.0: 2 ports detected
[   10.943174] xhci-mtk 1a0c0000.usb: xHCI Host Controller
[   10.948402] xhci-mtk 1a0c0000.usb: new USB bus registered, assigned bus numbe                                                                                                                                                             r 2
[   10.955799] xhci-mtk 1a0c0000.usb: Host supports USB 3.0 SuperSpeed
[   10.962094] usb usb2: We don't know the algorithms for LPM for this host, dis                                                                                                                                                             abling LPM.
[   10.970402] hub 2-0:1.0: USB hub found
[   10.974165] hub 2-0:1.0: 1 port detected
[   10.978516] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01T00:01                                                                                                                                                             :09 UTC (946684869)
[   10.989215] EXT4-fs (mmcblk0p7): bad geometry: block count 26880 exceeds size                                                                                                                                                              of device (25600 blocks)
[   10.999563] EXT4-fs (mmcblk0p7): bad geometry: block count 26880 exceeds size                                                                                                                                                              of device (25600 blocks)
[   11.008882] List of all partitions:
[   11.012372] b300         7634944 mmcblk0
[   11.012374]  driver: mmcblk
[   11.019167]   b301             256 mmcblk0p1 450ab377-dced-4b0c-8b57-48867b29                                                                                                                                                             dac0
[   11.019168]
[   11.028125]   b302             512 mmcblk0p2 0dcc0985-09d6-4b1a-a7db-18684f51                                                                                                                                                             6462
[   11.028126]
[   11.037082]   b303             512 mmcblk0p3 76cd8548-9419-4e26-9516-43279284                                                                                                                                                             22af
[   11.037083]
[   11.046040]   b304             256 mmcblk0p4 ba61e934-6fa7-4b08-a489-a9ff573d                                                                                                                                                             3515
[   11.046041]
[   11.055010]   b305           20480 mmcblk0p5 7a1d0631-fbe5-4e37-9bbd-71989da5                                                                                                                                                             024c
[   11.055011]
[   11.063968]   b306           10240 mmcblk0p6 da3e7f6f-7e35-274f-a848-813f0f6d                                                                                                                                                             c68f
[   11.063969]
[   11.072927]   b307          102400 mmcblk0p7 63220d3b-553f-4284-8d77-93f5894a                                                                                                                                                             737f
[   11.072928]
[   11.081885] No filesystem could mount root, tried:
[   11.081886]  ext4
[   11.086758]
[   11.090160] Kernel panic - not syncing: VFS: Unable to mount root fs on unkno                                                                                                                                                             wn-block(179,7)
[   11.098588] SMP: stopping secondary CPUs
[   11.102503] Kernel Offset: disabled
[   11.105981] CPU features: 0x0002,04002004
[   11.109979] Memory Limit: none
[   11.113024] Rebooting in 1 seconds..

And this is image with 105 Mb root partrition withch donā€™t boot.

Mayby some error in image build script?

If I open this imges in WinHex it show 100 Mb:

105 Mb: