[Solved] OpenWrt SDK minimal for building packages only

What is the correct and easiest way to set up OpenWrt for building packages only, and not the firmware ?

The reason for asking is, from a developers perspective of building packages, lately with OpenWrt 18 and 19 (after scripts/feeds install -a), even with SSD, doing a make package/packagename/compile takes 5-10 seconds before actually starting to build the package.

I've been using a handful of (proprietary) SDK's based on OpenWRT that only build the host build tools (m4, libtool, crosstools-gcc etc), and the packages. They are super fast to work with while developing a package. Also in chaos_calmer, the speed of building single packages was acceptable, but then the package count was much less I think. Perhaps it is just related to how many packages that are installed in the SDK.

Building and using the SDK should achieve exactly that.

1 Like

Any suggestion to make it faster ?
It would help if someone had walked this path before. I can of course try reducing the number of packages.I've tried that before with a lot of strange build problems.

The SDK already comes with zero packages, and it starts almost immediately for me.

1 Like

What about make path/to/package/compile?

Misclicked answering to @jow instead of @hansd

OK. You don't have to do scripts/feeds update -a; scripts/feeds install -a ?

You don't. You can update and install a single feed.

1 Like

Well the idea is to only install the feed packages you need (./scripts/feeds update -a; ./scripts/feeds install some-single-package)

If you install all packages from all feeds (install -a), it’ll slow down metadata handling significantly, leading to the delays you described.

1 Like

Thanks. I'm giving it a try now. I have tried it before, and I think the problem I had then was that when installing my own packages, I had trouble with the dependencies my packages had when they (the required packages) were not installed in the SDK.

I get lots of these. Is this because they are not installed in the SDK ?

WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libgnutls', which does not exist
WARNING: Makefile 'package/network/utils/curl/Makefile' has a dependency on 'libopenldap', which does not exist

Likely you'll have to select and "install" the feeds for all packages (including libraries as well as dependencies of dependencies) your target package is dependent on.

These warnings should be harmless

Thanks this helped a lot on build time. I think the thing i've done wrong in the past is that i didn't do a scripts/feeds update -a before installing custom packages. This time the dependencies got installed with the custom packages.

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.