Building a Kernel is an advanced process for most beginners. We suggest people to read this article first to understand kernel bootup on ARM devices. https://people.kernel.org/linusw/how-the-arm32-kernel-starts I'd also recommend reading Jay Carlson's excellent notes on Embedded Linux here - https://jaycarlson.net/embedded-linux/ as an overview.
Using Grate is recommended. It has also Surface RT specific patches and features.
git clone https://github.com/grate-driver/linux.git
Download and unpack the kernel and open the directory in terminal
tar -xf linux-5.10.10.tar.xz
./arch/arm/boot/dts, this is the devicetree directory
Add the new devicetree to the build system by a adding:
dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) +=(see image)
Start with a basic configuration for Tegra SoC's by using the default
make ARCH=arm tegra_defconfig
This will place a
.config file in the kernel root directory with the default config for Tegra CPUs.
Now its time to add Surface RT specific settings.
This can be done with [g|x|menu]config or by simply modifying the lines below in the
Battery and Charger should be obvius. But I2C_HID is needed for touchscreen and tCover mwifiex is wifi
#define DEBUG in the top of
arch/arm/boot/compressed/head.S to enable decompressor output to see uart ouput as soon as possible
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j $(nproc)
$(nproc) sets the number of threads to your CPU core count
If compiling was successful you should see some output similar to this:
(This doesn't need to be a the end of the log. Scroll up a bit ;) )
Kernel: arch/arm/boot/Image is ready
Kernel: arch/arm/boot/zImage is ready
You can create a .sh script in kernel root to speed up your workflow
plsMake.sh#!/bin/bashmake ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j $(nproc)
The kernel is located at
arch/arm/boot/zImage and the devicetree can be found at