diff options
Diffstat (limited to 'md/writeup/compile_linux_kernel.md')
-rw-r--r-- | md/writeup/compile_linux_kernel.md | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/md/writeup/compile_linux_kernel.md b/md/writeup/compile_linux_kernel.md index 2724736..052155a 100644 --- a/md/writeup/compile_linux_kernel.md +++ b/md/writeup/compile_linux_kernel.md @@ -71,6 +71,8 @@ This bare minimum of command that you whant to run to start modifing your kernel ## Compiling +Compile kernel on local machine for local machine + Run to configure kernel ```sh make menuconfig @@ -83,6 +85,38 @@ compile our first kernel make ``` +### ARM64 + +Compile kernel for arm64 + +```sh +ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make defconfig +``` + +```sh +ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make +``` + +#### Raspberry Pi + +Clone the official kernel + +```sh +git clone --depth=1 https://github.com/raspberrypi/linux +``` + + +```sh +cd linux +KERNEL=kernel8 +ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make bcm2711_defconfig +``` + +```sh +ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j4 zImage modules dtbs +``` + + ## Install It depends from distro to distro expected way how to install new/fresh/clean kernel @@ -145,3 +179,4 @@ http://tomoyo.osdn.jp/ 3. https://wiki.ubuntu.com/Kernel/BuildYourOwnKernel 4. https://fedoraproject.org/wiki/Building_a_custom_kernel 5. https://wiki.archlinux.org/index.php/Kernels/Traditional_compilation +6. https://www.raspberrypi.com/documentation/computers/linux_kernel.html
\ No newline at end of file |