Be very carefull… Linux kernel v6.6.6.
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
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…
-
The title says: R3/R3mini/R4, so that is what it is meant for.
-
Should work on SD, just replace all
emmc
withsdmmc
in the instructions, -
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., PKGBUILD
s, 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.
- 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.
- I am currently using an .itb image for my kernel. Does your ATF work with this format or just
Image
andImage.gz
(also which of these 2 is the one used)? - 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
-
256MiB is just an example. Place rootfs anywhere you like.
-
itb is for u-boot. I have an example u-boot package here:
It is configured to use extlinux.conf. Have not tested it with itb
- The bpir-kexec script is only used for kernel chain loading. Having /boot/ on sdmmc/emmc and rootfs on nvme you do not need chain loading.
This is different from before. Now you want boot partition on nvme.
Then I suggest to use the patched u-boot with pcie support. Also possible to use bpir-kexec chain loading
you got nvme working on r3mini?
I have 2 boot scenarios working ok:
-
/boot/ on emmc, Image on emmc, rootfs on nvme
-
/boot/ on emmc, Image(1) on emmc, rootfs on nvme, image(1) chain loading image(2) on nvme rootfs/boot
/boot/bootcfg is examined by atf
forgot that you do not use uboot…you load linux initrd and then access nvme through linux driver
ATF is not able to access this boot partition on nvme. Only patched u-boot and kernel can access nvme.
Edit:
Easiest solution is to have the boot partition on emmc or sdmmc.
Not yet. When the u-boot pcie support is mainline, I will update my uboot package, so that this is also an option.
Having different options is ok here I think. I see there are many quirks around for supporting all the different nvme drives. Who knows which quirks are available in u-boot…
Then I guess this is coming to linux-rolling-stable too soon. It will be included automatically then in my bpir-rolling-stable branch.
Note that I do not have kexec really functional. It is rebooting into atf which is then booting pre-loaded images.
Thanks all. I now understand my confusion: I assumed that somehow ATF had support for the NVME. I was going for the ATF ‘kexec’ method mentioned here BPI-R3 u-boot build help (with NVMe support, hopefully) - #25 by ericwoud, but must have misunderstood how it actually works.
On the plus side I did manage to figure it out the scripts and give the method a try. Seems to work well on my bpi-r3. However, functionality-wise it is still similar to what I had before, ATF and u-boot on sdcard and rootfs on NVME (atf w/o u-boot is a little bit faster though).
@frank-w. I noticed you merged the pci: mediatek: add PCIe controller support for Filogic patch to your 2024-01-bpi-r3mini
u-boot branch. Do you think this might work for the bpi-r3 too?
john says he tested it with r3, i have only tried with r3mini, but cannot get my nvme working with it