How to do incremental builds?

my goal is to try and make development faster for myself. currently, what im doing is a full build with pmbootstrap and then I flash it on my phone. ideally i would build a kernel module, copy that over to my phone, and then test it, however the problem that i see is with the dts

is there a way to update the dts partially as well? im currently using lk2nd. ideally we wouldn’t have to reboot while developing, but if needed that’s fine too

maybe this development pattern is complex too… i can also see that i might need other kernel modules that are provided by the kernel too. feel free to tell me that :smiley:

This is partially addressed by envkernel:
https://wiki.postmarketos.org/wiki/Compiling_kernels_with_envkernel.sh

1 Like

My workflow is:

  1. source ../pmbootstrap/envkernel.sh
    make <soc>_defconfig # Only once
  2. make -j<procNum>
  3. pmbootrap build --envkernel linux-postmarketos-<soc>
  4. pmbootstrap sideload linux-postmarketos-<soc> # You will need --install-key at the first
  5. reboot

You can build only a dtb with:
make qcom/msm8937-xiaomi-land.dtb
You can copy your devicetree to the boot partition /boot and reboot.
Check your extlinux config.

Or a driver
make drivers/gpu/drm/panel/panel-boe-himax8279d.o
For the driver i would recommend make a full kernel build first install it and after you can overwrite the module or unload/load it with rmmod and insmod.

If you port a device you can use:

  1. cat .output/arch/arm64/boot/Image.gz .output/arch/arm64/boot/dts/<soc>/<your dt> > Image.gz-dtb
  2. fastboot boot Image.gz-dtb
    If you get an initfs from existing pmos chroot you can boot the full system
    fastboot boot Image.gz-dtb initfs # --cmdline paramter useful for set necessary kernel or lk2nd related params
1 Like

thanks @barni2000, that was exactly what i was looking for :slight_smile: