Void Linux on Pocket Reform imx8mp

Hi everyone,

First of all, I’m loving my Pocket Reform. Really stoked to see how deep I’m going to go on it.

I’m a big fan of Void Linux and have started work on making a kernel package, and have a running system on it already (I’ll post a github link later).

I’m having some issues compiling the qcacld2 driver from MNT’s repo against my custom kernel’s header files. Does anyone here know what (if any) differences there are in MNT’s fork of this repo? I plan on running a diff this evening, but figured it’s worth asking first.

I also have to do some XServer debugging. I’ve tried basically nothing on this front, but it didn’t just immediately work. I plan on taking a look at my debian system to see if I can steal some of the config files. Not sure if there’s anything special there.

I’m chronically bad at documenting my work, but I’ll be doing my best to make installing void on the pocket reform easy so anyone else who’s interested can have an easy time.

Thanks in advance for any advice!

5 Likes

As promised, here’s the link to my github

For now dracut still needs to be manually generated, but it’s on my list to fix.

2 Likes

Not sure why I thought this was the original source for qcacld2. Clearly that’s just another implementation for another project

I’m not sure if this will be directly helpful for you, but here are the NixOS derivations I put together for the imx8mp pocket kernel + qcald2 driver + qcald2 firmware which are building happily and work fine in my testing. The repo used for the driver and compilation options I had to do some fiddling with to get everything working. I’d definitely recommend using the repo for the driver I used in the NixOS derivation as it carries some important fixes. Hope this helps!

3 Likes

Much appreciated. Looking at the MNT repo, I’m going to take a crack at building it against the 6.11 kernel instead of 6.10. If that doesn’t work, I’ll start looking at that version

The Debian package for imx8mp wifi is packaged as a dkms package: ezurio-qcacld-2.0-dkms - Debian Package Tracker

Just now I ported these Linux 6.11 fixes to the Debian package: Commits · binary-deb · Reform / qcacld2 · GitLab (top two commits)

To add support for another distro you essentially need to make sure that the following things are set up:

  • SoM specific linux kernel cmdline arguments passed during boot
  • SoM specific kernel patches applied
  • SoM specific kernel config parameters enabled
  • SoM specific device tree built
  • build and load LPC kernel module
  • SoM specific hardware hacks carried out on each boot

The last part is what the “reform-hw-setup” script does: sbin/reform-hw-setup · main · Reform / MNT Reform Tools · GitLab

If you have any questions about how we do the Debian integration, please don’t hesitate to ping me directly.

1 Like

I was hoping you’d see my thread @josch. Your other replies in other threads were very helpful for getting a running system. I think I have everything up to

I don’t have an amazing understanding of DKMS, so I’ll do some research and take another crack at it tonight once I get my 6.11 kernel small enough for it to not leak into my DTB offset in u-boot :face_with_spiral_eyes:

update: still stuck on building that qcacld2 module. I think the kernel I built is missing CONFIG_DEBUG_INFO_BTF_MODULES. Maybe if I build that bad boy it’ll just work :slight_smile:

I’ve made no progress on the XServer front, but it looks like that repo has a lot of info. I’m going to take a closer look and see if there’s any useful configuration in there. System is totally up and running using my phone hotspot as a NIC for network access :slight_smile:

@josch one thing I noticed is that when I type “shutdown” the system controller stays on. Is there a command I need to send over a serial port to shut down the system controller?

Just got qcacld2 compiled and the module installed! Wifi is now working. I’ll try and package it up nicely tomorrow.

1 Like

@josch do you know what the state of X11 on the imx8mp is? I’m able to get it up with etnaviv acceleration using the modesetting driver, but I’m getting this really weird mouse smearing artifact, and whenever I move the cursor, it’s really slowing every other graphical application down

Hi @joe-albanese, no sorry, since i don’t own a Pocket Reform myself, I have no personal experience with X11 on that platform. I also cannot recall others having done more than an experiment here and there. On imx8mq with etnaviv there used to be some custom xorg configs which were removed but you can still see them in the git history: remove X11 settings for etnaviv (95ab92bb) · Commits · Reform / MNT Reform Tools · GitLab Maybe this helps.

1 Like

Yeah, I dug that up in some old threads. I found some info online saying that X11 doesn’t play nicely with etnaviv a lot of the time, so I went to Wayland and have it working with that. I’m just going to make the call to not deal with X11 until I finish making my work into packages people can install

1 Like

I’ve been a little busy with other projects recently, but this is still being worked on. If anyone IS interested in getting Void running on their pocket reform LMK and I can quickly put together a hacky guide on how to get started before I finish packaging it all up.

Currently, I’m fighting acpi to get battery info in the OS. Right now I need to use the little oled to know what my charge state is.

2 Likes

the battery info is coming from the reform2_lpc module. You have to build and load that module to get /sys/class/power_supply/BAT0.

1 Like

Well that was easy :slight_smile:

@josch Do you know where I can find where the uboot boot script source? I just ripped it out of the original /boot folder and made some modifications

If you mean how boot.scr gets created then it is produced by flash-kernel using this template:

The Reform specific stuff is from here:

But in general, I’d recommend you try out writing an extlinux.conf which will look quite a bit more simple in the end. For example, I boot with this:

default l0
menu title U-Boot menu
prompt 0
timeout 50


label l0
	menu label Debian GNU/Linux 12 (bookworm) 6.11.5+bpo-mnt-reform-arm64
	linux /vmlinuz-6.11.5+bpo-mnt-reform-arm64
	initrd /initrd.img-6.11.5+bpo-mnt-reform-arm64
	fdt /dtb-6.11.5+bpo-mnt-reform-arm64
	
	append   ro no_console_suspend cryptomgr.notests loglevel=3 ${bootargs} console=tty1

Oh great! I’ll take a look at that. Does extlinux somehow generate the boot.scr for me, does it replace boot.scr or is it something that boot.scr invokes? I’ll do some reading and find out.

If extlinux.conf exists, u-boot will prefer it over boot.src and will try booting using it instead of boot.scr. Here are some details about the boot order, most of which (other than the dip switch) should also apply to non-imx8mq platforms: document boot options (#2) · Issues · Reform / reform-handbook · GitLab

1 Like

Do you think it would be silly to just package the extlinux.conf in my void package? Seems much cleaner. Are there any pocket reforms that don’t support it?