Page 1 of 1

cpuinfo序列号是固定的问题

Posted: 2025-06-23 0:11
by LXGMAX
我有几块Lyra 3506,/proc/cpuinfo的serial是固定的2a9dfd2363bcabd0,而内核dmesg的serial是随板子不一样而变化
是内核没适配吗?

Re: cpuinfo序列号是固定的问题

Posted: 2025-06-23 5:57
by Crocodile
您好,Rockchip的armv7 芯片的cpu serial 号默认是使用随机数,相同镜像下的cpu serial是相同的, 如果设备树有定义会优先使用设备树定义的,如果要使用芯片出厂的cpu serial号需要修改内核 $SDK/kernel

Code: Select all

--- a/arch/arm/kernel/setup.c  
+++ b/arch/arm/kernel/setup.c  
@ -952,7 +952,7 @ static int __init init_machine_late(void)  
system_serial = NULL;  
}  
- if (!system_serial)  
+ //if (!system_serial)  
system_serial = kasprintf(GFP_KERNEL, "%08x%08x",  
system_serial_high,  
system_serial_low);