All pages
Powered by GitBook
1 of 5

Loading...

Loading...

Loading...

Loading...

Loading...

postmarketOS

postmarketOS for Surface RT

Instructions

Prebuilt images

Currently there are no prebuilt images available. Please build your own image using pmbootstrap.

Root Filesystem

The Root Filesystem contains all the necessary binaries your system needs to boot

After building a kernel you need a userspace which contains all the binaries you want in your system. Like echo, cat, ls, candy crush (o.O looking at you MS)

Option 1: Build your own Root Filesystem

Option 2: Get an ARM Distro

Distributions

aka. Distro

ARM32 Distros

There are still a few distros out there which support ARM32

  • Archlinux

  • Fedora

  • Lubuntu 16.04

  • ... (append it pls)

Recommend Distros

To make use of hardware acceleration we need to use grate-driver Following distros support grate-driver out of box:

  • Archlinux

  • PostmarketOS

Choosing a Distro

Linux comes in all different flavors just like ice cream, you can choose whatever fits you. For ease anything Debian based is recommended, advanced users can look for Arch or Fedora. Difference is how commands work but deep down everything is nearly same.

Install and boot

There are two ways of booting Linux, APX payload or EFI boot, this time let's focus on EFI.

  1. Prepare a FAT32 formatted USB drive with EFI and kernel files, they are linked below, extract to root directory

  2. Put the SD card in your Surface

  3. Turn off tablet, complete shutdown and not sleep mode

  4. Plug in the USB drive you prepared

  5. Turn on by holding volume down key, release it when the logo appears

  6. Let it boot. If it does it will go past the kernel log and load a distro of your choice. It should be safe to unplug the USB once Distro has loaded up. (The distro could have mounted the USB, so be careful with that)

There are two ways to get these binaries : Build your own root filesystem with Buildroot or similar tools : Get a premade root filesystem (distro)

Downloads for older and probably dated builds can be found here:

Prepare SD card with any of your choice You can use Balena etcher, Rufus, Raspberry imager etc. Doesn't matter which one

https://wiki.postmarketos.org/wiki/Microsoft_Surface_RT_(microsoft-surface-rt)

pro

contra

Very small (few MB)

You need to install all packages by yourself

Boots very fast

For advanced users

pro

contra

Many packages preinstalled

Large (up to few GB)

Community support

Bloated

Easy for beginners (except Arch)

Raspberry Pi OS
postmarketOS
Ubuntu Server
https://berryboot.alexgoldcheidt.com/images/
Distro
Option 1
Option 2

Simple RootFS

RootFileSystem for Surface RT

Build root filesystem

There are maybe better choices but it works at the moment. Type: make wait for 15-20 minutes. A lot of stuff is downloaded and compiled. When finished you will find ./output/images/rootfs.tar

target packages: libraries -> hardware handling -> libgpiod[*] -> install tools[*]

Download Buildroot from unpack it open directory in terminal type: make menuconfig -> Target options -> configure for ARM. (see picture)

https://buildroot.org/download.html

Raspberry Pi OS

Install Raspberry Pi OS on your Surface RT

Make sure that Secure boot is disabled before you try to boot Linux.

Install Raspberry Pi OS

Installing Raspberry Pi OS is very easy in comparison to some other distros.

It can be done on a Windows or Linux host and therefore is easily accessible for everyone.

Install on SD/USB for UEFI

  1. Place the efi folder, startup.nsh, zImage, and tegra30-microsoft-surface-rt-efi.dtb files onto the "boot"/fat32 partition of the USB drive. Confirming any overwrites.

  2. If you are using Linux you can do this before booting RaspiOS for the first time on your host machine.

    If you are using Windows you need to boot RaspiOS on Surface RT and copy the modules on from e.g another Fat32 USB to the root filesystem. You need to reboot once to load the modules correctly.

fs0:
zImage dtb=tegra30-microsoft-surface-rt-efi.dtb root=/dev/sda2 rootwait console=tty0 cpuidle.off=1

# shutdown if something went wrong
reset -s

Install on eMMC for UEFI

You need to install RaspiOS on USB first

It is only recommended to install it on eMMC if you really want to use it on eMMC. Otherwise you will wear out your eMMC unnecessarily.

Taken from Discord user Misterobots:

  1. Once Raspberry Pi OS has booted from USB.

    Go to Start menu -> Accessories -> SD Card Copier.

    Select the USB drive as the "From".

    Select the eMMC (mine was MBG4GA) as the "To".

    Check the box that says "New Partition UUIDs". Click Start

  2. Edit the startup.nsh (on the eMMC boot partition, that was just copied to) and change the root=/dev/sda2 to root=/dev/mmcblk0p2. Then save.

  3. Once the Copy has finished (with no errors), shutdown the Surface RT, remove the USB drive, then power on the Surface RT normally. (do not hold Vol. down)

This should get you booted from eMMC with both boot and rootfs on the eMMC.

TODO after booting/installing

If you want to install Raspi OS on eMMC do the steps below after booting from eMMC.

There is only one thing to do after you can see the desktop. Open the Terminal and enter sudo raspi-config Choose Advanced Options Choose Expand Filesystem Now your SD Card / eMMC is writable and can use all of its space.

Battery Level in Panel

The default plugin always shows 0% charge left. Use the "Battery Monitor" plugin instead. It should be already installed

Brightness Control

Unlike KDE, GNOME, MATE or XFCE, Raspberry Pi OS running LXDE does not seem to have any plugin to control the brightness. However, it is supported in the kernel level.

pip3 install --user rpi-backlight

Create the following udev rule so that this tool can be run without `sudo`.

echo 'SUBSYSTEM=="backlight",RUN+="/bin/chmod 666 /sys/class/backlight/%k/brightness /sys/class/backlight/%k/bl_power"' | sudo tee -a /etc/udev/rules.d/backlight-permissions.rules

Reboot.

Now you can run the software with rpi-backlight-gui. You can also create a desktop shortcut. Create the file `~/.local/share/applications/rpi-backlight.desktop` with the following contents.

[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
Name=rpi-backlight GUI
Exec=rpi-backlight-gui
Icon=/usr/share/icons/HighContrast/256x256/status/display-brightness.png
Categories=Utility;

Use this

Grab all the "standard files" from - (, , ).

Use (sudo apt install rpi-imager) to image a USB drive as you normally would.

Edit the startup.nsh file on the USB drive to show as below. For further information about can be found here

Download the modules and firmware - - and place them in the root directory /. This is important. Without modules some features like Wifand i or CPU Temperature Sensor won't work.

Insert the USB Drive into the Surface RT and

Download the tool using `pip`.

See for more details.

guide
Raspberry Pi OS Imager
kernel params
rpi-backlight
https://rpi-backlight.readthedocs.io/en/latest/usage.html#adding-a-shortcut-to-the-lxde-panel
postmarketOS booting on Surface RT
Raspberry Pi OS booted for the first time on Surface RT
usb-linux-boot.zip
zImage
tegra30-microsoft-surface-rt-efi.dtb
kernel modules
Boot to the USB.