Adding a new platform support in the same workspace

Hello :), I'm new to OpenWrt

I would like to add a new platform support in the same workspace, while respecting these constraints :

  • Both of the two platforms can share some packages.
  • Some packages are only included in a particular platform.
  • The target architecture is different for each platform.
  • When running make, I would like to specify which platform I would like to build e.g. make product_1

How can I manage this, to get all this things working ?

Check out ./scripts/env and set a built environment for each target. You cannot chain two separate arch together, since the buildroot is tied to the arch, AFAIK.

You can, however, setup a wrapper script to switch between environments and build from the existing .config

You can edit the targets to include the specific packages. Since the packages aren't connected across targets/toolchains, it doesn't matter. You can do this by setting the packages you want in make menuconfig to default to be baked in/modules.

I'm sure there is probably a way to do this, but it is over-complicating things if you go the ./script/env route, since you can just call make -j$(`nproc` + 1) once you switch environments via the wrapper script.

3 Likes