What's new

How to customize configuration when building from source?

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

buddyp

Occasional Visitor
I followed the directions from https://github.com/RMerl/asuswrt-merlin/wiki/Compile-Firmware-from-source-using-Ubuntu and built a working trx for my RT-AC66U.

Now that I've done that I'd like to build a customized system without a lot of the default stuff that is in asuswrt.

I noticed that you can do 'make menuconfig' in the router directory, as well as the kernel and busybox directories (as you would expect). However, after a few minutes of looking at the top level (~/asuswrt-merlin/release/src-rt-6.x) Makefile it looks those lower level .config files are generated by the top level Makefile. Its been a decade since I looked at a Makefile that complicated and I'm not really fully groking it.

So I edited the .config at the top level and I did a 'make' with no target and I got a trx without the stuff I didn't want. Is this the right way to do it? Can I use the various 'make menuconfig' commands to tailor my trx further?

TIA!
 
Last edited:
Don't play with these config files, they are dynamically generated at build time.

Basic customizations must be done to the target.mak file. Some additional customizations can be made to config_base (router/) and config_base.6a (linux/linux-2.6.36/), but some of these might get overruled by the root level Makefile, which does additional changes based to the other config settings. Also note that kernel changes are always highly likely to break the firmware, as there are closed source modules which rely on a specific kernel configuration.

You should always do a "make clean" after making any changes to target.mak or the config_base files.
 
Thanks!

I'm not sure how I missed target.mak when I was looking at the top-level makefiles but I did. I made my changes there and what got built looks like what I wanted. I'm going to give it a try when I get home tonight.
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top