I’ve created a first try-out version of the initrd recovery images for the bpi-R3-mini.
The files can be found here:
https://ftp.woudstra.mywire.org/uartboot/
Find the correct mtk_uartboot
executable for your system. I have build files for the R64, R3, R3mini, R4. Only the R3 is tested at the moment.
Make sure you have socat installed, edit /dev/ttyXXXX, and run :
sudo bash -c "./mtk_uartboot -p uart-bpir3m-atf.bin -f uart-bpir3m-fip.bin --aarch64 -s /dev/ttyUSB0 ; socat - /dev/ttyUSB0,raw,echo=0,b115200"
The files are quite large, so get a cup of coffee when uploading it to the R3mini.
It has my standard archlinuxarm initrd for emmc inside, which drops to a bash shell. The usb drivers should be ready to use an usb-stick to access some image to write.
There are some basic utilities on the initrd, but perhaps it is missing some tools and/or kernel modules.
The initrd can run my installscript and/or debootstrap. First setup your internetconnection on eth0:
bpir-dhcpc eth0
Now you’re ready to use ‘bpir-build’ ‘bpir-toolbox’ ‘debootstrap’ ‘wget’ ‘curl’ ‘nano’ ‘parted’ ‘mkfs-btrfs’ ‘tar’ ‘xz’ ‘gzip’ ‘zstd’, etc, etc.
You could use:
bpir-toolbox --nand-format
It will download necesairy files and install uboot on nand. This version of U-Boot uses the standard distroboot and is setup to scan sd/emmc - nvme - nand, for extlinux.conf in this order. Need to have the boot flag set on the partition where this file can be found. If nothing is found on sd/emmc/nvme, it loads the same rescue initrd, but now from nand.
I need to add more documentation about ‘bpir-toolbox’, but you can look into the file to see which options to use. ‘bpir-build’ to install on nvme is added pretty recently also, so also needs documentation and testing. Basically the steps are:
- run ‘bpir-build -F’ and go through menu to install on nvme
- run ‘bpir-build’ without argument to enter the nvme via chroot
- run ‘bpir-toolbox --extlinux’ from inside the chroot to add the extlinux.conf (still to be automated in bpir-build)
This all needs more testing…