# Ubuntu 20.04.3
# 更新與下載套件
sudo apt update
sudo apt upgrade
sudo apt install vim net-tools git flex bison python3-dev build-essential cmake cppcheck cscope docker docker.io dwarves gcc-aarch64-linux-gnu gdb-multiarch kernelshark libncurses5-dev libssl-dev openssl openjdk-13-jre qemu-system-arm trace-cmd universal-ctags libelf-dev zstd
# 下載與解壓縮 Linux Kernel
## Linux Kernel 版本建議選擇比目前新的,不然有些 Driver 可能會沒有!
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.15.13.tar.xz
tar -Jxf linux-5.15.13.tar.xz
cd linux-5.15.13/
# 複製與編輯設定檔
## 複製設定檔
cp /boot/config-5.11.0-44-generic .config
## 讀進複製過來的設定檔
make menuconfig
<Save> <Exit>
# make clean
## 編輯設定檔
nano .config
^W
CONFIG_SYSTEM_TRUSTED_KEYS=""
# CONFIG_X86_X32=y
^X
scripts/config --disable SYSTEM_TRUSTED_KEYS
scripts/config --disable SYSTEM_REVOCATION_KEYS
# 編譯
cat /proc/cpuinfo
make modules -j8
make -j8
# 安裝
# Ref: https://blog.csdn.net/clh14281055/article/details/112294167
sudo make INSTALL_MOD_STRIP=1 modules_install
# sudo make modules_install
sudo make install