Archlinux on Rock5b

Sorry, but I need a little hand holding. Computer A is the 5b, computer B is an x86 Arch install. I put a sd card via usb adapter into B and run the script installing on sd card. As the script runs I get messages about fstab but the script completes. I put the card into the 5b but it does not boot. Blue light does not change to green. If I check the install back on B there is nothing in fstab file. Any ideas? Thanks

What’s the difference between Rock5B_Naive_Pwm_Fan and fan-control ?

No clue I didnt even tried that app yet.

Hi, I’ve been trying to get this to work. I run the instal script and I end up with a bootable system, but I cannot seem to log-in using the default credentials (alarm/alarm or root/root). I’ve tried over ssh and connected to a keyboard/mouse + monitor, none work. Am I missing something obvious?

SD Card, didn’t explicitly do anything with regards to the boot loader, so presumably u-boot? BSP Kernel.

I mean 1. Booted with display but can’t login.

@kwankiu

I think i know what the problem is with kernel fan control. Simply the current config of debian of Radxa does not have CONFIG_SENSORS_PWM_FAN in config which enables the pwm-fan module in the kernel. The dts changes are already there.

I have compiled the git kernel with such config changes applied in the link could you please verify if this works, i dont have a fan to test.

make sure the soc_thermal policy is at step_wise, if not set it.

cat /sys/class/thermal/thermal_zone0/policy
echo "step_wise" > /sys/class/thermal/thermal_zone0/policy

stress test with s-tui or streess-ng

if you set your policy to user_space, then those funky fan control software tools would still work, but for the rest of policies, kernel is taking over the control of the pwm. With an overlay you can also customize the fan curve of the kernel controller as well.

see:

Please note that about post is for armbian, radxa kernel have 5 stages curve unlike armbians 9 stages.

test kernel:

ps: i think, i think i can force default policy to step_wise by as well with CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y so people wont have to deal with it …
ps2: the change request to radxa kernel https://github.com/radxa/kernel/pull/197

1 Like

@kwankiu

Also, i checked the installation script. Rockchip devices require a specific offset when they want to boot from, that is 0x8000 (32768) sectors, or 16MB. But the scripts are starting from the first sector. I think it will not boot this way. Also please make sure the boot flag is activated

https://opensource.rock-chips.com/wiki_Boot_option
Please ignore loader 1 & 2, trusted zone and only focus on boot_start. The previous regions are on spi flash for rock5. rock4 is different though.

You can also refer to Radxa’s build scripts on how this works

1 Like

@boogiepop, btw, midstream pancsf works if I first install panfork, then pacman -Rns mesa-panfork-git-debug (this is the only package that reports conflict), then install pancsf. But seems only on X11. Most apps (gnome settings, terminal, chromium, etc.) wont launch if I logout and login to Wayland.

Thanks, I didnt realise this as NVMe drive seems works without the need of this.

This should now get fixed on the dev branch, but I couldn’t test them on NVMe as my USB NVMe Adapter seems overheat and broken. So only sd card are tested. updates: I got the adapter worked once. Both SD card and NVMe should works now. The fix is now committed to main.

@tkaiser @Joperfi flash again and it should works now.

uhm, i dont have an environment to test this, but did you set the boot flag in the script? i could not see it.

Boot flag is now added.

in the meanwhile, i am discussing adding the rock5b packages to 7Ji’s binary repo, so everyone can use the same thing. Compiling stuff on those SBCs can be punishing for everyday users.

The pwm fan works with that. At first I thought it doesnt as the curve is set to spin the fan only when stress reaches above 60C, once it gets below 61C, the fan stops.

Btw, the bluetooth for A8 / RTL8852BE, dmesg shows :

