这个自己改一下就可以了。
1. uboot bootargs pass kernel parameters
maxcpus=2 就是2个核
linux-imx\Documentation\admin-guide\kernel-parameters.txt
maxcpus= [SMP] Maximum number of processors that an SMP kernel
will bring up during bootup. maxcpus=n : n >= 0 limits
the kernel to bring up 'n' processors. Surely after
bootup you can bring up the other plugged cpu by executing
"echo 1 > /sys/devices/system/cpu/cpuX/online". So maxcpus
only takes effect during system bootup.
While n=0 is a special case, it is equivalent to "nosmp",
which also disables the IO APIC.
imx8mmevk login: root
root@imx8mmevk:~# cat /proc/cmdline
console=ttymxc1,115200 root=/dev/mmcblk2p2 rootwait rw maxcpus=2
root@imx8mmevk:~# cat /proc/cpuinfo
processor : 0
BogoMIPS : 16.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 1
BogoMIPS : 16.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
2. 改dts 也可以 就几行就可以了 就是把2号core 和3号core 删除一下就可以了
imx8mm-dual-core.dts
// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
/*
* Copyright 2019-2020 NXP
*/
/* lf-5.15.71-2.2.0 */
/dts-v1/;
#include "imx8mm-evk.dts"
/ {
cpus {
/delete-node/ cpu@2;
/delete-node/ cpu@3;
};
thermal-zones {
cpu-thermal {
cooling-maps {
map0 {
cooling-device =
<&A53_0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
<&A53_1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
};
};
};
};
};
root@imx8mmevk:~# cat /proc/cpuinfo
processor : 0
BogoMIPS : 16.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4
processor : 1
BogoMIPS : 16.00
Features : fp asimd evtstrm aes pmull sha1 sha2 crc32 cpuid
CPU implementer : 0x41
CPU architecture: 8
CPU variant : 0x0
CPU part : 0xd03
CPU revision : 4