In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the method of downloading and compiling the Linux kernel". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the method of downloading and compiling the Linux kernel".
I. Code download
Rockpi 4A Debian version SDK code download method:
Git clone-- recursive https://github.com/radxa/rockchip-bsp.gitcd rockchip-bsp/
When the code is downloaded, it is displayed as follows:
Root@ubuntu:/home/run/code/rockchip-bsp# lsbuild docker kernel out README.md rkbin rootfs u-boot
Save the Linux kernel code in the kernel directory.
Save the configuration and compile scripts in the build directory.
II. Kernel compilation
Using the compilation script in the code, the compilation script name: mk-kernel.sh, the location is as follows:
Root@ubuntu:/home/run/code/rockchip-bsp# ls build/board_configs.sh extlinux kernel-package.mk mk-kernel.sh out pack-kernel.sh partitions.sh rockpis-partitions.shdebian flash_tool.sh mk-image.sh mk-uboot.sh pack_deb.sh pack-uboot.sh README.md uboot-package.mk
Note: there is a piece of code in the script mk-kernel.sh: source $LOCALPATH/build/board_configs.sh $BOARD, which must be in the same level directory as the build folder when compiling with the script.
The compilation method of the RockPI 4A Linux kernel is as follows (using... Omit part of the compiled output):
Root@ubuntu:/home/run/code/rockchip-bsp#. / build/mk-kernel.sh rockpi4a Building kernel for rockpi4a board!4.4.154 CHK include/config/kernel.release... Generate Boot image startmkfs.fat 4.1 (2017-01-24) mkfs.fat: warning-lowercase labels might not work properly with DOS or Windows Generate Boot image: / home/run/code/rockchip-bsp/out/boot.img success! Kernel build success!
Among them: rockpi4a corresponds to RockPI 4A veneer, if you use other veneer, you need to set different content. For veneer types, please refer to the option of case ${BOARD} in in the build/board_configs.sh script. Example:
Case ${BOARD} in "tb-rk3399prod") DEFCONFIG=rockchip_linux_defconfig UBOOT_DEFCONFIG=rk3399pro_defconfig DTB=rk3399pro-toybrick-prod-linux.dtb export ARCH=arm64 export CROSS_COMPILE=aarch74-linux-gnu- CHIP= "rk3399pro" "ficus2-rk3399pro") DEFCONFIG=rockchip_linux_defconfig UBOOT_DEFCONFIG=rk3399pro-ficus2_defconfig DTB=rk3399pro-ficus2-linux.dtb export ARCH=arm64 export CROSS_COMPILE=aarch74-linux-gnu- CHIP= "rk3399pro";; "rockpin10")
Compiled image path:
Root@ubuntu:/home/run/code/rockchip-bsp/out# tree. ├── boot.img └── kernel ├── Image └── rk3399-rock-pi-4a.dtb1 directory, 3 files Thank you for reading. This is the content of "what is the method of downloading and compiling the Linux kernel". After the study of this article, I believe you have a deeper understanding of what is the method of downloading and compiling the Linux kernel. The specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.