Colibri iMX8, how to include dnsmasq when compiling the kernel

Colibri iMX8QXP 2GB WB IT V1.0D
Iris carrier board V1.1B
Linux BSP 5.4

I am trying to compile the 5.4.0 kernel for the iMX8 and just wondered how to include dnsmasq in the kernel or as a module?


Hi @robple11 , dnsmasq doesn’t come from the kernel. It can be added to bsp by Yocto Project. For example, add IMAGE_INSTALL_append = " dnsmasq" to local.conf file.

The reason why we are trying to compile the kernel is to add dnsmasq and also reduce the heat, currently when idle the iMX8 stays around 70 degrees Celcius but we would like to get it down to 40-50C. Bascially we use the WiFi to connect clients through to the Internet via Ethernet port and some proprietary Bluetooth from a USB chip and thats about it, so nothing else needs to be running or active.
This is the only reference I could find that showed power could be reduced by turning off a few things in the kernel compile this is like 3 years ago and it seems no progress has been made to reduce heat on the iMX8.
Checking out the Yocto Project link we currently dont have the means to build the reference image but can build the kernel. Has someone else managed to build a image with reduced heat and possibly include dnsmasq?

The dnsmasq is not a kernel feature or driver. It can not be added by recompiling the kernel because it just doesn’t exist there. Excepting Yocot Project, you can also download the dnsmasq source code and cross-compile it with the toolchain. And deploy the binary to Colibri iMX8X.

currently when idle the iMX8 stays around 70 degrees Celcius

This is a little bit high than expected for an idle status. Is any heatsink mounted on Colibri iMX8X? The default auto-run Qt demo of multimedia BSP will consume GPU resources and makes SoC hot.

To reduce power consumption by disabling unused peripherals, that is feasible. You can just tweak the device tree. You don’t have to recompile the kernel itself.

Great, make sense about dnsmasq.
No heatsink on my demo board, definitely in the production units, but just trying to reduce heat as much as possible. I have already removed the Qt demo and it went down slightly like 3 degrees but not much.
I already having a working version of dnsmasq on my module as someone from Toradex was kind enough to provide an image to install, are you saying I can edit something on the current version I have without having to compile anything?

You have to config the device tree and recompile it to disable the unused peripherals. This is how to get the kernel source code and compile device tree.

Still trying to get my head around the whole process. Can I compile a new dtb file with peripherals turned off etc and then replace the current one I am using somehow? I watched the webinar of the guy from LabWorks that changed a dtb file and deployed it via U-boot to effect changes on his device. Is this possible?

It is possible to do it in a similar way. Linux BSP v5.5.0 has device tree files in /boot folder. You can put your own files there or over-write the existing ones. By default, it is imx8qxp-colibri-eval-v3.dtb applied. It is set by preboot in u-boot.

Colibri iMX8X # print preboot
preboot=setenv fdtfile ${soc}-colibri-${fdt_board}.dtb
Colibri iMX8X # print fdt_board
Colibri iMX8X # print soc

Thanks so much, that worked great! Already got the temperature down 10 degrees by turning off a few things.