I was able to install the original openwrt on this board.
The original kernel from the image builder does not find partitions on MTD devices and as a consequence does not start. To do this, you need to rebuild the kernel by changing bootloader options.
- Download the original openwrt sources from git according to this instruction
https://openwrt.org/docs/guide-developer/build-system/use-buildsystem - Configure it in the minimum configuration. We indicate the type of our board correctly.
In order to use the original packages from the openwrt repository, you need to enable build the image builder. Also, in the Kernel modules section it is necessary to mark the necessary kernel modules, since the kernel we will have our own packages with modules from the repository will not fit.
make menuconfig
Next, you need to change the kernel configuration,
make kernel_menuconfig
See the Boot options section for a picture.
My original kernel was constantly missing the network connection. The following patch solved the problem.
The file must be saved in target / linux / mediatek / patches-4.19
diff -ur a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts 2020-02-17 20:48:50.237176337 +0200
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts 2020-02-17 20:53:24.700691493 +0200
@@ -111,7 +111,7 @@
memory@80000000 {
device_type = "memory";
- reg = <0 0x80000000 0 0x80000000>;
+ reg = <0 0x80000000 0 0x40000000>;
};
};
Now is the time to build a new image builder.
make -j4
after completion the built image builder will be in bin / targets / mediatek / mt7623 / openwrt-imagebuilder-mediatek-mt7623.Linux-x86_64.tar.xz
Get it
tar xJf openwrt-imagebuilder-mediatek-mt7623.Linux-x86_64.tar.xz
then it is necessary to replace the existing repositories.conf file with the same file from the original image builder in order to connect the original openwrt repositories
Build the firmware according to this instruction https://openwrt.org/docs/guide-user/additional-software/imagebuilder
Now the most interesting thing is the firmware.
- Download the bootloader, this requires an original firmware, such as this one
https://drive.google.com/drive/folders/1J-1BmMXu-odVWMJNwPsXtaRaLIlGrj6r
You need both files
mkt-bpi-r2-SD.img and mtk-bpi-r2-EMMC.img
Install the original firmware according to this instruction http://wiki.banana-pi.org/Getting_Started_with_R2#OpenWrt_On_SD_.26_Emmc_Steps see item 6.
After downloading from EMMC, it's time to upgrade the firmware to the newly built original openwrt. This will require two files from the folder with the image builder, the kernel
build_dir / target-arm_cortex-a7 + neon-vfpv4_musl_eabi / linux-mediatek_mt7623 / bpi_bananapi-r2-kernel.bin
and root file system build_dir / target-arm_cortex-a7 + neon-vfpv4_musl_eabi / linux-mediatek_mt7623 / root.squashfs
Write them on the board, for example in / tmp
we connect to the board on ssh and stitch them in EMMC
mtd write /tmp/bpi_bananapi-r2-kernel.bin kernel
mtd write /tmp/root.squashfs rootfs
We reboot the board and get the original one
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt SNAPSHOT, r12319-083eb80bf2
-----------------------------------------------------
# df -hT
Filesystem Type Size Used Available Use% Mounted on
/dev/root squashfs 10.3M 10.3M 0 100% /rom
tmpfs tmpfs 1010.4M 548.0K 1009.9M 0% /tmp
/dev/mtdblock7 jffs2 245.8M 5.8M 240.0M 2% /overlay
overlayfs:/overlay overlay 245.8M 5.8M 240.0M 2% /
tmpfs tmpfs 512.0K 0 512.0K 0% /dev
/dev/sda ext4 457.4G 26.5G 407.6G 6% /home/ftp
# lspci -k
00:00.0 PCI bridge: MEDIATEK Corp. Device 0801 (rev 01)
Kernel driver in use: pcieport
lspci: Unable to load libkmod resources: error -12
00:01.0 PCI bridge: MEDIATEK Corp. Device 0801 (rev 01)
Kernel driver in use: pcieport
01:00.0 Network controller: Qualcomm Atheros QCA9565 / AR9565 Wireless Network Adapter (rev 01)
Subsystem: Dell Device 020c
Kernel driver in use: ath9k
02:00.0 IDE interface: ASMedia Technology Inc. ASM1061 SATA IDE Controller (rev 02)
Subsystem: ASMedia Technology Inc. Device 1060
Kernel driver in use: ahci
I builded the firmware with ahci and ath9k, everything works.
But the built-in wifi does not work, also there is no module for hwnat.
And to do this work, I highly recommend using a usb-serial adapter.