Linux kernel source code official:
https://www.kernel.org/pub/linux/kernel/
System: centos7.5
1, in the official download the kernel version of their own needs
Example: linux-3.9.tar.gz
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v3.x/linux-3.9.tar.gz
[Email protected] czl]# pwd
/home/czl/
[[email protected] czl]# ls
Linux-3.9.tar.gz
3, unzip the kernel source code to the user root directory
[[email protected] Czl] #tar zxvf linux-3.9.tar.gz-c/home/czl/
4, enter the kernel source code, modify the makefile file, save the exit
[email protected] linux-3.9]#:p WD
/home/czl/linux-3.9
[email protected] linux-3.9]# vim Makefile
Use/cross_compile in Vim to find the following two lines (approximately 195 rows or so):
ARCH = $ (subarch)
Cross_compile = $ (config_cross_compile: "%" =%)
Modify these two behaviors:
ARCH? = Arm
Cross_compile? =/usr/local/arm/arm-2009q3/bin/arm-none-linux-gnueabi-
5. Start compiling
[email protected] linux-3.9]#:p WD
/home/czl/linux-3.9
[[email protected] linux-3.9]#: Make
CentOS Compiler kernel