nanopi - bunnyamin/bunnix GitHub Wiki
- Friendly Elec NanoPi R5C
- 96rocks Introduce Rockchip RK3568
- Rockchip-Linux
Hardware | Implementation |
---|---|
Chipset | Rockchip RK3568B2 |
CPU | Quad-core ARM Cortex-A55 CPU, up to 2.0GHz (implements ARMv8.2-A 64-bit ISA) |
RAM | 4GB LPDDR4X - Rayson RS1G32LF4 D2BDS-53BT - 2222NNPF7 |
M.2 E-Key 2230 | RTL8822CE integrated devices: Bluetooth 5.0 and Wireless (802.11ac/abgn) |
Progress | SYS LED(Red) | LAN LED(Green) | WAN LED(Green) |
---|---|---|---|
Power On | Solid On | Off | Off |
System Boot | Slow Flashing | Off | Off |
Installation in Progress | Fast Flashing | Off | Off |
Installation Done | Slow Flashing | Solid On | Solid On |
- Rockchip Wiki Partitions#Default storage map
Partition | Start Sector | Number of Sectors | Partition Size | PartNum in GPT | Requirements |
---|---|---|---|---|---|
MBR | 0 | 00000000 | 1 | 00000001 | 512 |
Primary GPT | 1 | 00000001 | 63 | 0000003F | 32256 |
loader1 | 64 | 00000040 | 7104 | 00001bc0 | 4096000 |
Vendor Storage | 7168 | 00001c00 | 512 | 00000200 | 262144 |
Reserved Space | 7680 | 00001e00 | 384 | 00000180 | 196608 |
reserved1 | 8064 | 00001f80 | 128 | 00000080 | 65536 |
U-Boot ENV | 8128 | 00001fc0 | 64 | 00000040 | 32768 |
reserved2 | 8192 | 00002000 | 8192 | 00002000 | 4194304 |
loader2 | 16384 | 00004000 | 8192 | 00002000 | 4194304 |
trust | 24576 | 00006000 | 8192 | 00002000 | 4194304 |
boot | 32768 | 00008000 | 229376 | 00038000 | 117440512 |
rootfs | 262144 | 00040000 | - | - | - |
Secondary GPT | 16777183 | 00FFFFDF | 33 | 00000021 | 16896 |
Note #1
- The original documentation calculated the "loader1" partition size of 4096000 bytes to "2.5MB".
Note #2 The "boot" partition must:
- be set to Legacy, BIOS, bootable
- be have a filesystem readable by U-Boot
- contain a
boot.cmd
The first partition starts at 16MB (32768 sectors for 512 byte sectors)
sfdisk /dev/sd? <<EOF
label: gpt
first-lba: 64
start=64 size=7104 name="loader1" type=L attrs="RequiredPartition"
start=16384 size=8192 name="loader2" type=L attrs="RequiredPartition"
start=24576 size=8192 name="trust" type=L attrs="RequiredPartition"
start=32768 name="root" type=L attrs="RequiredPartition LegacyBIOSBootable"
EOF
Verify sectors created as intended:
sfdisk -uS -d /dev/sd?
Format for root file system.
mkfs.ext4 -L <label>_<size>_<year>[_<number>] /dev/sd?4
- friendlyarm sd-fuse_rk3568
- Rockchip Wiki Boot option
There are two methods to boot Rockchip rk3568:
- U-Boot with SPL, TPL
- Rockchip MiniLoader
+--------+----------------+----------+-------------+---------+
| Boot | Terminology #1 | Actual | Rockchip | Image |
| stage | | program | Image | Location|
| number | | name | Name | (sector)|
+--------+----------------+----------+-------------+---------+
| 1 | Primary | ROM code | BootRom | |
| | Program | | | |
| | Loader | | | |
| | | | | |
| 2 | Secondary | U-Boot |idbloader.img| 0x40 | Pre-loader
| | Program | TPL/SPL | | |
| | Loader (SPL) | | | |
| | | | | |
| 3 | - | U-Boot | u-boot.itb | 0x4000 | Including u-boot and ATF
| | | | uboot.img | | Only used with mini-loader
| | | | | |
| | | ATF/TEE | trust.img | 0x6000 | Only used with mini-loader
| | | | | |
| 4 | - | kernel | boot.img | 0x8000 |
| | | | | |
| 5 | - | rootfs | rootfs.img | 0x40000 |
+--------+----------------+----------+-------------+---------+
Partition Map for MMC device 1 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000040 0x00001bff "loader1"
attrs: 0x0000000000000001
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: f1e7305b-043d-4102-afa7-7623a7426cc6
2 0x00004000 0x00005fff "loader2"
attrs: 0x0000000000000001
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: a578d45e-962e-49e7-a5e8-d0ed24cacfa2
3 0x00006000 0x00007fff "trust"
attrs: 0x0000000000000001
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: 20243b80-27b1-433f-9807-ae08a8d6c59f
4 0x00008000 0x0003ffff "boot"
attrs: 0x0000000000000005
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: 258bee33-bf04-4265-b8cd-4ab0fdaf4e49
5 0x00040000 0x0ee1a7ff "rootfs"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
guid: fd7874d3-1094-4400-bc9f-3cab42b3010e
Boot order | eMMC (SPI) | SD Card |
---|---|---|
SD Card | Unavailable | U-boot |
SD Card | Unavailable | MiniLoader |
SD Card | MiniLoader | MiniLoader |
eMMC | MiniLoader | U-boot |
eMMC | U-boot | MiniLoader |
eMMC | U-boot | U-boot |
- Download U-Boot
- Gentoo Embedded Handbook/Bootloaders/Das U-Boot
- Rockchip Wiki U-Boot
- U-Boot Board-specific doc Rockchip
Boot content and flow overview.
Sector | Partition | File | Content |
---|---|---|---|
0x40 | LOADER1_START | idbloader.img | u-boot-tpl.bin |
u-boot-spl.bin | |||
0x4000 | LOADER2_START | u-boot.itb | u-boot-nodtb.bin |
bl31.elf | |||
bl31_dram.elf | |||
bl31_sram.elf | |||
bl31_m0.elf | |||
bl32.bin | |||
tee.bin | |||
u-boot.dtb | |||
0x6000 | TRUST_START | (nothing) | |
0x8000 | BOOT_START | boot.img | extlinux/extlinux.conf |
zImage/Image - grub.efi | |||
rkxx.dtb - ramdisk | |||
0x40000 | ROOTFS_START | rootfs.img |
As of writing (2024-03-31) no support for RK3568. However, a patch has been released and is being reviewed.
For now, download the pre-compiled binaries from Rockchip.
- Rockchip rkbin
- Requirements:
-
python-pyelftools
forrk3568_bl31_v1.43.elf
-
All Rockchip platforms are now supporting a single boot image using binman, with the exception for rk3128 which has no support for SPL.
Make U-boot Rockchip binary:
export ARCH=arm64
export DTC_FLAGS="-@"
export CFLAGS=""
export CPPFLAGS=""
export CROSS_COMPILE=aarch64-linux-gnu-
export PLAT=rk3568
export BL31=/path/to/rkbin/rk3568_bl31_v1.44.elf
export ROCKCHIP_TPL=/path/to/rkbin/rk3568_ddr_1560MHz_v1.21.bin
make nanopi-r5c-rk3568_defconfig
make
Write the U-boot Rockchip binary. Note, no device part number.
sudo dd if=u-boot-rockchip.bin of=/dev/sd? bs=512 seek=64
sync
It should be equivalent to the old method:
dd if=idbloader.img of=/dev/sd? bs=512 seek=64
dd if=u-boot.itb of=/dev/sd? bs=512 seek=16384
Next
- configure boot
- install Linux OS
Review Linux kernel configuration:
- Where the block U-boot is stored on SD Card:
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x4000
- Special boot process:
CONFIG_SPL_ROCKCHIP_BACK_TO_BROM is not set
- U-boot support for Linux raw initrd image.
CONFIG_SUPPORT_RAW_INITRD=y
Image 'simple-bin' is missing external blobs and is non-functional: rockchip-tpl atf-bl31
/binman/simple-bin/mkimage/rockchip-tpl (rockchip-tpl):
An external TPL is required to initialize DRAM. Get the external TPL
binary and build with ROCKCHIP_TPL=/path/to/ddr.bin. One possible source
for the external TPL binary is https://github.com/rockchip-linux/rkbin.
/binman/simple-bin/fit/images/@atf-SEQ/atf-bl31 (atf-bl31):
See the documentation for your board. You may need to build ARM Trusted
Firmware and build with BL31=/path/to/bl31.bin
Image 'simple-bin' is missing optional external blobs but is still functional: tee-os
/binman/simple-bin/fit/images/@tee-SEQ/tee-os (tee-os):
See the documentation for your board. You may need to build Open Portable
Trusted Execution Environment (OP-TEE) and build with TEE=/path/to/tee.bin
The U-boot works with the OP-TEE error.
WARNING: No OPTEE provided by BL2 boot loader, Booting device without OPTEE initialization. SMC's destined for OPTEE will return SMC_UNK
ERROR: Error initializing runtime service opteed_fast
The method for building the Rockchip MiniLoader has not been confirmed. The notes are kept for future use.
Boot content and flow overview
Sector | Partition | File | Content |
---|---|---|---|
0x40 | LOADER1_START | idbloader.img | ddr.bin (rkxx_ddr_vx.xx.bin) |
rkxx_miniloader_vx.xx.bin | |||
0x4000 | LOADER2_START | u-boot.img | u-boot.bin or UEFI.FD |
0x6000 | TRUST_START | trust.img | bl31.elf |
bl31_dram.bin | |||
bl31_sram.bin | |||
bl31_m0.bin | |||
rk3xxx_bl32_vx.xx.bin | |||
tee.bin | |||
0x8000 | BOOT_START | boot.img | extlinux/extlinux.conf |
zImage/Image - grub.efi | |||
rkxx.dtb - ramdisk | |||
0x40000 | ROOTFS_START | rootfs.img |
Copy the following files to a directory:
/path/to/rkbin/rk3568_ddr_1560MHz_v1.18.bin
/path/to/rkbin/rk3568_miniloader_spinand_v1.15
/path/to/rkbin/rk3568_bl31_v1.43.elf
/path/to/rkbin/rk3568_bl32_v2.10.bin
-
/path/to/rkbin/RKTRUST/RK3568TRUST.ini
(adjust paths to bl31 and bl32) /path/to/rkbin/tools/mkimage
/path/to/rkbin/tools/loaderimage
/path/to/rkbin/tools/trust_merger
/path/to/u-boot/idbloader.img
/path/to/u-boot/u-boot-spl.bin
-
/path/to/u-boot/u-boot-tpl.bin
-- not necessary? /path/to/u-boot/u-boot.itb
/path/to/u-boot/u-boot.bin
/path/to/u-boot/u-boot.img
- idbloader.img
rkbintools/mkimage -> Error: Bad parameters for image type
(rk3568)
tools/mkimage -n rk3568 -T rksd -d rk3568_ddr_1560MHz_v1.18.bin idbloader.img`
cat rk3568_miniloader_spinand_v1.15 >> idbloader.img
-
-n
name -
-T rksd
Rockchip SD Boot Image, use-T list
to show all available types. -
-d datafile
use image data from 'datafile'. -
<image>
that is theidbloader.img
- u-boot.img
tools/mkimage -n rk3568 -T rksd -d u-boot-tpl.bin idbloader.img` # Note TPL
cat u-boot-spl.bin >> idbloader.img
tools/loaderimage --pack --uboot u-boot.bin uboot.img <CONFIG_SYS_TEXT_BASE>
Entry point address = 0xa00000 (reported for arch linux arm)
The closest possible value for CONFIG_SYS_TEXT_BASE
found in:
u-boot/source/configs/nanopi-r5c-rk3568_defconfig
TEXT_BASE 0x00a00000
- trust.img
Create trust.img
./trust_merger RK3568TRUST.ini
- boot.img
Boot partition
boot.img
OR boot folder with Image
, dtb
and exitlinux
.
- Write
dd if=idbloader.img of=sdb bs=512 seek=64
dd if=u-boot.img of=sdb bs=512 seek=16384
dd if=trust.img of=sdb bs=512 seek=24576
dd if=boot.img of=sdb bs=512 seek=32768 # Or partition start
dd if=rootfs.img of=sdb bs=512 seek=262144 # Or partition start
sync
The standard format for boot configuration files is extlinux.conf
, as
handled by U-Boot's "syslinux" (disk) or "pxe boot" (network). The official
U-Boot documentation " ...recommends that distros generate extlinux.conf rather
than boot.scr. extlinux.conf is intended to work across multiple bootloaders,
whereas boot.scr will only work with U-Boot. ..."
The Linux kernel CONFIG_BOOTMETH_EXTLINUX=y
enables support for extlinux/extlinux.conf
.
Configuration example:
mkdir /boot/extlinux
cat > /boot/extlinux/extlinux.conf << EOF
menu title ExtLinux Boot Options
timeout 10
default ArchLinuxArm
# Recommended to use the `linux` parameter rather than `kernel`
# https://wiki.syslinux.org/wiki/index.php?title=SYSLINUX#KERNEL_file
label ArchLinuxArm
linux /boot/Image
fdtdir /boot/dtbs/rockchip/
fdt /boot/dtbs/rockchip/rk3568-nanopi-r5c.dtb
initrd /boot/initramfs-linux.img
# Pass kernel parameters and arguments
append root=PARTUUID=<PARTUUID> rootwait rootfstype=ext4 rw
init=/usr/lib/systemd/systemd
EOF
In U-boot shell it is possible to replace or add additional parameters. For example:
setenv bootargs 'console=ttyS0,1500000n8 root=/dev/mmcblk1p4'
setenv bootargs ${bootargs} console=tty0 earlyprintk=ttyS2,1500000n8 noinitrd video=HDMI-A-1:1920x1080@60
The directory structure
/linux/
<version>/
build/
nanopi-r5c/
src/
<linux source files>
build.script
The build script:
- The
config
files could be found inarch/arm64/configs/
or - copy to that directory from
/path/to/u-boot/configs/nanopi5_linux_defconfig
cd src
make O=../build/nanopi-r5c mrproper
export ARCH=arm64
export DTC_FLAGS="-@"
export CFLAGS=""
export CPPFLAGS=""
export CROSS_COMPILE=aarch64-linux-gnu-
export PLAT=rk3568
export BL31="/path/to/rkbin-master/bin/rk35/rk3568_bl31_v1.44.elf"
export ROCKCHIP_TPL="/path/to/rkbin-master/bin/rk35/rk3568_ddr_1560MHz_v1.21.bin"
make O=../build/nanopi-r5c nanopi5_linux_defconfig dtbs Image -j4
The build output of interest:
build/nanopi-r5c/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5c.dtb
build/nanopi-r5c/arch/arm64/boot/Image
As of writing (2024-04-01) the Arch Linux Arm distribution is used.
Attempting to boot with the compiled Image to ArchLinuxARM fails, regardless
if its initramfs
is used or not.
[ 10.726337] platform fe720000.saradc: deferred probe pending: platform: wait for supplier /i2c@fdd40000/pmic@20/regulators/LDO_REG7
[ 10.727528] platform fe2b0000.mmc: deferred probe pending: platform: wait for supplier /i2c@fdd40000/pmic@20/regulators/LDO_REG5
[ 10.728591] platform hdmi-sound: deferred probe pending: asoc-simple-card: parse error
[ 10.729327] platform fdc20000.syscon:io-domains: deferred probe pending: platform: wait for supplier /i2c@fdd40000/pmic@20/regulators/SWITCH_REG1
[ 10.730575] platform fe0a0000.hdmi: deferred probe pending: platform: wait for supplier /i2c@fdd40000/pmic@20/regulators/LDO_REG9
- Todo?
- Mount the root partition
# mount /dev/sd?4 /mnt
- Extract Arch Linux ARM distribution to mount point as root user and not as
sudo
in order to preserve the extended attributes and ACL:
tar -xvpf ArchLinuxARM-aarch64-latest.tar -C /mnt
bsdtar -xpf ArchLinuxARM-aarch64-latest.tar -C /mnt
sync
- Configure boot directory:
chmod +r /boot/initramfs-linux.img
-
Image.gz
loads but fails at root mount?
- Copy the
rk3568-nanopi-r5c.dtb
from the compiled kernel to/mnt/boot/dtbs/rockchip/
.- Permit it to execute
chmod +x rk3568-nanopi-r5c.dtb
.
- Permit it to execute
- Copy or create the
extlinux/extlinux.conf
- If pre-configuring the system:
arch-chroot /mnt
and- Basic system configuration
- Initialize key ring
- System update
- Install necessary packages, for example to read manuals, compile, copy files, network.
- Exit
arch-chroot
- If intending to install on the MMC.
- Install
rsync
- Copy the
u-boot-rockchip.bin
andrkbintools
- Copy
ArchLinuxARM-aarch64-latest.tar
or ensure thatrsync
is installed- When booted with SD-Card then mount local MMC.
- Copy OS from SD to local MMC
rsync -avxHAXhn --exclude='/mnt' / /mnt
- Install
unmount /mnt
The system should boot.
- User account and password: alarm
- Root password: root
package | description |
---|---|
wireless-regdb | Central Regulatory Domain Database. |
A minimal configuration to expand depending on additional functional requirements.
file | package | configure |
---|---|---|
/etc/adjtime |
(base) | Adjust the hardware clock from the system clock with the assumption that the hardware clock is in UTC: # hwclock --systohc --utc . |
/etc/hostname |
(base) | Edit file in a text editor; add <hostname> . Alternatively, use SystemD # hostnamectl set-hostname <hostname> . |
/etc/hosts |
(base) | Edit file in a text editor: 127.0.0.1 <hostname>.localdomain <hostname> . |
/etc/localtime |
(base) | A syslink from the Time Zone Database database to localtime: $ ln -sf /usr/share/zoneinfo/<region>/<city> /etc/localtime . |
/etc/locale.conf |
(base) | Add locale, for example, LANG=en_US.UTF-8 . |
/etc/locale.gen |
(base) | Uncomment locale in locale.gen and generate locale.conf and resources in /usr/lib/locale with locale-gen . Remember, any additional language later assigned requires to be uncommented in the locale.gen and locale-gen re-generated. |
/etc/vconsole.conf | (base) | Add keyboard loadkeys keymap as KEYMAP=<keymap> . |
pacman-key --init
pacman-key --populate archlinuxarm
-
Back up
cp /boot/dtbs/rockchip/rk3568-nanopi-r5x.dtb /boot/dtbs/rockchip/rk3568-nanopi-r5x.dtb.bkup
-
pacman -Syy
-
pacman -Sy archlinux-keyring
-
pacman -Syu
Ensure:
chmod +x /boot/dtbs/rockchip/rk3568-nanopi-r5x.dtb
chmod +r /boot/initramfs-linux.img
Reboot.
-
/etc/mkinitcpio.d/linux-aarch64.preset
uses/etc/mkinitcpio.conf
mkinitcpio -c /etc/mkinitcpio.conf -g /boot/initramfs-linux.img -k 6.8.2-1-aarch64-ARCH
chmod +r /boot/initramfs-linux.img
chmod +r /boot/initramfs-linux-fallback.img
Disable hooks:
consolefont
microcode
Debug (verbose output logged to file)
mkinitcpio -vc /etc/mkinitcpio.conf -g /boot/initramfs-linux.img -k 6.8.2-1-aarch64-ARCH -v &> /tmp/mkinitcpio.log
Unknown error:
WARNING: errors were encountered during the build. The image may not be complete.
error: command failed to execute correctly
The error did did not cause any problems during reboot.
- Change the root password.
- Create new user account.
- Remove the default "alarm" account
The module for RTL8822CE rtw88_8822ce
should be installed.
ls -la /usr/lib/modules/<version>/kernel/drivers/net/wireless/realtek/
The module requires:
- cfg80211 - wireless configuration API (CFG80211)
ls -la /usr/lib/modules/<version>/kernel/net/wireless/cfg80211/
- Generic IEEE 802.11 Networking Stack (mac80211) (MAC80211)
ls -la /usr/lib/modules/<version>/kernel/net/mac80211/
- Realtek 802.11ac wireless chips support (RTW88)
ls -la /usr/lib/modules/<version>/kernel/drivers/net/wireless/realtek/rtw88/
When the module is loaded the following dependencies are loaded:
cfg80211
mac80211
libarc4
rtw88_8822c
rtw88_core
rtw88_pci
The module could conflict with the module bluetooth
. On first boot the Bluetooth
module was loaded but not rtw88_8822ce
. If the module rtw88_8822ce
is loaded
first then it seems the Bluetooth module could be loaded after.
/etc/modules-load.d/connectivity.conf
# Load at boot
# If the module `bluetooth` is loaded before then the wi-fi interface is not started.
rtw88_8822ce
bluetooth
The rfkill
list should return:
ID TYPE DEVICE SOFT HARD
0 bluetooth hci0 unblocked unblocked
1 wlan phy0 unblocked unblocked
The lspci -k
should find at least the following PCI devices:
...
0000:01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
Subsystem: Realtek Semiconductor Co., Ltd. RTL8822CE 802.11ac PCIe Wireless Network Adapter
Kernel driver in use: rtw_8822ce
Kernel modules: rtw88_8822ce
...
0001:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
Kernel driver in use: r8169
Kernel modules: r8169
...
0002:01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
Subsystem: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
Kernel driver in use: r8169
Kernel modules: r8169
Cases where the wireless device has been lost:
- After reboot, and additional reboots did not restore the device. Instead, after a "power off" and "power on" the device was found again.
- After first boot up, but it was restored after a reboot.
Event | Error | Cause | Remedy |
---|---|---|---|
arch-chroot |
chroot: failed to run command ‘/bin/bash’: Exec format error |
Trying to change root to a different executable environment. For example, from x86-64 to aarch64 |
pacman -S qemu-user-static-binfmt qemu-user-static and systemctl start systemd-binfmt then ls -la /proc/sys/fs/binfmt_misc should list qemu-aarch64
|
Boot | "Bad ARM64 Image magic!" |
Either corrupt or compiled with wrong arch. For example, compiled as "arm" (32) instead of "arm64". | |
Retrieving file: /boot/Image |
Skipping ArchLinux for failure retrieving kernel Boot failed (err=-14)
|
The path to the Image file. | |
Building initramfs
|
bsdtar: Failed to set default locale |
Unknown | In /etc/locale-gen uncomment C.UTF-8= and re-generate locals: locale-gen . |
Boot | platform regulatory.0: Direct firmware load for regulatory.db failed with error -2 |
Install package wireless-regdb
|
|
Boot | cfg80211: Process '/usr/bin/set-wireless-regdom' failed with exit code 1. |
Enable a regulatory domain /etc/conf.d/wireless-regdom . |
|
Boot | workqueue: name exceeds WQ_NAME_LEN. Truncating to: events_freezable_power_efficien |
Bug | Should be fixed by future kernel updates. |
Boot | ITS: No ITS available, not enabling LPIs |
Unknown | |
Boot | cacheinfo: Unable to detect cache hierarchy for CPU 0 |
Unknown | |
Boot | gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation |
||
Boot | SPI driver max3421-hcd has no spi_device_id for maxim,max3421 |
||
Boot | dw-apb-uart fe660000.serial: forbid DMA for kernel console |
||
Boot | r8169 0001:01:00.0: can't read MAC address, setting random one |
||
Boot | rtc-hym8563 5-0051: no valid clock/calendar values available |
||
Boot | failed to open credentials directory |
The error occurs when using the compiled kernel Image without an initramfs-linux.img
.
Waiting 10 seconds for device /dev/disk/by-partuuid/abcdef-01-2345-6789-1a2b3c4d5e6f ...
[ 10.731020] platform fe720000.saradc: deferred probe pending: platform: wait for supplier /i2c@fdd40000/pmic@20/regulators/LDO_REG7
[ 10.732190] platform hdmi-sound: deferred probe pending: asoc-simple-card: parse error
[ 10.732931] platform fdc20000.syscon:io-domains: deferred probe pending: platform: wait for supplier /i2c@fdd40000/pmic@20/regulators/SWITCH_REG1
[ 10.734144] platform fe0a0000.hdmi: deferred probe pending: platform: wait for supplier /i2c@fdd40000/pmic@20/regulators/LDO_REG9
ERROR: device 'PARTUUID=abcdef-01-2345-6789-1a2b3c4d5e6f' not found. Skipping fsck.
:: mounting 'PARTUUID=abcdef-01-2345-6789-1a2b3c4d5e6f' on real root
mount: /new_root: can't find PARTUUID=abcdef-01-2345-6789-1a2b3c4d5e6f.
You are now being dropped into an emergency shell.
sh: can't access tty; job control turned off
[rootfs ]# ls /dev/disk
mount /dev/sda2 new_root
exit
The level signal is 3.3V.
- GND (USB) to GND (board, closest to USB-C power)
- RX (USB) to TX (board, after GND)
- TX (USB) to RX (board, after TX)
- Friendly Elec NanoPi R5S
Hardware | Implementation |
---|---|
Chipset | Rockchip RK3568B2 |
CPU | Quad-core ARM Cortex-A55 CPU, up to 2.0GHz (implements ARMv8.2-A 64-bit ISA) |
RAM | 4GB LPDDR4X |
M.2 M-Key 2280 | |
UART 3 Pin 2.54mm | For debugging. |
The R5S setup follows the R5C setup:
- Light indicators
- Partition
-
Boot Loader
-
U-boot (SPL, TPL)
-
Boot configuration
- Change to
rk3568-nanopi-r5s.dtb
- Change to
-
Boot configuration
-
U-boot (SPL, TPL)
-
OS
- Use
rk3568-nanopi-r5s.dtb
- Use
The level signal is 3.3V.
- GND (USB) to GND (board, pin #1, closest to USB-C power)
- TX (USB) to RX (board, pin #2)
- RX (USB) to TX (board, pin #3)
"Wikipedia: Pin header § Pin numbering In absence of a pin 1 designation on the header, if a designation is missing from the header, the PCB may have a marking indicating orientation (historically, the solder pad around the hole of pin 1 of a THD header is often square rather than round). "
The system crashes if wpa_supplicant
and hostapd
are started together and it
Tried
- All acceptable channels.
- Disabling kernel module
bluetooth
. - Using
wpa_supplicant
as a host AP. - Blocking the
rtw88_8822ce
and manually loading it seemingly worked, buthostapd
did not work, and attempting to debug it/bin/hostapd -dd...
caused the system to collapse.
[root@host ~]# [ 56.244698] Unable to handle kernel paging request at virtual address ffff800087630522
[ 56.245522] Mem abort info:
[ 56.245814] ESR = 0x0000000096000021
[ 56.246178] EC = 0x25: DABT (current EL), IL = 32 bits
[ 56.246685] SET = 0, FnV = 0
[ 56.247005] EA = 0, S1PTW = 0
[ 56.247312] FSC = 0x21: alignment fault
[ 56.247697] Data abort info:
[ 56.247990] ISV = 0, ISS = 0x00000021, ISS2 = 0x00000000
[ 56.248512] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[ 56.249006] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[ 56.249513] swapper pgtable: 4k pages, 48-bit VAs, pgdp=0000000003fd2000
[ 56.250160] [ffff800087630522] pgd=10000000effff003, p4d=10000000effff003, pud=10000000efffe003, pmd=1000000005894003, pte=00680000f4200713
[ 56.251359] Internal error: Oops: 0000000096000021 [#1] PREEMPT SMP
[ 56.251957] Modules linked in: 8021q garp mrp stp llc rtc_hym8563 snd_soc_simple_card snd_soc_simple_card_utils rockchip_thermal phy_rockchip_naneng_combphy dw_wdt rockchip_saradc hantro_vpu v4l2_vp9 rockchip_rga v4l2_h264 rk817_charger v4l2_mem2mem videobuf2_dma_sg videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 snd_soc_rk817 rk805_pwrkey snd_soc_rockchip_i2s_tdm btusb rtc_rk808 btrtl videodev videobuf2_common btbcm snd_soc_hdmi_codec mc btintel r8169 bluetooth ecdh_generic ecc rtw88_8822ce rtw88_8822c rtw88_pci rtw88_core mac80211 cfg80211 rfkill libarc4 loop fuse nfnetlink dw_hdmi_cec dw_hdmi_i2s_audio display_connector gpio_keys rockchipdrm drm_dma_helper analogix_dp dw_mipi_dsi panfrost drm_shmem_helper dw_hdmi gpu_sched cec rc_core
[ 56.258223] CPU: 2 PID: 11 Comm: kworker/u8:0 Not tainted 6.8.2-1-aarch64-ARCH #1
[ 56.258948] Hardware name: FriendlyElec NanoPi R5C (DT)
[ 56.259451] Workqueue: phy0 rtw_c2h_work [rtw88_core]
[ 56.259997] pstate: 60400009 (nZCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 56.260694] pc : rtw_pci_read32+0x10/0x28 [rtw88_pci]
[ 56.261253] lr : rtw_core_enable_beacon+0x64/0xf0 [rtw88_core]
[ 56.261930] sp : ffff800082cb3ce0
[ 56.262284] x29: ffff800082cb3ce0 x28: 0000000000000000 x27: 0000000000000000
[ 56.262987] x26: ffff000000411028 x25: ffff00000048d300 x24: ffff000009f9de40
[ 56.263673] x23: ffff000009f9de58 x22: ffff0000112671f8 x21: 0000000000000000
[ 56.264356] x20: 0000000000000001 x19: ffff000011261fc0 x18: 0000000000000000
[ 56.265045] x17: 0000000000000000 x16: 0000000000000000 x15: 0000000000000000
[ 56.265727] x14: ffff000000535800 x13: 00000000000000a1 x12: ffff80008261ea08
[ 56.266413] x11: 0000000000000001 x10: 0000000000000af0 x9 : ffff800082cb3d40
[ 56.267096] x8 : 0000000000000005 x7 : ffff80007ae482b8 x6 : 00000000000000ff
[ 56.267780] x5 : 0000000000004c00 x4 : 0000000000000000 x3 : 0000000000005658
[ 56.268467] x2 : 0000000000005658 x1 : 0000000000000522 x0 : ffff800087630522
[ 56.269151] Call trace:
[ 56.269393] rtw_pci_read32+0x10/0x28 [rtw88_pci]
[ 56.269868] rtw_hw_scan_chan_switch+0x140/0x14c [rtw88_core]
[ 56.270464] rtw_fw_c2h_cmd_handle+0x1e0/0x1e8 [rtw88_core]
[ 56.271036] rtw_c2h_work+0x4c/0x7c [rtw88_core]
[ 56.271510] process_one_work+0x148/0x25c
[ 56.271906] worker_thread+0x2b4/0x3cc
[ 56.272278] kthread+0xf4/0x100
[ 56.272591] ret_from_fork+0x10/0x20
[ 56.272947] Code: d28acb02 8b020000 f956dc00 8b214000 (b9400000)
[ 56.273530] ---[ end trace 0000000000000000 ]---