On development brunch OpenWrt appear new image: openwrt-mediatek-mt7622-bpi_bananapi-r64-rootdisk-squashfs-sysupgrade-emmc.bin.gz . In “.gz” archive located “.bin” image ~500MB. But I dont know how use this image. Can someone explain how use it.
Take a look to https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob_plain;f=target/linux/mediatek/image/gen_mt7622_emmc_img.sh and https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob_plain;f=target/linux/mediatek/files-5.4/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64-rootdisk.dts
It seems that image expects eMMC having following partitions: p0/p1/p2/p3/p4 - service partitions as usual, p5 - kernel, 20M (40960 sectors), p6 - recovery initrd, 10M (20480 sectors), p7 - rootfs.
That image should be written starting from p5 partition, you can do it by u-boot (write kernel image to flash) or using dd if=rootdisk-squashfs-sysupgrade-emmc.bin of=/dev/mmcblk0 bs=512 seek=4096
P.S: you should change device to “Banana Pi R64 (rootdisk)” in openwrt’s menuconfig
Hi, it boot like this, I switch the boot select to 0
Looks like the image is not booted…only preloader
Thanks to remind. I’ll try binwalk and add preloader.
I boot this image from emmc: 1. use https://github.com/m2LiJu/BPI_R64_OpenWRT install_emmc.sh to init the emmc. 2. dd if=rootdisk-squashfs-sysupgrade-emmc.bin of=/dev/mmcblk0 bs=512 seek=4096 there is some dmesg: [ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034] [ 0.000000] Linux version 5.4.40 (root@) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13219-0fed36dd48)) #0 SMP Tue May 12 10:36:28 2020 [ 0.000000] Machine model: Bananapi BPI-R64 [ 1.068497] mtk-pcie 1a140000.pcie: Port1 link down [ 1.073490] mtk-pcie 1a140000.pcie: PCI host bridge to bus 0000:00 [ 1.079672] pci_bus 0000:00: root bus resource [bus 00-ff] [ 1.085156] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff] [ 1.092028] pci_bus 0000:00: scanning bus [ 1.096065] pci 0000:00:00.0: [14c3:3258] type 01 class 0x060400 [ 1.102130] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x1ffffffff 64bit pref] [ 1.110934] pci_bus 0000:00: fixups for bus [ 1.115120] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 0 [ 1.121818] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring [ 1.129848] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1 [ 1.136647] pci_bus 0000:01: scanning bus [ 1.140780] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280 [ 1.147011] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit] [ 12.049489] mt7615e 0000:01:00.0: assign IRQ: got 139 [ 12.054593] pci 0000:00:00.0: enabling device (0000 -> 0002) [ 12.060257] pci 0000:00:00.0: enabling bus mastering [ 12.065232] mt7615e 0000:01:00.0: enabling device (0000 -> 0002) [ 12.071312] mt7615e 0000:01:00.0: enabling bus mastering [ 12.078419] mt7615e 0000:01:00.0: Invalid MAC address, using random address 06:88:be:82:7c:7b [ 12.088968] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht' [ 12.110076] mt7622-wmac 18000000.wmac: Invalid MAC address, using random address 2e:df:a6:55:6c:fa [ 12.120639] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht' [ 12.146341] PPP generic driver version 2.4.2 [ 12.151905] NET: Registered protocol family 24 [ 12.157687] usbcore: registered new interface driver qmi_wwan [ 12.163642] mt7622-wmac 18000000.wmac: HW/SW Version: 0x8a108a10, Build Time: 20190801210006a [ 12.163642] [ 12.175154] kmodloader: done loading kernel modules from /etc/modules.d/* [ 12.193244] mt7622-wmac 18000000.wmac: N9 Firmware Version: 2.0, Build Time: 20200131180931 [ 13.706453] mtk_soc_eth 1b100000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx [ 33.763113] mt7615e 0000:01:00.0: Message -4294967280 (seq 1) timeout [ 33.769564] mt7615e 0000:01:00.0: Failed to get patch semaphore root@OpenWrt:/etc/config# iw dev phy#1 Interface wlan1 ifindex 8 wdev 0x100000002 addr 2e:df:a6:55:6c:fa ssid OpenWrt type AP channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz txpower 6.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 phy#0 Interface wlan0 ifindex 7 wdev 0x2 addr 06:88:be:82:7c:7b type AP txpower 6.00 dBm multicast TXQ: qsz-byt qsz-pkt flows drops marks overlmt hashcol tx-bytes tx-packets 0 0 0 0 0 0 0 0 0 according to http://forum.banana-pi.org/t/bpi-r64-openwrt-kernel-5-4-40-running-from-emmc/11087/85 there still be a long way to make this board run as a normal router.
I tried to create 2 extra partitions, then wrote the image: dd of=/dev/mmcblk0 bs=512 seek=4096 if=sysupgrade-emmc.bin
Edit: I got answer from openwrt guys, know error, they are working on fixing it.
This is the result:
[ 1.231946] VFS: Cannot open root device "mmcblk0p7" or unknown-block(179,7): error -19
[ 1.239970] Please append a correct "root=" boot option; here are the available partitions:
[ 1.248319] b300 7634944 mmcblk0
[ 1.248321] driver: mmcblk
[ 1.255115] b301 256 mmcblk0p1 450ab377-dced-4b0c-8b57-48867b29dac0
[ 1.255116]
[ 1.264074] b302 512 mmcblk0p2 0dcc0985-09d6-4b1a-a7db-18684f516462
[ 1.264075]
[ 1.273035] b303 512 mmcblk0p3 76cd8548-9419-4e26-9516-4327928422af
[ 1.273036]
[ 1.281998] b304 256 mmcblk0p4 ba61e934-6fa7-4b08-a489-a9ff573d3515
[ 1.281999]
[ 1.290956] b305 20480 mmcblk0p5 7a1d0631-fbe5-4e37-9bbd-71989da5024c
[ 1.290957]
[ 1.299916] b306 10240 mmcblk0p6 da3e7f6f-7e35-274f-a848-813f0f6dc68f
[ 1.299916]
[ 1.308878] b307 20480 mmcblk0p7 c8a2fef4-2400-cb44-a804-d99dee83ec2b
[ 1.308879]
[ 1.317843] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,7)