frank-w / BPI-Router-Linux

Linux kernel 4.14+ for BPI-R2, 5.4+ for R64, 6.1+ for R2Pro and R3
Other
136 stars 47 forks source link

BPI-R3 Mini #116

Closed mrbluecoat closed 7 months ago

mrbluecoat commented 9 months ago

Quick question: does your R3 solution also work for the R3 Mini? https://wiki.banana-pi.org/Banana_Pi_BPI-R3_Mini

What is the best way to install Debian on that device?

mrbluecoat commented 9 months ago

Ref: https://github.com/frank-w/BPI-Router-Images/issues/4

...hopefully there's better news since then

mrbluecoat commented 9 months ago

One last update: looks like it's still in development: https://forum.banana-pi.org/t/bpi-r3-mini-review-and-mainline-immortalwrt-firmware-support/16526/56

Thanks for your efforts on this!

P.S. I was able to get Arch Linux loaded via https://github.com/ericwoud/buildR64arch in case that repo helps.

frank-w commented 9 months ago

R3mini is currently only supported in specific r3mini branches as phy driver is still in development.

I added the necessary patches in my current working branch 6.8-dango.

Also uboot is about to get support for it,but all still in progress.

For image building:

Have not included r3mini in my dependend pipelines (uboot and kernel) which are needed by imagebuilder. You can create r3 image and replace uboot+kernel manually you've built,or at least for kernel you can use the skipkerneldownload and use selfcompiled kernel as source

E.g. build kernel from 6.6-r3mini branch,and pack it to tar.gz. this file can be placed in the folder where you have cloned image-repo and then you create this config:

sourcefiles_bpi-r3.conf

skipkerneldownload=1
kernelfile=kernelfile.tar.gz

And build image for r3.

This you can flash to emmc of r3mini and then you need to replace uboot with emmc version.

One thing you need to change for uboot for r3mini:

Create a uEnv.txt in boot-partition with this content:

setbootconf=setenv bootconf "#conf-emmc-mini"

Have this already in uboot branch 2024-04-bpi but this is not yet built...

Need to think how the best way will be...

mrbluecoat commented 9 months ago

R3mini is currently only supported in specific r3mini branches as phy driver is still in development.

For those interested in watching the progress: https://forum.banana-pi.org/t/bpi-r3-mini-airoha-en8811h-2-5g-phy-driver/16590/144

This is way past my technical skills -- kudos to @frank-w and @ericwoud !

mrbluecoat commented 9 months ago

Could we use the PHY drivers from the official OpenWRT image released today? https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=b03d3644cfe9eb8db2a3441c55c84b076ba7cd08

If you like to have Ethernet support inside U-Boot (eg. to boot via
TFTP) you also need to write the PHY firmware to /dev/mmcblk0boot1:
echo 0 > /sys/block/mmcblk0boot1/force_ro
dd if=/lib/firmware/airoha/EthMD32.dm.bin of=/dev/mmcblk0boot1
dd if=/lib/firmware/airoha/EthMD32.DSP.bin bs=16384 seek=1 of=/dev/mmcblk0boot1
frank-w commented 9 months ago

My uboot-repo also have a r3mini branch where i have modified openwrt driver (with wifi-firmware builtin) but same issue that tftp only works once.

https://github.com/frank-w/u-boot/commits/2024-04-bpi/

Flashing firmware to boot1 has not worked for me...flashed in uboot and got write error

frank-w commented 7 months ago

I managed to flash firmware to boot1

https://forum.banana-pi.org/t/r3mini-uboot-getting-ethernet-nvme-to-work/17165/21?u=frank-w

Can this issue now be closed?

mrbluecoat commented 7 months ago

Thanks