[    6.702962] rtk_btusb: Realtek Bluetooth USB driver ver 3.1.6d45ddf.20220519-142432
[    6.703049] rtk_btusb: btusb_probe intf->cur_altsetting->desc.bInterfaceNumber 0
[    6.703050] rtk_btusb: btusb_probe can_wakeup 1, may wakeup 0
[    6.703052] rtk_btusb: patch_add
[    6.703053] rtk_btusb: auto suspend is disabled
[    6.703055] rtk_btusb: pid = 0x4853
[    6.703057] rtk_btusb: patch_add: Reset gEVersion to 0xff
[    6.703065] rtk_btusb: set_bit(HCI_QUIRK_RESET_ON_CLOSE, &hdev->quirks);
[    6.703705] rtk_btusb: btusb_probe: done
[    6.703730] rtk_btusb: btusb_open start
[    6.703734] rtk_btusb: btusb_open hdev->promisc ==0
[    6.703738] rtk_btusb: download_patch start
[    6.703741] rtk_btusb: chip type value: 0x77
[    6.703746] rtk_btusb: HCI reset.
[    6.703758] usbcore: registered new interface driver rtk_btusb
[    6.716405] rtk_btusb: read_ver_rsp->lmp_subver = 0x8852
[    6.716414] rtk_btusb: read_ver_rsp->hci_rev = 0xb
[    6.716418] rtk_btusb: patch_entry->lmp_sub = 0x8852
[    6.716422] rtk_btusb: load_firmware start
[    6.716425] rtk_btusb: lmp_version = 0x8852
[    6.716428] rtk_btusb: config filename rtl8852bu_config
[    6.717099] usb 1-1.3: Direct firmware load for rtl8852bu_config failed with error -2
[    6.717106] rtk_btusb: fw name is  rtl8852bu_fw
[    6.717246] usb 1-1.3: Direct firmware load for rtl8852bu_fw failed with error -2
[    6.717249] rtk_btusb: load firmware failed!
[    6.717252] rtk_btusb: Rtk patch end -1
[    6.717259] rtk_btusb: btusb_open failed

obviously the firmware is missing, i think radxa should have special firmware repo, i am currently using mainline firmware packages.

@kwankiu could you test afterwards you download 8852bu_fw 8852bu_config to /usr/lib/firmware from the location:

https://github.com/radxa-pkg/radxa-firmware/tree/main/firmware

you need to restart or reload the kernel module for them to find the firmware.

@boogiepop Yes,
with 8852bu_fw and 8852bu_config in /usr/lib/firmware, bluetooth now works.

1 Like

Ok, i will update the linux packages, this should have been auto handled by the package.

So everthing is solved now?

I think so. Except that epiphany isnt launching on wayland. The system may randomly freeze or not waking up after sleep / some time of inactivity. But this is only noticeable when I was using Radxa U-boot with NVMe. I think it works much better on Armbian bootloader.

I have some pre-compiled here that I use in both my rockchip and mediatek script. Manually updated (used as backup):

Automatically updated one here:

ftp://ftp.woudstra.mywire.org/repo/aarch64

My linux for mt7622 / mt7986 bananpi boards follows linux-rolling-stable fully automated, just as any -git aur package will do. Once linux is more complete for rk3588 then I will do the same there…

I havent’t touched this system for over 2 months, packages are pre-built up to date :wink:

Let me know if there are any more interesting packages that I could add…

thats also very nice,
i think it would be better to combine everything to 1 single repo to prevent forking and github is more generous on the bandwidth, how are you serving those files? do you have bandwidth limitations?

over 2 months, packages are pre-built up to date

some of those -git packages are meant to be auto updated with --needed flag so that pkgver will automatically be computed whenever there is a new commit: ie, gl4es-git, i have never updated it since 6 months, each commit to git repo would give a new version.

some of them i manually control the version, ie: ffmpeg-mpp. in either case your packages are kinda old :slight_smile:

2 Likes

@boogiepop,

I am trying to extract the boot partition from the pkg.tar.xz package for the installation script. To create a bootable system, we still need vmlinuz and initramfs.img, vmlinuz can be copied from /usr/lib/modules but initramfs has to be generated by dracut or mkinitcpio. I tried sudo mkinitcpio -k “$(ls $tmp_dir/usr/lib/modules/)” -p “$(ls $tmp_dir/etc/mkinitcpio.d/linux-radxa-rkbsp5.preset)” -g $tmp_dir/boot/initramfs.img but doesnt work. Is there anything else I need to add/modify or it cant work this way?