From 888e191c19bce3bc8774859b3ce2966934430780 Mon Sep 17 00:00:00 2001 From: Alasdair Allan Date: Thu, 27 Jul 2023 13:55:29 +0100 Subject: [PATCH 1/2] Adding NOTE about building 32-bit kernel If you are attempting to compile a 32-bit kernel on the 32-bit distribution of Raspberry Pi OS you should be aware that while the userland in this distribution is 32-bit, the kernel is a 64-bit kernel. You should therefore follow the instructions for cross-compiling the kernel. --- documentation/asciidoc/computers/linux_kernel/building.adoc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/documentation/asciidoc/computers/linux_kernel/building.adoc b/documentation/asciidoc/computers/linux_kernel/building.adoc index 32181ce4ed..e09c40b691 100644 --- a/documentation/asciidoc/computers/linux_kernel/building.adoc +++ b/documentation/asciidoc/computers/linux_kernel/building.adoc @@ -12,6 +12,8 @@ The instructions below are divided into native builds and cross-compilation; cho === Building the Kernel Locally +IMPORTANT: If you are build a 32-bit kernel on the 32-bit distribution of Raspberry Pi OS you should be aware that while the user land in this distribution is 32-bit, the kernel itself is a 64-bit kernel. You therefore need to follow the <>. + On a Raspberry Pi, first install the latest version of https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-32-bit[Raspberry Pi OS]. Then boot your Raspberry Pi, log in, and ensure you're connected to the internet to give you access to the sources. First install Git and the build dependencies: From 30408d5d393cc0fb73c396f61101d3b3e24ae256 Mon Sep 17 00:00:00 2001 From: Alasdair Allan Date: Thu, 27 Jul 2023 14:54:50 +0100 Subject: [PATCH 2/2] Update building.adoc --- documentation/asciidoc/computers/linux_kernel/building.adoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/asciidoc/computers/linux_kernel/building.adoc b/documentation/asciidoc/computers/linux_kernel/building.adoc index e09c40b691..4b06a8e24d 100644 --- a/documentation/asciidoc/computers/linux_kernel/building.adoc +++ b/documentation/asciidoc/computers/linux_kernel/building.adoc @@ -12,7 +12,7 @@ The instructions below are divided into native builds and cross-compilation; cho === Building the Kernel Locally -IMPORTANT: If you are build a 32-bit kernel on the 32-bit distribution of Raspberry Pi OS you should be aware that while the user land in this distribution is 32-bit, the kernel itself is a 64-bit kernel. You therefore need to follow the <>. +IMPORTANT: Building the 64-bit kernel on the 32-bit distribution of Raspberry Pi OS is a cross-compilation exercise because it requires the installation of the cross-compiler (`gcc-aarch64-linux-gnu`). Building the 32-bit kernel on the 32-bit distribution of Raspberry Pi OS — which has a 32-bit userland, and 64-bit kernel — you should set `ARCH=arm`, although it's likely that this may already be set as `arm_64bit=0` will have been set. Instructions for <> can be found later on this page. On a Raspberry Pi, first install the latest version of https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-32-bit[Raspberry Pi OS]. Then boot your Raspberry Pi, log in, and ensure you're connected to the internet to give you access to the sources.