Linux Kernel for Surface RT. Build your own working Linux kernel for Surface RT.

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. I'd also recommend reading Jay Carlson's excellent notes on Embedded Linux here - as an overview.

Get the kernel source

You may want to build grate-driver/linux instead of mainline. It includes the latest device tree and experimental patches for Tegra in general. Take reference from the EFI compiling page and just use the different config settings from here. Recommended for users who know what they are doing.


Using Grate is recommended. It has also Surface RT specific patches and features.

git clone


Download and unpack the kernel and open the directory in terminal wget tar -xf linux-5.10.10.tar.xz cd linux-5.10.10/

Modify the source (Mainline)


This is very important a wrong devicetree can damage your device!

Go to ./arch/arm/boot/dts, this is the devicetree directory Place tegra30-microsoft-surface-rt.dts there. Add the new devicetree to the build system by a adding: tegra30-microsoft-surface-rt.dtb to ./arch/arm/boots/dts/Makefile below dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) +=(see image)

Configure the Kernel

SoC config

Start with a basic configuration for Tegra SoC's by using the default tegra_defconfig. Type: make ARCH=arm tegra_defconfig This will place a .config file in the kernel root directory with the default config for Tegra CPUs.

Surface RT config

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 .config file


Battery and Charger should be obvius. But I2C_HID is needed for touchscreen and tCover mwifiex is wifi

Debug config


Optional: add#define DEBUG in the top of arch/arm/boot/compressed/head.S to enable decompressor output to see uart ouput as soon as possible

Build the kernel using command line

Type: 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 ;) ) CALL scripts/ CALL scripts/atomic/ CHK include/generated/compile.h Kernel: arch/arm/boot/Image is ready Kernel: arch/arm/boot/zImage is ready

Build the kernel using shell script

You can create a .sh script in kernel root to speed up your workflow
make 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 arch/arm/boot/dts/tegra30-microsoft-surface-rt.dtb