[Build](Archer C7 V2) Trying to optimize and secure my own personal build

So I've been trying to optimize and setup my own personal build system for a while now. I'm doing this because it's easier than just downloading the prebuilt ones from the download section because I'm trying learn more about networking and security.

I use these mainly:

  • luci-ssl-openssl
  • luci-app-adblock
  • luci-app-ddns
  • luci-app-upnp
  • luci-app-openvpn (openvpn-openssl)

So far I've created this basic docker as a build system and I have a handy_commands.sh document for even easier deployment when I want to build a new image.

So far it's done well but I'm sure there's more to be done and I'm still learning the patch system.

I'm wondering if anyone has any advice or resource apart from the openwrt/lede wiki they use?

decide on a goal. without that, progress is relative to infinity.

Spot on!

OpenWRT has a world of possibilities and options pre/during/post compliation and on first boot and while in use. So what is important to one person, is trivial to the next.

Without drawing a line in the sand of what your requirements are, you will just end up with a bunch of "Oh this, and oh yeah that" type info to cobble together that may or may not matter to you in the end. The Wiki really is great in finding info. It's just learning what to search for :slight_smile: start with google on what you want to do, maybe it has a technical term/name to what it is, then use the tech term in OpenWRT wiki to see if something like that is available, whatever it may be. Then go from there, search user experience and examples, then make your own.

Ok well here's a few.

What does stripping do exactly?

Using the "Strong" options for security, pros vs cons?

I'm also trying to figure out how to make it easier to use an old config from the previous build in my script but so far no luck.

Is this the right way to use a config.seed to generate a .config for make?

cp ../config.seed ../openwrt/.config
make defconfig

It's grabbing the config.seed from the directory folder that contains the source and then copying it into the source directory.

According to the wiki:

These changes can form the basis of a config file ( <buildroot dir>/.config ). By running make defconfig these changes will be expanded into a full config.

It normally raises a good amount of money for young women to help pay for school tuition. :innocent:

Yes, just make sure you issue your git pull and feeds update and install before moving your .config in there and running a defconfig.

1 Like

So I've got it all working and running. But adding target optimization doesn't seem to work in the config.seed

Do I need a patch or something to add the options in?

CONFIG_TARGET_OPTIMIZATION="-O2 -pipe -mno-branch-likely -mips32r2 -mtune=24kc"
1 Like

Not sure what you are trying to achieve, but looking at makefile, ar71xx is already 24kc by default:


hnyman notes still, that if you want to change the compiler options, maybe you can try hacking the include/target.mk directly.

Typically though, the default recipe is good enough for %99 of users out there.

-You need to alter .config or cat your whole config.seed into .config
-You then need "make defconfig" otherwise ( could be wrong...) the buildroot will pick up a change without sync and automatically make oldconfig ( remove your change )
-Also cat .config | grep YOUR_OPTION..... there might be an additional # not configured line there too!

1 Like