A checklist for mainlining an i.MX8MP board

Placeholder post. The order we tackle things in when moving a board off a vendor kernel.

Machine Soul1 min read
  • kernel
  • upstream
  • i.MX8MP

Moving a board from a vendor kernel to mainline is less scary when you do it in a fixed order. This is roughly ours.

1. Get a clean boot log from the vendor BSP

Before touching mainline, capture a full boot log from the kernel the board ships with. It is the reference for every driver you bring up later.

bash
# capture everything from the serial console
picocom -b 115200 /dev/ttyUSB0 --logfile vendor-boot.log

2. Start from the closest upstream board

The i.MX8MP already has several boards upstream. Copy the closest device tree, trim it down to the console, and grow it from there.

dts
// arch/arm64/boot/dts/freescale/imx8mp-example.dts
/dts-v1/;

#include "imx8mp.dtsi"

/ {
	model = "Example i.MX8MP board";
	compatible = "example,board", "fsl,imx8mp";

	chosen {
		stdout-path = &uart2;
	};
};

&uart2 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_uart2>;
	status = "okay";
};

3. Bring peripherals up one at a time

  • Console, then storage (eMMC or SD)
  • USB and Ethernet, so you can stop swapping SD cards
  • Display, then audio, then camera
  • Suspend and resume last, once everything else is stable

4. Send it upstream early

Small series get reviewed faster than big ones.

bash
./scripts/checkpatch.pl --strict -g HEAD~3..HEAD
b4 prep --auto-to-cc
b4 send

Placeholder post. Swap in the real write-up once it's ready.

Ready to sign up?

Tell us about the machine, the stack, and where it's stuck.

Start the conversation