summaryrefslogtreecommitdiff
path: root/md/writeup
diff options
context:
space:
mode:
authorFreeArtMan <dos21h@gmail.com>2023-07-08 08:00:47 +0100
committerFreeArtMan <dos21h@gmail.com>2023-07-08 08:00:47 +0100
commitd7e47cb492ee7564f0be44179c5222b3e5a4b62d (patch)
treeee2491c415f5ff64059cc8efd94609de06616490 /md/writeup
parent7b49248caa852c7652f5cd2fa64f633a5829c736 (diff)
downloadmd-content-d7e47cb492ee7564f0be44179c5222b3e5a4b62d.tar.gz
md-content-d7e47cb492ee7564f0be44179c5222b3e5a4b62d.zip
Add how to compile raspi4 kernel
Diffstat (limited to 'md/writeup')
-rw-r--r--md/writeup/compile_linux_kernel.md35
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