How to include additional packages using CLI without going to "make menuconfig"?

Hello,
How to include additional packages using command line without going to "make menuconfig" and selecting graphically?

Just add properly formatted lines to the end of your .config

(And after that you should run "make defconfig" to pull in possible dependencies)

2 Likes

Thank you. Is it possible without modifying/resaving .config file?

No. The whole build system is based on .config being the config storage.
menuconfig is just a way to manipulate .config

Compiling OpenWrt means compiling the kernel and 100-200 separate packages into tempororay storage area, and then combining them selectively to the final firmware. The compilation is not "single-line gcc command" where you could just add new packages via additional options

What do you actually want to do?

(Ps. As you mentioned menuconfig, I assume that you are not using the imagebuilder that cooks firmware image from ready-compiled packages. Imagebuilder would be more on the style of packages on a single line, but as imagebuilder does nto allow source code modifications, it is mainly meant for semi-beginners.)

2 Likes

Thank you for the answer.
I have Xiaomi Mi WiFi R3, which is not OpenWRT officially supported.
But is supported by https://github.com/x-wrt/x-wrt. So every time I want to update firmware and include additional packages, I have to select them and compile. X-wrt is on latest Openwrt snapshot, so I cannot install those packages later using opkg, because of kernel version incompatibility.

But modifying .config now will be easier than selecting graphically.

Hmm, my last attempt to post this hung, hopefully you don't get a dupe:

Why don't you use "make oldconfig" after any update?

Thanks. What it does?

https://openwrt.org/docs/guide-developer/toolchain/use-buildsystem#defconfig

1 Like

After you pull an update and update your feeds, running it looks for anything that might have changed since you last ran a configuration and asks you only about things that are new/have changed options.

So you configure your setup once, then just run "make oldconfig" after pulling an update from then on to update your .config before running "make" to build (most of the time, occasionally something will require additional manual intervention in menuconfig but not often).

1 Like

Thank you.

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