Question about Build workflow

Alexander Wilhelm alexander.wilhelm at westermo.com
Mon Oct 27 03:55:29 PDT 2025


I have a few questions regarding the build system. I’ve already read the Wiki
pages and looked through the Makefiles, but I’m still having trouble
understanding some parts. Maybe someone in the community can help me out?

Here’s what I’m curious about: I know that under OpenWRT I can define a target
and also a subtarget. I’ve also seen profile, and noticed that "Devices" are
defined in the Makefiles. Are profile and "Device" equivalent? If so, which one
is considered the "modern" approach?

For example, I’ve defined my own targets and subtargets. Due to some deviations,
I’ve overridden the following steps in the target-specific image/Makefile:
* Image/Prepare
* Image/BuildKernel
* Image/BuildKernel/Initramfs
* Image/InstallKernel

Now I’ve decided to merge some subtargets and define different packages using
"Devices". However, I’ve noticed that the steps above are executed at the
subtarget level. I need to move some of these actions to the device level, but I
haven’t seen anything like `Device/Prepare` or similar. I’ve tried to follow the
structure of other device Makefiles, but they seem quite complex and extensive.
Could someone in the community advise me on the best approach? Specifically, I’d
like to know how to handle those four steps at the device level. Thanks in
advance for your help!


Best regards
Alexander Wilhelm



More information about the openwrt-devel mailing list