The MNT Reform platforms are a series of portable laptops built on the principles of open hardware and user freedom.
The team at MNT Research has done an amazing job documenting their open hardware platforms, making this project possible.
This repo attempts to build the Linux kernel and associated required artifacts for the MNT Reform platforms. It focuses on a "distro-agnostic" approach, so that you can use the kernel in whatever distro you choose. It also focuses on extensibility, so that you can integrate the scripts into your workflow.
As we need to test that it actually works, we use Arch Linux Arm as the the testing distro. That's also the filesytem we use to test the kernel modules, headers (DKMS), and the booting process (u-boot handoff).
Releases will contain the following artifacts:
- MNT Reform patched Linux kernel
- Linux headers for building out of tree modules
- MNT's LPC module
- QCOM's Wi-Fi module (i.MX8M Plus)
There will also be a link to an image generated by image-gen.sh which installs all of these along with an Arm Linux Arm filesystem in a 120G sparse image & bmap file mnt-reform-[ver]-aarch64.img.zst[.bmap]. See the docs for more info on bmap-tool.
sudo bmaptool copy path/to/mnt-reform-[ver]-aarch64.img.zst /dev/sdXYou'll boot into an Arch Linux ARM filesystem. Users include root and alarm. Passwords are the same as the username.
You'll need some tooling:
required_tools = ['git', 'make', 'tar', 'aarch64-linux-gnu-gcc', 'patch']Then run:
git clone https://github.com/cetola/mnt-build.git ~/mnt-build
cd ~/mnt-build
# Checkout a release tag
git submodule update --init --recursiveThe first time you build, the config you need will probably not match the config in the repo. So at a minimum you'll want to build with the olddefconfig option:
./scripts/build.py --olddefconifgSee --help for more options.
Once the build is complete, you'll get a kernel tarball containing the kernel, config, and separate module tarballs for reform2_lpc and wlan (one .tar.gz per module). If you want headers use the --with-headers flag. You can install all of this manually or use the PKGBUILDs in Additional Tooling.
| Package (upstream) | PKGBUILD | Description |
|---|---|---|
| Linux stable kernel | linux-mnt-reform | MNT Reform patched Linux kernel. |
| Kernel headers | linux-mnt-reform-headers | Matching headers used to build external kernel modules. |
| reform-tools | reform-tools1 | Reform userland tools and scripts. |
| QCOM WiFi module | mnt-reform-qcacld2 | Out-of-tree WiFi module used on i.MX8M Plus SoMs. |
| MNT LPC module | mnt-reform-lpc | LPC system controller driver module used across Reform platforms. |
This is very much a work in progress. Do not try to build unless you are on a release tag. Even then, YMMV.
There is a container in the scripts directory if you happen to be building for Arch and care about toolchain skew.
These scripts are an automation of a full guide that I posted on the MNT Community Forum. See there for more details. See the Arch Linux Arm site to grab a filesystem and install manually.
If you use one of the provided images, know I have only tested on the Amlogic A311D MNT Pocket Reform. That being said, the kernel is patched with all patches from reform-debian-packages -> linux -> patches[ver]. As such it should boot on any MNT Reform platform. Be sure you have the correct device tree installed.
The provided images will not install a DTB (for now), so you'll need to decide which you want and edit the sd card manually in /boot/extlinux/extlinux.conf. If you use the PKGBUILD it will only install a limited number of DTB files, namely the ones I can test. If you want me to add more feel free to add an issue, or better yet, a PR.