contributed by <Hualing-Chiu
>
$ gcc --version
gcc (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz
CPU family: 6
Model: 158
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
Stepping: 9
CPU max MHz: 4200.0000
CPU min MHz: 800.0000
BogoMIPS: 7200.00
Flags: 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 ht
tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art ar
ch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc
cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl smx
est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_
2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f
16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid
_single pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi
1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflus
hopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida
arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_cl
ear flush_l1d arch_capabilities
Caches (sum of all):
L1d: 128 KiB (4 instances)
L1i: 128 KiB (4 instances)
L2: 1 MiB (4 instances)
L3: 8 MiB (1 instance)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-7
$ make -C /lib/modules/`uname -r`/build M=`pwd` modules
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using:
CC [M] /home/sheena/hello/hello.o
/bin/sh: 1: gcc-12: not found
gcc-12
即可。
$ sudo apt install --reinstall gcc-12
$ sudo ln -s -f /usr/bin/gcc-12 /usr/bin/gcc
dmesg
會出現以下錯誤:
dmesg: read kernel buffer failed: Operation not permitted
$ sudo sysctl kernel.dmesg_restrict=0
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up