[BPI-R3] [BPi-R3-Mini] Imagebuilder R3 ArchlinuxArm, linux-rolling-stable

It is possible, not so difficult, but can you not compile for aarch64?

No I donā€™t have a source, itā€™s private. Only compiled version is availableā€¦

The arm64 can run armv7 without any emulator, as if it is native code.

Then it depends if the executable is compiled statically, or does it depend on libraries. You can check with the tool ldd

No dependances, you can just run it.

Otherwise, you can copy an armv7 root filesystem (Bootstrap). I use

GitHub - tokland/arch-bootstrap: Bootstrap a base Arch Linux system

Be sure to specify armv7h.

Then use arch-chroot to go in to this with chroot. From there, if all correct versions of libraries are installed, you can run your armv7 executable.

I have done this on my rk3588 board, also aarch64 running Archlinux, and I think you can do the same on the R3.

Thanks a lot man for help :+1: Used arch-chroot script you suggested and despite some errors the application seems to work :slight_smile:

The OEM SFP2.5G-T realtek driver is now added to the pre-build linux.

So is the eeprom loading from file for mt76xx wifi driver (thanks to Frank for this patch)

ATF using FAT32 boot partition is now default for new installations. At least it is for sdmmc and emmc. Iā€™ll add nand for R3/R3mini, so this should still be using a fip partition.

Changing from the default option can be done with a command line switch to the install script, see readme.

First image available for R3-MINI setup as RouTer and as AccessPoint, also avaiable as prebuild .img.gz:

www.woudstra.mywire.org/images/

The path includes images for R64 and R3, also for different setups.

Instructions for R3-MINI:

Copy the bpir-xxx-yyy.img.gz to a FAT formatted usb-stick and plug it in to the R3-MINI.

Boot the R3-MINI in NAND mode with UART connected. Boot to Openwrt Busybox command prompt.

echo 0 > /sys/block/mmcblk0boot0/force_ro

gunzip -c /mnt/sda1/bpir-xxx-yyy.img.gz | dd of=/dev/mmcblk0 bs=4M conv=fsync

dd if=/dev/mmcblk0 of=/dev/mmcblk0boot0 bs=17K skip=1 count=16 conv=fsync

mmc bootpart enable 1 1 /dev/mmcblk0

Switch boot-switch to EMMC and reboot.

1 Like

Have Bpir3 with older Archlinux ver. 6.3 installed to SD and working as AP. Would like to test eMMC and install the new Archlinux AP version there. OpenWrt in NOR & NAND, eMMC is empty. What is the correct installation procedure (without UART if possible)? Thanks in advance

See here: R64/R3 Build/Install emmc version using image

Assuming you have a bootable SD image on SD card.

First build a emmc image, or download a pre-build image, copy it to the /tmp/ folder on the SD card, name it bpir.img.xz.

Boot the R64/R3 with the SD card with UART connected. When kernel starts keep ā€˜shift Eā€™ keys pressed. When finised, you can reboot.

Just follow the instructions you get, during install, about setting the dipswitch

This is however with UART.

On R64 it could be possible without UART, but because R3 can only acces SD or EMMC one at a time, it is not possible without UART.

So it is however possible without using anything on NAND.

Thank you very much for the instructions. I was hopping for some SD/eMMC installation when I saw image name [bpir3-sdmmc-ap.img.xz]. Seems like I will have to open the case and use UART :slight_smile:

In OpenWrt Wiki I found cmdline instruction how to install from NAND to eMMC: fw_setenv bootcmd ā€œrun emmc_init ; env default bootcmd ; saveenv ; resetā€; reboot This is used to copy the NAND installation to eMMC. To install some other img I expect cmdline needs some modifications but havenā€™t found the them anywhereā€¦

Orā€¦ You could write the image when booting from openwrt from NAND.

It would go like so:

Create an emmc image with the script and pack it as .gz file. See readme, it is very simple. If you don;t have a linux computer, use the R3 to run the script on :slight_smile:

Otherwise download the xz and repack as gz.

Copy the bpir.img.gz to a FAT formatted usb-stick and plug it in to the R3.

Boot the R3 in NAND mode. You boot to openwrt, and try to get in a busybox shell via the network, instead of uart. (I donā€™t use openwrt, so you need to find out yourself)

gunzip -c /mnt/sda1/bpir.img.gz | dd of=/dev/mmcblk0 bs=4M conv=fsync
mmc bootpart enable 7 1 /dev/mmcblk0
1 Like

Are any special steps necessary to get SPF modules working in a preexisting installation, or should it just work?

They should just work, but you may need to adjust network setup.

Also depends if your SFP is supported by ā€˜linux-stableā€™ or it is the OEM-SFP-2.5G-T with the rtl8221b accessed through rollball protocol, which Iā€™ve added the driver for.

1 Like

Be very carefullā€¦ Linux kernel v6.6.6. :imp:

Added instructions for nvme boot install:

Setup booting from NVME on R3/R3mini/R4

Is Archlinux Arm smaller footprint than OpenWrt?

I have been using OpenWrt release on BPI-R3 boot emmc with great success. If I could get boot nvme going, that would be super.

It isnā€™t smaller and no web interface. Everything setup through ssh and linux commands.

Linux 6.7 now :slight_smile:

Rolling stable has already moved on to 6.7.2, normally this happens some version laterā€¦

Hi @meehien

In answer to:

I assume here that you are already using my image(script).

This is still experimental, I have it working on my R3mini (actually now the ā€˜kexecā€™ variant of it), but you may run into some problems, like the description not complete or so. I have not gotten any feedback from other users trying it outā€¦

  1. The title says: R3/R3mini/R4, so that is what it is meant for.

  2. Should work on SD, just replace all emmc with sdmmc in the instructions,

  3. The method depends on the most recent version of the linux-bpir64-git and bpir64-atf-git packages. So you will need to add your customization to it. (probably your defconfig)

But make sure your nvme is stable. Mine needed a quirk.

Hi @ericwoud. Thanks for supporting this and for your feedback. I have been working my way through your scripts (e.g., PKGBUILDs, bpir-writefip, build.sh) hoping to figure out how to adapt things for my needs: an SDCARD with your ATF which automatically loads my kernel from a NVME, FAT32 boot partition.

I have so far managed to build a kernel based on your repo (thanks for maintaining a rolling update for that) and have figured out how to manually build bpir3-atf-sdmmc-atf.bin. I do however have a few question about the remainder of the process. I am going to list these here now, but I am happy to ask future questions offline (via DMs) if my questions clutter the thread.

  1. Your guide referes to a partition that starts at 256MiB [1]. My current layout is:
Model: Samsung SSD 980 1TB (nvme)
Disk /dev/nvme0n1: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name                  Flags
 1      1049kB  106MB   105MB   fat32        EFI system partition  boot, esp
 2      106MB   10.8GB  10.7GB  ext4         Linux ARM64 root (/)
 3      10.8GB  1000GB  989GB   ext4         Linux /srv

What would I need to modify to be able to point ATF to load the kernel from my fat32 partition? Also related, how is the kernel called from the ATF, for example if I want to edit the kernel command-line.

  1. I am currently using an .itb image for my kernel. Does your ATF work with this format or just Image and Image.gz (also which of these 2 is the one used)?
  2. Is the bpir-kexec script used in the ATF->kernel boot configuration?

P.S. You donā€™t seem to have issue reporting active on your kernel repo, but I did notice a small bug:

$ cat /sys/class/hwmon/hwmon0/temp1_input
-274000

[1] GitHub - ericwoud/buildR64arch: Build script for image for BananaPi R64 and R3 running Arch Linux