Privacy Notices
The website collects anonymous statistics data for analyzing web traffic and does not require Cookie. Your data will not be shared with third-party.
The website collects anonymous statistics data for analyzing web traffic and does not require Cookie. Your data will not be shared with third-party.
https://www.jellyterra.com/blog/rss.xml
6.1.15
version: Build the images as following by yourself if you want newer./boot/bianbu.bmp
is the boot splash image of ArchLinux/etc/resolve.conf
with nameserver 1.1.1.1
/etc/systemd/network/0-end.network
with DHCP configuration set upFelix Yan’s wiki about the ArchLinux RISC-V porting.
postmarketOS Wiki about Banana Pi F3 with Spacemit K1 SoC.
Banana Pi forum question about booting with root filesystem on NVMe.
Download the ArchLinux RISC-V porting rootfs archive here.
# Allocate image file. Count defined by your eMMC free size.
dd if=/dev/zero of=rootfs.ext4 bs=1G count=14
# Copy file system tree.
mkfs.ext4 rootfs.ext4
mount rootfs.ext4 /mnt
cp -rp .../archriscv/* /mnt/
umount /mnt
The rootfs may will be mounted as read-only due to filesystem check.
If it happens, remount it with option -o rw,remount
then modify the fstab.
/dev/mmcblk2p5 /boot ext4 defaults,nofail 0 0
/dev/mmcblk2p6 / ext4 defaults,rw 0 0
The splash image file is in the BMP bitmap format by Microsoft and location specified by the variable defined under
U-Boot: splashfile
which is usually bianbu.bmp
on bootfs.ext4
.
Download the Bianbu distro image archive at archive.spacemit.com.
[!NOTE]
Different release version has different kernel version.
It looks like:
.
├── bootfs.ext4
│ ^ /dev/mmcblk2p5
├── env.bin
├── factory
│ ├── bootinfo_emmc.bin
│ ├── bootinfo_sd.bin
│ ├── bootinfo_spinand.bin
│ ├── bootinfo_spinor.bin
│ └── FSBL.bin
├── fastboot.yaml
├── fw_dynamic.itb
├── genimage.cfg
├── partition_2M.json
├── partition_flash.json
├── partition_universal.json
├── rootfs.ext4
│ ^ /dev/mmcblk2p6: The image to be replaced.
└── u-boot.itb
Replace the rootfs.ext4
with the image you made.
Copy all modules under /lib/modules
from Bianbu’s rootfs.ext4
image to ArchLinux’s.
Some Bianbu releases does not contain kernel modules such as [ btrfs, xfs ] in the init ramdisk. Instead, they are stored on root filesystem. So you can only use ext4 for your root filesystem unless you build the kernel that with the modules static-linked in.
Force U-Boot falling back to prompt by removing SD Card from slot while U-Boot is booting.
env print -a
mkfs.ext4 /dev/nvme0n1p1
mount /dev/nvme0n1p1 /mnt
cp -rp .../* /mnt/
Extract the ArchLinux root filesystem archive to the partition you prepared for.
Modify /boot/env_k1-x.txt
and insert the U-Boot environment variables below.
# For Bianbu v2.0.4 boot image.
nvme_boot=setenv bootargs root=/dev/nvme0n1p1 rootwait rootfstype=ext4 earlycon=${earlycon} console=tty1 console=${console} earlyprintk quiet clk_ignore_unused swiotlb=65536 workqueue.default_affinity_scope=system
autoboot=run nvme_boot; run detect_dtb; run loadknl; run loaddtb; run loadramdisk; run start_kernel;
For other Bianbu release version, try checking the U-Boot environment variables and the related booting commands.
The kernel on eMMC will mount the NVMe partition as root filesystem.
Use the genimage to generate sdcard image.
# For NixOS user.
nix-shell -p genimage
cd .../
ln -s . input
genimage
dd if=./images/...-sdcard.img of=/dev/mmcblk2 status=progress
The SoC will load one program, for processing packets from the host about firmware flashing.
The tool is flashing the target device via executing fastboot commands. You may have heard of it on Android.
Requires fastboot
CLI utility.
Documentation about flashing Bianbu. There is a bundle of scripts using fastboot utility.
[!TIP]
You can also find it in the ROM package I packed.
Download flash tool from SpacemiT.
Extract the AppImage with option --appimage-extract
.
Copy squashfs-root/resources/app/flashserver
to one of the $PATH
.
Enter flash mode: press and hold FDL
, press RST
on the board.
Connect USB port on the board to your computer. It will show as a DFU device, and turn to
U-Boot USB download gadget
while flashing.
lsusb
Bus 001 Device 009: ID 361c:1001 U-Boot USB download gadget
Make the users in the group plugdev
able to access it.
nano /etc/udev/rules.d/99-spacemit.rules
SUBSYSTEMS=="usb", ATTR{idVendor}=="361c", ATTR{idProduct}=="1001", GROUP="plugdev", MODE:="0660"
Run flashserver
under the ROM directory.
flashserver
--- Available ports:
--- 1: 1-7-2 'fastboot VID:PID=0x361c:0x1001 SER=None'
--- Enter port index or full name: 1
---》开始刷机
执行 fastboot getvar version-brom
Variable not implemented
执行 fastboot getvar mtd-size
NULL
执行 fastboot getvar blk-size
universal
开始匹配分区表: ['partition_{size0}.json', 'partition_{size1}.json']
匹配原始分区表: partition_universal.json
分区表匹配结果为: partition_universal.json
执行 fastboot flash gpt partition_universal.json
parse gpt/mtd table okay
执行 fastboot flash bootinfo bootinfo_sd.bin
执行 fastboot flash fsbl FSBL.bin
执行 fastboot flash env env.bin
执行 fastboot flash opensbi fw_dynamic.itb
执行 fastboot flash uboot u-boot.itb
执行 fastboot flash bootfs bootfs.ext4
start split gzip file in 2024-10-22 04:17:52
使用gzip压缩等级为: 5
切片缓存的数量: 1
split gzip file over, begin download in 2024-10-22 04:17:54
刷机总进度: 17%: ▓▓▓▓▓▓▓▓
download over in 2024-10-22 04:18:02
执行 fastboot flash rootfs rootfs.ext4
max-download-size: 268435456
start split gzip file in 2024-10-22 04:18:02
使用gzip压缩等级为: 5
切片缓存的数量: 1
split gzip file over, begin download in 2024-10-22 04:18:04
... ... ...
刷机总进度: 99%: ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
download over in 2024-10-22 04:24:12
split gzip file over, begin download in 2024-10-22 04:24:12
download over in 2024-10-22 04:24:23
---》刷机成功!
<-------------flash over ---------------->
Reset BPi-F3. ArchLinux will boot!
By Felix Yan, the password of root
is archriscv
.
systemctl enable --now systemd-networkd
systemctl enable --now systemd-timesyncd
[!NOTE]
SSL connections only work with correct time.
pacman -Syu
pacman -S nano openssh
nano /etc/pacman.d/mirrorlist
##
## Arch Linux RISC-V repository mirrorlist
##
## Worldwide
Server = https://riscv.mirror.pkgbuild.com/repo/$repo
## Canada
#Server = https://archriscv.felixc.at/repo/$repo
## China
#Server = https://mirror.iscas.ac.cn/archriscv/repo/$repo
#Server = https://mirrors.sustech.edu.cn/archriscv/repo/$repo
#Server = https://mirror.nju.edu.cn/archriscv/repo/$repo
#Server = https://mirrors.wsyu.edu.cn/archriscv/repo/$repo
## Finland
#Server = https://mirrors.felixc.at/archriscv/repo/$repo
The graphics performance is poor with llvmpipe
.
But do not worry about it.
It’s not much better when using hardware acceleration.
pacman -S icu plasma-desktop plasma-nm plasma-pa plasma-workspace plasma-workspace-wallpapers xdg-desktop-portal-kde dolphin kate konsole okular spectacle
dbus-run-session startplasma-wayland
pacman -S icu xfce4 xorg
dbus-run-session startxfce4
pacman -S gnome
Official documentation about building drivers and libraries on Spacemit K1.
The SoC integrated Imagination BXE-2-32 without opensource driver yet.
I haven’t made them working in success after built on ArchLinux. I gave up discovering this valueless platform.
[!TIP] If somebody has the solution please publish it in the remark area. Thanks!
The Chinese capital Canyon Bridge Capital has been the current parent company of Imagination since 2017.
The alternative is the software implementation llvmpipe
.
Spacemit has designed their own media API for their codec. They called it Multi Processing Platform (MPP).
They supported this media API in FFmpeg and Gstreamer on their distro Bianbu. I really couldn’t understand: why didn’t they make it VAAPI-compatible?
It’s affording some functionalities of this site with services proxied via Cloudflare Daemon running on it. Such as statistics and web traffic analysis.