User:Newbyte/Mainlining Notes

From postmarketOS


Can't find default configuration "arch/arm/configs/msm8916_defconfig"!

If you get this error when working with, it likely means that you have the wrong architecture or device selected in pmbootstrap. Do pmbootstrap init again and make sure you have the right device selected.

mkdir: can't create directory '.tmp_XXXXX': Permission denied

I'm not sure why this happens, but generally you can fix it by running rm -rf .output/ in your Linux kernel tree. You will probably need to use sudo. Also, make sure to reactivate after doing this.

Kernel configuration keeps restarting or being cleaned up even though you've copied one to .output/.config

This can be for multiple reasons.


  1. pmbootstrap is set to the right device (an architecture mismatch can cause this for instance)
  2. you've copied it to .output/.config and not .config

Using with linux-postmarketos-exynos4

linux-postmarketos-exynos4 has a "unique" setup where it does some magic to work around quirks in the Samsung bootloader[1]. Due to this, you will likely find that the kernel fails to build with ../usr/ Cannot open 'usr/initramfs.list' if you try to build it with To resolve this, copy initramfs.list and init from the linux-postmarketos-exynos4 package into .output/usr in your Linux source directory. You also need to get a copy of busybox.static for armv7 in there (the executable, not the package).

fastboot stuff

Get current slot

fastboot getvar current-slot

Set current slot

fastboot set_active <slot, either a or b>

Working with device trees

On modern devices, the easiest way to get a full dtb for your particular device is likely by coping /sys/firmware/fdt from a running Android device (or TWRP).

Decompilation of a dtb can be done like so:

dtc -I dtb -O dts <filename>.dtb -o <filename>.dts

Useful links

Device trees

Downstream reserved-memory bindings docs:

Mainline reserved-memory bindings docs:

Introduction to device trees:

U8500 modem stuff

i2c stuff