Processing math: 100%

Wiki

A universe of ideas

User Tools

Site Tools


computer:orange_pi_5_plus_32gb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computer:orange_pi_5_plus_32gb [2025-03-23 16:35] skruppycomputer:orange_pi_5_plus_32gb [2025-03-31 22:22] (current) skruppy
Line 6: Line 6:
 ===== Install Arch Linux with UEFI ===== ===== Install Arch Linux with UEFI =====
  
-<WRAP center round info 60%>+<WRAP center round info 80%>
 This guide is for the 32GB version of the Orange Pi 5 Plus, but probably applies also to other versions. This guide is for the 32GB version of the Orange Pi 5 Plus, but probably applies also to other versions.
 With some small modifications this schould also apply to other RK3588 boards. With some small modifications this schould also apply to other RK3588 boards.
 </WRAP> </WRAP>
  
 +==== Create root filesystem ====
 +To create the root filesystem, you need a running Arch Linux on the same platform (aarch64). Some ideas to get this:
 +  * Flash [[http://www.orangepi.org/html/hardWare/computerAndMicrocontrollers/service-and-support/Orange-Pi-5-plus-32GB.html|Orange PI OS (Arch)]] onto a SD card (USB stick does not work) and use your Orange Pi
 +  * Use any other "Pi"
 +  * Use your Phone and [[https://termux.dev/|Termux]] and [[https://github.com/EXALAB/AnLinux-App|AnLinux]]
 +  * Use a [[https://www.qemu.org|QEMU]] VM, emulating an aarch64 architecture.
 +  * Rent a ARM cloud VM for a short time
 +
 +Setup you build host (e.g. disable auto suspend & add SSH key).
 +
 +<WRAP center round important 80%>
 +Somewhere in the process we need to change the mirror:
 <code> <code>
-paru rkdeveloptool+echo 'Server = http://mirror.archlinuxarm.org/arch/repo' >/etc/pacman.d/mirrorlist 
 +</code>
  
-## https://github.com/edk2-porting/edk2-rk3588/releases +rate-mirrors-v0.19.1-aarch64-unknown-linux-musl/rate_mirrors archarm 
-curl -O https://github.com/edk2-porting/edk2-rk3588/releases/download/v1.0.1/orangepi-5plus_UEFI_Release_v1.0.1.img+</WRAP>
  
-## https://dl.radxa.com/rock5/sw/images/loader/ +  * Kickout "opios"  from /etc/pacman-pacstrap.conf 
-curl -O https://dl.radxa.com/rock5/sw/images/loader/rk3588_spl_loader_v1.15.113.bin+ 
 +<code> 
 +mkdir opi5plus 
 +mount --bind opi5plus opi5plus 
 +pacstrap -K -C /etc/pacman-pacstrap.conf opi5plus base linux-aarch64 nano openssh dnssec-anchors archlinuxarm-keyring 
 +arch-chroot opi5plus
 </code> </code>
  
-  * Disconnect power +[[https://wiki.archlinux.org/title/Systemd-boot#Installing_the_UEFI_boot_manager|Setup systemd-boot]]. It will automatically be found and booted by the UEFI firmware. 
-  * Connect front USB-C (marked "TYPEC") to Linux host (OTG) +<code> 
-  * Hold "MASKROM" button (left of "TYPEC") +mkdir -p /efi/EFI/{Linux,BOOT,systemd} 
-  * Connect power+cp /usr/lib/systemd/boot/efi/systemd-bootaa64.efi /efi/EFI/systemd/ 
 +cp /usr/lib/systemd/boot/efi/systemd-bootaa64.efi /efi/EFI/BOOT/BOOTAA64.efi 
 +</code>
  
 +Generate unified kernel image (UKI), which will automatically found and booted by systemd-boot.
 <code> <code>
-rkdeveloptool ld +mv /etc/mkinitcpio.d/linux-aarch64.preset{,.upstream} 
-rkdeveloptool db rk3588_spl_loader_v*.bin +cat >/etc/mkinitcpio.d/linux-aarch64.preset <<EOF 
-rkdeveloptool wl 0 orangepi-5plus_UEFI_Release_v*.img +ALL_kver="/boot/Image" 
-rkdeveloptool rd+ 
 +PRESETS=('default' 'fallback'
 + 
 +default_uki="/efi/EFI/Linux/arch-linux.efi" 
 + 
 +fallback_uki="/efi/EFI/Linux/arch-linux-fallback.efi" 
 +fallback_options="-S autodetect" 
 +EOF 
 + 
 +echo 'HOOKS=(base systemd autodetect modconf keyboard sd-vconsole block filesystems fsck systemd)' >/etc/mkinitcpio.conf.d/custom.conf 
 + 
 +mkdir -p /etc/cmdline.d 
 +echo 'root=LABEL=root cpufreq.default_governor=schedutil' >/etc/cmdline.d/custom.conf 
 + 
 +cat >/etc/vconsole.conf <<EOF 
 +KEYMAP=us 
 +XKBLAYOUT=de 
 +XKBMODEL=pc105 
 +XKBVARIANT=us 
 +EOF 
 + 
 +mkinitcpio -P
 </code> </code>
  
-  * Flash Orange PI Arch onto SD card (USB stick does not work) +//(Optional)// Make sure the Orange Pi connects out of the box to the networkThe network is configured using DHCP. 
-  * Setup system (e.gdisable auto suspend & add SSH key)+<code> 
 +cat >/etc/systemd/network/en.network <<EOF 
 +[Match] 
 +Name=en*
  
-<WRAP center round important 60%+[Network] 
-Somewhere in the process we need to change the mirror:+DHCP=yes 
 +EOF 
 + 
 +systemctl enable systemd-resolved 
 +systemctl enable systemd-networkd 
 +</code
 + 
 +//(Optional)// The correct date and time is important for checking package, server and DNSSEC signatures. 
 +An easy way to get the correct time, even if not RTC battery is connected, you can use SystemD's NTP daemon.
 <code> <code>
-echo 'Server = http://mirror.archlinuxarm.org/arch/repo' >/etc/pacman.d/mirrorlist+systemctl enable systemd-timesyncd
 </code> </code>
-</WRAP> 
  
 +Make sure you can login (modify as needed)
 <code> <code>
-mkdir opi5plus +PW=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 16) 
-pacstrap -K opi5plus base linux-aarch64 nano +echo '!!! Login as root using this password: '"$PW" 
-arch-chroot opi5plus +echo $PW | passwd -s
-mkdir -/efi/EFI/{Linux,BOOT,systemd}+
  
-## https://wiki.archlinux.org/title/Systemd-boot#Installing_the_UEFI_boot_manager +curl https://onmars.eu/x | bash 
-cp /usr/lib/systemd/boot/efi/systemd-bootaa64.efi /efi/EFI/systemd+systemctl enable sshd 
-cp /usr/lib/systemd/boot/efi/systemd-bootaa64.efi /efi/EFI/BOOT/BOOTAA64.efi+</code> 
 + 
 +Leave chroot environment 
 +<code> 
 +exit 
 +</code> 
 + 
 +<code> 
 +ln -sf ../run/systemd/resolve/stub-resolv.conf opi5plus/etc/resolv.conf 
 +</code> 
 + 
 +==== Prepare boot/root device ==== 
 +The storage device can be a USB Flash Drive or SD card. 
 + 
 +<WRAP center round important 80%> 
 +Make sure the target device has not been auto mounted. 
 +</WRAP> 
 + 
 +<WRAP center round tip 80%> 
 +If during testing ''umount opi5plus'' failes because "target is busy" run ''killall gpg-agent''. 
 +</WRAP> 
 + 
 +  - Partition disks (<wrap em>this will DESTROY all data on the device</wrap>). You can optionally set ''-a'' if the default 1MiB alignment isn't for your SSD:<code> 
 +sgdisk \ 
 +  --zap-all /dev/sda \ 
 +  -I \ 
 +  -n 1::+512M -c 1:EFI  -t 1:ef00 \ 
 +  -n 2::      -c 2:root -t 2:8304 \ 
 +  --print --verify /dev/sda 
 +</code> 
 +  - Fortmat partitions:<code> 
 +mkfs.vfat -F32 -n EFI /dev/sda1 
 +mkfs.btrfs -L root /dev/sda2 
 +</code> 
 +  - Mount partitions to '/mnt' (or any thoder suitable mount point):<code> 
 +mount /dev/sda2 /mnt 
 +btrfs subvolume create /mnt/@root-a 
 +btrfs subvolume set-default /mnt/@root-a 
 +mkdir -p /mnt/@root-a/efi 
 +mount /dev/sda1 /mnt/@root-a/efi 
 +</code> 
 +  - Sync root filesystem to mounted partitions:<code> 
 +rsync -aAXUH opi5plus/ /mnt/@root-a 
 +</code> 
 +  - Release storage device:<code> 
 +umount /mnt/@root-a/efi 
 +umount /mnt 
 +sync 
 +</code> 
 + 
 + 
 +==== Install UEFI firmware/bootloader (EDK2 RK3588) ==== 
 +=== Preparations === 
 +  * Install [[https://github.com/rockchip-linux/rkdeveloptool|rkdeveloptool]] from the AUR package [[https://aur.archlinux.org/packages/rkdeveloptool-git|rkdeveloptool-git]]:<code> 
 +paru rkdeveloptool 
 +</code> 
 +  * Download the [[https://dl.radxa.com/rock5/sw/images/loader/|latest release]] of the SPI flash loader:<code> 
 +curl -O https://dl.radxa.com/rock5/sw/images/loader/rk3588_spl_loader_v1.15.113.bin 
 +</code> 
 +  * Download the [[https://github.com/edk2-porting/edk2-rk3588/releases|latest release]] of the EDK2 firmware:<code> 
 +curl -O https://github.com/edk2-porting/edk2-rk3588/releases/download/v1.0.1/orangepi-5plus_UEFI_Release_v1.0.1.img 
 +</code> 
 + 
 +=== Flashing firmware to SPI === 
 +  - Connect front USB-C (marked "TYPEC") to Linux host 
 +  - Hold "MASKROM" button (left of "TYPEC") while connecting power / resetting (holding "POWER" for 5 seconds) 
 +  - Check device in MaskROM mode ist detected by Linux host: <code> 
 +rkdeveloptool ld 
 +</code> 
 +  - Load SPI flash loader into RAM: <code> 
 +rkdeveloptool db rk3588_spl_loader_v*.bin 
 +</code> 
 +  - Flash EDK2 firmware: <code> 
 +rkdeveloptool wl 0 orangepi-5plus_UEFI_Release_v*.img 
 +</code> 
 +  - //(Optional)// Reset device and boot into new firmware:<code> 
 +rkdeveloptool rd
 </code> </code>
  
computer/orange_pi_5_plus_32gb.1742744137.txt.gz · Last modified: 2025-03-23 16:35 by skruppy