如何在ubuntu下编译内核 arm64
时间: 2023-04-01 22:04:00 浏览: 294
你可以使用以下命令在 Ubuntu 下编译内核 arm64:
1. 首先,安装必要的依赖项:
sudo apt-get install git fakeroot build-essential ncurses-dev xz-utils libssl-dev bc
2. 下载内核源代码:
git clone https://github.com/torvalds/linux.git
3. 切换到内核源代码目录:
cd linux
4. 配置内核编译选项:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
5. 编译内核:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4
6. 安装内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_STRIP=1 modules_install
7. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
8. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
9. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
10. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
11. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
12. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
13. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
14. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
15. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
16. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
17. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
18. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
19. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
20. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
21. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
22. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
23. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
24. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
25. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
26. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
27. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
28. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
29. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
30. 打包内核:
sudo make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_HDR_PATH=/usr/local/arm64-linux-gnu headers_install
希望这个回答对你有帮助!
阅读全文