[R64] Mainline OpenWRT image

I’ve managed to create an image from master branch which is able to persist settings after reboot.

Source: https://github.com/graphine27/openwrt/tree/r64-emmc

Select ext4 as target images, set 20MB kernel partition size, 100 MB rootfs size in menuconfig.

To flash fullimage (includes GPT, Preloader, ATF):

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

To flash sysupgrade.bin (can also be used from luci, backup config works):

dd of=/dev/mmcblk0 bs=512 seek=4096 if=openwrt-mediatek-mt7622-bpi_bananapi-r64-rootdisk-ext4-sysupgrade-emmc.bin

2 Likes

Source will be great :slight_smile:

As soon as I will have the build system generate correct image, right now it’s stitched together manually.

@frank-w Sources uploaded.

1 Like

How do I do it? I can compile it here, but I don’t know how to set it up. Can you give me some advice?

I have checked commit compare, i found new commit have some binary file, can you show us these binary how to make it. Execute me, i think are you employee of Banana Pi ?

Not an employee.

I got most of the files from: https://github.com/BPI-SINOVOIP/BPI-R64-openwrt/tree/master/staging_dir/target-aarch64_cortex-a53_musl/image

The partition table inside GPT_EMMC in my repo is modified.

Some more binary files can be found here: https://github.com/BPI-SINOVOIP/BPI-R64-BSP/tree/master/mt-pack/mtk/bpi-r64/bin

Hello. I tried to build an image from your branch. As a result, I got a file with the extension * .bin. copied this image to micro SD with Ubuntu system and ran this command

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

After rebooting the R64, enabling the choice 0 will boot from emmc and the first time the boot was successful. But the next times the system is rebooting all the time.

Maybe I did something wrong.

Here is the log:

[   11.266437] hub 2-0:1.0: USB hub found
[   11.270193] hub 2-0:1.0: 1 port detected
[   11.274549] rtc_mt7622 10212800.rtc: setting system clock to 2000-01-01T00:05:03 UTC (946685103)
[   11.288866] EXT4-fs (mmcblk0p7): warning: mounting unchecked fs, running e2fsck is recommended
[   11.298934] EXT4-fs (mmcblk0p7): mounted filesystem without journal. Opts: (null)
[   11.306446] VFS: Mounted root (ext4 filesystem) on device 179:15.
[   11.312698] Freeing unused kernel memory: 384K
[   11.334446] Run /sbin/init as init process
[   11.366582] init: Console is alive
[   11.370066] init: - watchdog -
[   11.392488] random: fast init done
[   11.434172] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[   11.445720] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   11.454243] ehci-fsl: Freescale EHCI Host controller driver
[   11.460480] ehci-platform: EHCI generic platform driver
[   11.468311] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[   11.475030] ohci-platform: OHCI generic platform driver
[   11.483303] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[   11.494234] init: - preinit -
[   11.561367] mtk_soc_eth 1b100000.ethernet: PPE started
[   11.566553] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[   11.574937] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[   13.494415] usb 1-1: new high-speed USB device number 2 using xhci-mtk
[   13.657736] random: procd: uninitialized urandom read (4 bytes read)
[   15.618235] mount_root: mounting /dev/root
[   15.623885] EXT4-fs (mmcblk0p7): re-mounted. Opts: (null)
Failed to find nls_cp437. Maybe it is a built in module ?
Failed to find nls_iso8859-1. Maybe it is a built in module ?
Failed to find fat. Maybe it is a buil[   15.643819] FAT-fs (mmcblk0p6): codepage cp437 not found
t in module ?
Failed to find vfat. Maybe it is a built in modul[   15.654836] FAT-fs (mmcblk0p6): codepage cp437 not found
e ?
mount: mounting /dev/mmcblk0p6 on /recovery fail[   15.664831] urandom-seed: Seeding with /etc/urandom.seed
ed: Invalid argument
umount: can't unmount /recovery: Invalid argument

[   15.681540] procd: - early -
[   15.684495] procd: - watchdog -
[   16.199675] procd: - watchdog -
[   16.202955] procd: - ubus -
[   16.209816] random: ubusd: uninitialized urandom read (4 bytes read)
[   16.256111] random: ubusd: uninitialized urandom read (4 bytes read)
[   16.262578] random: ubusd: uninitialized urandom read (4 bytes read)
[   16.269194] procd: - init -
Please press Enter to activate this console.
[   16.358051] urngd: v1.0.2 started.
[   16.365846] kmodloader: loading kernel modules from /etc/modules.d/*
[   16.382548] Loading modules backported from Linux version v5.8-0-gbcf876870b95
[   16.385442] random: crng init done
[   16.389780] Backport generated by backports.git v5.8-1-0-g79400d9e
[   16.393175] random: 6 urandom warning(s) missed due to ratelimiting
[   16.411354] xt_time: kernel timezone is -0000
[   16.472047] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   16.494682] PPP generic driver version 2.4.2
[   16.500011] NET: Registered protocol family 24
[   16.508698] kmodloader: done loading kernel modules from /etc/modules.d/*
[   16.510474] mt7622-wmac 18000000.wmac: HW/SW Version: 0x8a108a10, Build Time: 20190801210006a
[   16.510474] 
[   16.546451] mt7622-wmac 18000000.wmac: N9 Firmware Version: 2.0, Build Time: 20200131180931

F0: 102B 0000
F6: 3800 00A0
F3: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0000 0041 [0000]
G0: 0190 0000
T0: 0000 032D [000F]
Jump to BL

Hi,

Do you have these filesystems in your .config?

#
# Filesystems
#
# CONFIG_PACKAGE_kmod-fs-afs is not set
# CONFIG_PACKAGE_kmod-fs-antfs is not set
# CONFIG_PACKAGE_kmod-fs-autofs4 is not set
# 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 is not set
# CONFIG_PACKAGE_kmod-fs-ksmbd is not set
# CONFIG_PACKAGE_kmod-fs-minix is not set
CONFIG_PACKAGE_kmod-fs-msdos=y
# 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 is not set
# 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
# CONFIG_PACKAGE_kmod-fs-xfs is not set
# CONFIG_PACKAGE_kmod-fuse is not set
# end of Filesystems

There is a bug,where rebooting to emmc is not working.

Yes, that’s right. I didn’t think about config filesystem. I will try to build and write about the result

no errors, the same log that I wrote in the post above

If r64 is booted to emmc and a software-reboot is done,r64 will try booting to sdcard not emmc.

I found the problem. The reboot of the device turned out to be due to a 4g modem or any other pci device.

The built image works thanks

1 Like

Can you share image witch you build?

Here is the link to images

1 Like

Thank you…

Hi guys I am compile images with transmission and samba, here they are:

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

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