第 18.9 节 Radxa X4
Radxa X4 是 x86 开发版,处理器是英特尔 N100。全文基于 Radxa X4 16G 内存 + 128G emmc 款。
请安装 FreeBSD 15.0-CURRENT。15.0 有 Bug,主频上不了 3Ghz。参见 Bug 271548 - Alder lake CPU not running at full speed
FreeBSD 14.2-RELEASE 会有奇怪的 bug:若使用 emmc 款(且 FreeBSD 系统安装到 emmc 中),则固态硬盘的分区不能超过 5 个,否则 zfs 无法启动。
FreeBSD 14.2-RELEASE 似乎无法睿频变频
安装驱动
安装显卡驱动:
# pkg install drm-61-kmod
或
# cd /usr/ports/graphics/drm-61-kmod/
# make install clean
配置显卡:
# sysrc -f /etc/rc.conf kld_list+=i915kms
安装无线网卡驱动:
# pkg install wifi-firmware-rtw89-kmod
或
# cd /usr/ports/net/wifi-firmware-rtw89-kmod/
# make install clean
查看实时状态(内存,网速,硬盘读写等)
systat -vmstat 1
每秒刷新一次:
root@ykla:~ # systat -vmstat 1
2 users Load 2.01 3.28 3.42 Mar 9 12:26:41
Mem usage: 91%Phy 52%Kmem VN PAGER SWAP PAGER
Mem: REAL VIRTUAL in out in out
Tot Share Tot Share Free count
Act 432M 10400K 4610G 15868K 1373M pages
All 434M 12244K 4610G 87652K ioflt Interrupts
Proc: cow 3273 total
r p d s w Csw Trp Sys Int Sof Flt 663 zfod sdhci_pci0
1 41 4K 684 138 2K 663 ozfod 1030 cpu0:timer
%ozfod 204 cpu1:timer
0.2%Sys 0.2%Intr 25.3%User 0.0%Nice 74.3%Idle daefr 3 cpu2:timer
| | | | | | | | | | | prcfr 9 cpu3:timer
>>>>>>>>>>>>> totfr 2022 xhci1 129
dtbuf react igc0:rxq0
Namei Name-cache Dir-cache 345474 maxvn pdwak 3 igc0:rxq1
Calls hits % hits % 252374 numvn 249 pdpgs igc0:rxq2
3 3 100 176597 frevn intrn 2 igc0:rxq3
8298M wire igc0:aq
Disks mmcsd mmcsd mmcsd nda0 pass0 581M act nvme0:admi
KB/t 0.00 0.00 0.00 0.00 0.00 5380M inact nvme0:io0
tps 0 0 0 0 0 548K laund nvme0:io1
MB/s 0.00 0.00 0.00 0.00 0.00 1373M free nvme0:io2
%busy 0 0 0 0 0 57K buf nvme0:io3
hdac0 140
CPU 温度
读取 CPU 温度:
root@ykla:/home/ykla # kldload coretemp # 英特尔加载 coretemp,AMD 请使用 amdtemp
root@ykla:/home/ykla # sysctl -a | grep temperature
hw.acpi.thermal.tz0.temperature: 27.9C # 这个值不代表 CPU 温度,一般是主板温度
dev.cpu.3.temperature: 41.0C
dev.cpu.2.temperature: 40.0C
dev.cpu.1.temperature: 40.0C
dev.cpu.0.temperature: 40.0C
root@ykla:/home/ykla # sysctl dev.cpu | grep temperature
dev.cpu.3.temperature: 30.0C
dev.cpu.2.temperature: 30.0C
dev.cpu.1.temperature: 29.0C
dev.cpu.0.temperature: 30.0C
疑问:为什么温度不一样?
持久化温度设定
为便于 htop 等软件使用,编辑 /boot/loader.conf
写入:
coretemp_load="YES"
参考文献
Radxa X4 FreeBSD 15.0 dmesg
安装上述驱动后,查看启动详情:
---<<BOOT>>---
Copyright (c) 1992-2025 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 15.0-CURRENT #0 main-n275588-045a4c108fcf: Fri Feb 21 02:25:56 UTC 2025
root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)
WARNING: WITNESS option enabled, expect reduced performance.
VT(efifb): resolution 800x600
CPU: Intel(R) N100 (806.40-MHz K8-class CPU)
Origin="GenuineIntel" Id=0xb06e0 Family=0x6 Model=0xbe Stepping=0
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Features2=0x7ffafbbf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
AMD Features=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
AMD Features2=0x121<LAHF,ABM,Prefetch>
Structured Extended Features=0x239ca7eb<FSGSBASE,TSCADJ,BMI1,AVX2,FDPEXC,SMEP,BMI2,ERMS,INVPCID,NFPUSG,PQE,RDSEED,ADX,SMAP,CLFLUSHOPT,CLWB,PROCTRACE,SHA>
Structured Extended Features2=0x98c007bc<UMIP,PKU,OSPKE,WAITPKG,GFNI,VAES,VPCLMULQDQ,RDPID,MOVDIRI,MOVDIR64B>
Structured Extended Features3=0xfc184410<FSRM,MD_CLEAR,IBT,IBPB,STIBP,L1DFL,ARCH_CAP,CORE_CAP,SSBD>
XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
IA32_ARCH_CAPS=0x180fd6b<RDCL_NO,IBRS_ALL,SKIP_L1DFL_VME,MDS_NO,TAA_NO>
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID,VID,PostIntr
TSC: P-state invariant, performance statistics
real memory = 17179869184 (16384 MB)
avail memory = 16318308352 (15562 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <ALASKA A M I >
WARNING: L3 data cache covers more APIC IDs than a package (7 > 3)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-119
Launching APs: 2 1 3
random: entropy device external interface
kbd0 at kbdmux0
efirtc0: <EFI Realtime Clock>
efirtc0: registered as a time-of-day clock, resolution 1.000000s
smbios0: <System Management BIOS> at iomem 0x75ca6000-0x75ca6017
smbios0: Version: 3.6
aesni0: <AES-CBC,AES-CCM,AES-GCM,AES-ICM,AES-XTS,SHA1,SHA256>
acpi0: <ALASKA A M I >
Firmware Error (ACPI): Could not resolve symbol [\134_SB.PC00.TXHC.RHUB.SS01], AE_NOT_FOUND (20241212/dswload2-315)
ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20241212/psobject-372)
Firmware Error (ACPI): Could not resolve symbol [\134_SB.PC00.TXHC.RHUB.SS02], AE_NOT_FOUND (20241212/dswload2-315)
ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20241212/psobject-372)
acpi0: Power Button (fixed)
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 19200000 Hz quality 950
Event timer "HPET" frequency 19200000 Hz quality 550
Event timer "HPET1" frequency 19200000 Hz quality 440
Event timer "HPET2" frequency 19200000 Hz quality 440
Event timer "HPET3" frequency 19200000 Hz quality 440
Event timer "HPET4" frequency 19200000 Hz quality 440
atrtc1: <AT realtime clock> on acpi0
atrtc1: Warning: Couldn't map I/O.
atrtc1: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0x4000-0x403f mem 0x6000000000-0x6000ffffff,0x4000000000-0x400fffffff at device 2.0 on pci0
vgapci0: Boot video device
xhci0: <XHCI (generic) USB 3.0 controller> mem 0x6001120000-0x600112ffff at device 13.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0: <simple comms, UART> at device 18.0 (no driver attached)
xhci1: <XHCI (generic) USB 3.0 controller> mem 0x6001100000-0x600110ffff at device 20.0 on pci0
xhci1: 32 bytes context size, 64-bit DMA
usbus1 on xhci1
usbus1: 5.0Gbps Super Speed USB v3.0
pci0: <memory, RAM> at device 20.2 (no driver attached)
pci0: <simple comms> at device 22.0 (no driver attached)
sdhci_pci0: <Generic SD HCI> mem 0x6001149000-0x6001149fff at device 26.0 on pci0
sdhci_pci0: 1 slot(s) allocated
uma_zalloc_debug: zone "malloc-16" with the following non-sleepable locks held:
exclusive sleep mutex SD slot mtx (sdhci) r = 0 (0xfffff80001ad9020) locked @ /usr/src/sys/dev/sdhci/sdhci.c:688
stack backtrace:
#0 0xffffffff80bcc76c at witness_debugger+0x6c
#1 0xffffffff80bcd980 at witness_warn+0x430
#2 0xffffffff80f05784 at uma_zalloc_debug+0x34
#3 0xffffffff80f052d7 at uma_zalloc_arg+0x27
#4 0xffffffff80b27bdd at malloc+0x7d
#5 0xffffffff80b28592 at reallocf+0x12
#6 0xffffffff80b9367d at devclass_add_device+0x1cd
#7 0xffffffff80b91c2b at make_device+0x10b
#8 0xffffffff80b91a6d at device_add_child_ordered+0x2d
#9 0xffffffff8086f42c at sdhci_card_task+0x1fc
#10 0xffffffff80875021 at sdhci_pci_attach+0x491
#11 0xffffffff80b93e8b at device_attach+0x45b
#12 0xffffffff80b951fa at bus_attach_children+0x4a
#13 0xffffffff8082ba77 at pci_attach+0xd7
#14 0xffffffff80f52775 at acpi_pci_attach+0x15
#15 0xffffffff80b93e8b at device_attach+0x45b
#16 0xffffffff80b951fa at bus_attach_children+0x4a
#17 0xffffffff80f55ad8 at acpi_pcib_acpi_attach+0x428
mmc0: <MMC/SD bus> on sdhci_pci0
pcib1: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pci1: <network> at device 0.0 (no driver attached)
pcib2: <ACPI PCI-PCI bridge> at device 28.6 on pci0
pci2: <ACPI PCI bus> on pcib2
igc0: <Intel(R) Ethernet Controller I226-V> mem 0x80500000-0x805fffff,0x80600000-0x80603fff at device 0.0 on pci2
igc0: EEPROM V2.17-0 eTrack 0x80000303
igc0: Using 1024 TX descriptors and 1024 RX descriptors
igc0: Using 4 RX queues 4 TX queues
igc0: Using MSI-X interrupts with 5 vectors
igc0: Ethernet address: 10:02:b5:86:0e:f9
igc0: netmap queues/slots: TX 4/1024, RX 4/1024
pcib3: <ACPI PCI-PCI bridge> at device 29.0 on pci0
pci3: <ACPI PCI bus> on pcib3
nvme0: <Generic NVMe Device> mem 0x80700000-0x80703fff at device 0.0 on pci3
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
hdac0: <Intel Alder Lake-N HDA Controller> mem 0x6001140000-0x6001143fff,0x6001000000-0x60010fffff at device 31.3 on pci0
pci0: <serial bus> at device 31.5 (no driver attached)
acpi_button0: <Sleep Button> on acpi0
cpu0: <ACPI CPU> on acpi0
acpi_button1: <Power Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_syscontainer0: <System Container> on acpi0
acpi_syscontainer1: <System Container> on acpi0
atrtc0: <AT realtime clock> at port 0x70 irq 8 on isa0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s
atrtc0: Can't map interrupt.
atrtc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 15.
hwpstate_intel0: <Intel Speed Shift> on cpu0
cpufreq0: <CPU frequency control> on cpu0
hwpstate_intel1: <Intel Speed Shift> on cpu1
cpufreq1: <CPU frequency control> on cpu1
hwpstate_intel2: <Intel Speed Shift> on cpu2
cpufreq2: <CPU frequency control> on cpu2
hwpstate_intel3: <Intel Speed Shift> on cpu3
cpufreq3: <CPU frequency control> on cpu3
Timecounter "TSC" frequency 806401362 Hz quality 1000
Timecounters tick every 1.000 msec
ugen1.1: <Intel XHCI root HUB> at usbus1
ugen0.1: <Intel XHCI root HUB> at usbus0
uhub0 on usbus1
uhub0: <Intel XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
uhub1 on usbus0
uhub1: <Intel XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
mmcsd0: 125GB <MMCHC Y2P128 0.0 SN F034273C MFG 04/2023 by 155 0x0000> at mmc0 200.0MHz/8bit/8192-block
mmcsd0boot0: 4MB partition 1 at mmcsd0
mmcsd0boot1: 4MB partition 2 at mmcsd0
mmcsd0rpmb: 17MB partition 3 at mmcsd0
uhub1: 2 ports with 2 removable, self powered
nvme0: Allocated 16MB host memory buffer
hdacc0: <Realtek ALC269 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC269 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC269 (Right Analog)> at nid 21 and 24 on hdaa0
nda0 at nvme0 bus 0 scbus0 target 0 lun 1
nda0: <Fanxiang S530Q 500GB SN14243 FX240960178>
nda0: Serial Number FX240960178
nda0: nvme version 1.4
nda0: 476940MB (976773168 512 byte sectors)
Trying to mount root from zfs:zroot/ROOT/default []...
WARNING: WITNESS option enabled, expect reduced performance.
uhub0: 16 ports with 16 removable, self powered
Root mount waiting for: usbus1
ugen1.2: <Realtek Bluetooth Radio> at usbus1
ichsmb0: <Intel Alder Lake SMBus controller> port 0xefa0-0xefbf mem 0x6001148000-0x60011480ff at device 31.4 on pci0
smbus0: <System Management Bus> on ichsmb0
rtw890: <rtw89_8852be> port 0x3000-0x30ff mem 0x80800000-0x808fffff at device 0.0 on pci1
rtw890: successfully loaded firmware image 'rtw89/rtw8852b_fw-1.bin'
rtw890: loaded firmware rtw89/rtw8852b_fw-1.bin
rtw890: Firmware version 0.29.29.5 (da87cccd), cmd version 0, type 5
rtw890: Firmware version 0.29.29.5 (da87cccd), cmd version 0, type 3
rtw890: chip rfe_type is 5
acpi_wmi0: <ACPI-WMI mapping> on acpi0
acpi_wmi0: cannot find EC device
acpi_wmi0: Embedded MOF found
ACPI: \134_SB.WFDE.WQCC: 1 arguments were passed to a non-method ACPI object (Buffer) (20241212/nsarguments-361)
acpi_wmi1: <ACPI-WMI mapping> on acpi0
acpi_wmi1: cannot find EC device
acpi_wmi1: Embedded MOF found
ACPI: \134_SB.WFTE.WQCC: 1 arguments were passed to a non-method ACPI object (Buffer) (20241212/nsarguments-361)
lo0: link state changed to UP
igc0: link state changed to UP
ubt0 on uhub0
ubt0: <Realtek Bluetooth Radio, class 224/1, rev 1.00/0.00, addr 1> on usbus1
Security policy loaded: MAC/ntpd (mac_ntpd)
最后更新于