Linux kernel build

# Grub
<pre>
tokunori@tokunori-desktop:~$ cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

#GRUB_DEFAULT=0
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 5.11.0-22-generic"
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX_DEFAULT=
GRUB_CMDLINE_LINUX=""
...
tokunori@tokunori-desktop:~$ sudo update-grub
</pre>

# lsb release
<pre>
tokunori@tokunori-desktop:~/linux$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=21.04
DISTRIB_CODENAME=hirsute
DISTRIB_DESCRIPTION="Ubuntu 21.04"
</pre>
# Git remote
<pre>
tokunori@tokunori-desktop:~/linux$ git remote -v
origin  git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (fetch)
origin  git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git (push)
stable  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git (fetch)
stable  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git (push)

</pre>

# Build command
<pre>
make clean && make mrproper
cp /boot/config-`uname -r` .config 
make -j32
sudo make modules_install install 
</pre>

https://blog.ishikawa.tech/entry/2019/09/03/174858

<pre>
make
#   SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
#   SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
#   SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
#   SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
#   HYPERCALLS arch/x86/include/generated/asm/xen-hypercalls.h
#   SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
#   SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
#   SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
# .
# .
# .
# .
#   CC      kernel/memremap.o
#   CC      kernel/rseq.o
#   AR      kernel/built-in.a
#   CC      certs/system_keyring.o
# make[1]: *** No rule to make target 'debian/certs/debian-uefi-certs.pem', needed by 'certs/x509_certificate_list'.  Stop.
# make: *** [Makefile:1071: certs] Error 2
</pre>

<pre>
cat .config | grep "CONFIG_SYSTEM_TRUSTED_KEYS"
# CONFIG_SYSTEM_TRUSTED_KEYS="debian/certs/debian-uefi-certs.pem"
</pre>

<pre>
cat .config | grep "CONFIG_SYSTEM_TRUSTED_KEYS"
# CONFIG_SYSTEM_TRUSTED_KEYS=""
</pre>

<pre>
CONFIG_SYSTEM_REVOCATION_KEYS=""
</pre>

# Build time

## Ryzen 9 3950x: 9分
Kernel: 8分
Driver: 1分
Jobs: 32
DRAM: 32GB
<pre>
processor	: 0
vendor_id	: AuthenticAMD
cpu family	: 23
model		: 113
model name	: AMD Ryzen 9 3950X 16-Core Processor
stepping	: 0
microcode	: 0x8701021
cpu MHz		: 2200.000
cache size	: 512 KB
physical id	: 0
siblings	: 32
core id		: 0
cpu cores	: 16
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 16
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate sme ssbd mba sev ibpb stibp vmmcall sev_es fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip rdpid overflow_recov succor smca
bugs		: sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 6999.67
TLB size	: 3072 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate cpb eff_freq_ro [13] [14]

...

processor	: 31
vendor_id	: AuthenticAMD
cpu family	: 23
model		: 113
model name	: AMD Ryzen 9 3950X 16-Core Processor
stepping	: 0
microcode	: 0x8701021
cpu MHz		: 2200.000
cache size	: 512 KB
physical id	: 0
siblings	: 32
core id		: 15
cpu cores	: 16
apicid		: 31
initial apicid	: 31
fpu		: yes
fpu_exception	: yes
cpuid level	: 16
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate sme ssbd mba sev ibpb stibp vmmcall sev_es fsgsbase bmi1 avx2 smep bmi2 cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif umip rdpid overflow_recov succor smca
bugs		: sysret_ss_attrs spectre_v1 spectre_v2 spec_store_bypass
bogomips	: 6999.67
TLB size	: 3072 4K pages
clflush size	: 64
cache_alignment	: 64
address sizes	: 43 bits physical, 48 bits virtual
power management: ts ttp tm hwpstate cpb eff_freq_ro [13] [14]
</pre>
<pre>
tokunor@tokunor-desktop:~$ cat /proc/meminfo 
MemTotal:       32796324 kB
MemFree:        23984648 kB
MemAvailable:   27966708 kB
Buffers:          202336 kB
Cached:          4845576 kB
SwapCached:            0 kB
Active:          1400864 kB
Inactive:        6334008 kB
Active(anon):       3052 kB
Inactive(anon):  3596764 kB
Active(file):    1397812 kB
Inactive(file):  2737244 kB
Unevictable:       12812 kB
Mlocked:           12812 kB
SwapTotal:       2097148 kB
SwapFree:        2097148 kB
Dirty:               764 kB
Writeback:             0 kB
AnonPages:       2699896 kB
Mapped:          1605072 kB
Shmem:            934136 kB
KReclaimable:     311744 kB
Slab:             492628 kB
SReclaimable:     311744 kB
SUnreclaim:       180884 kB
KernelStack:       23440 kB
PageTables:        61412 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:    18495308 kB
Committed_AS:   16003492 kB
VmallocTotal:   34359738367 kB
VmallocUsed:       52088 kB
VmallocChunk:          0 kB
Percpu:            28800 kB
HardwareCorrupted:     0 kB
AnonHugePages:         0 kB
ShmemHugePages:        0 kB
ShmemPmdMapped:        0 kB
FileHugePages:         0 kB
FilePmdMapped:         0 kB
HugePages_Total:       0
HugePages_Free:        0
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:               0 kB
DirectMap4k:      558152 kB
DirectMap2M:    11948032 kB
DirectMap1G:    20971520 kB
</pre>
## Core i3-550: 2時間以上
Kernel: 1時間48分以上
Driver: 未確認
Jobs: 3
DRAM: 8GB
PC: Lenovo H320 76981JJ