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 testing distro. That's also the filesystem 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)
- System images, bmap files, and SHAs for tested platforms
See the docs for more info on bmaptool, and see Images for details on which images you can download.
sudo bmaptool copy https://github.com/cetola/mnt-build/releases/download/6.19.11.reform3-aarch64/arch-sys-mnt-pocket-a311d-6.19.11-reform3.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. See the kernel requirements.
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:
./mnt-build build --olddefconfigSee --help for more options.
Once the build is complete, you'll get a kernel tarball containing the kernel, config, and all patches that were applied. There will be separate module tarballs for reform2_lpc and wlan. If you want headers, use the --with-headers flag and it will generate a headers tarball. You can install all of this manually or use the PKGBUILDs in Additional Tooling.
| Upstream Package | AUR | Description |
|---|---|---|
| Linux stable kernel | linux-mnt-reform | MNT Reform patched Linux kernel and headers. |
| reform-tools | reform-tools | 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. |
image-gen.sh creates a bootable Arch Linux ARM disk image:
- Image name:
mnt-reform-<kernel-version>-aarch64.img - Layout (DOS partition table):
- BOOT ext4 partition (1 GiB)
- ROOT ext4 partition (sparse image, 110 GiB)
- Installs:
- ArchLinuxARM base rootfs
- linux-mnt-reform kernel, dtb, extlinux
- mnt-reform-qcacld2
- mnt-reform-lpc
- reform-tools
- flash.bin (copy of u-boot)
- ArchLinuxARM base rootfs
- Bootloader handling:
- Resolved from machine config (reform-tools/machines/*.conf) with fallback metadata
- For SD-boot platforms, bootloader is also written into raw sectors at configured offsets
- Output:
mnt-reform-image-<sysimage>.tarwhich contains the image, bmap file, SHA, and manifest
I will currently only release images for hardware that I can test. So today, that's the Pocket Reform with the A311D SoM. If you are willing to test other platforms / SoMs, create an issue and I'll produce more images.
The kernel is patched with all patches from reform-debian-packages/linux/patches[ver]. As such, it should boot on any MNT Reform platform, provided you use the correct DTB and have a U-Boot setup that works for your system.
If you only need bootloader artifacts (without generating a full OS image), use scripts/build-fsbl.sh. It fetches a prebuilt bootloader or builds one from source for a target --sysimage, then prints the exact flash offsets (seek/skip) and dd command to use for SD.
Example:
$> ./scripts/build-fsbl.sh --sysimage pocket-reform-system-a311d --mode source
$> sudo dd if=path/to/<flash.bin> of=/dev/sdX conv=notrunc bs=512 seek=<seek> skip=<skip>See ./scripts/build-fsbl.sh --help for all options and details.
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.