What's your shortest time for building Openwrt firmware on your PC?

With AMD Ryzen 5 3500X with 32GB RAM, even on an HDD first build took me 20 minutes. Then 1 minute each consecutive build. Just wondering do you guys use SSD or even RAMDISK for this type of thing? Would that make things faster? 1 minutes is very nice, I don't have to push the firmware builder thing. But, on an Intel i5 1235U laptop, even on an SSD, that took me like 1.5 hours.

Because it's building the toolchain, subsequent builds are always faster until you do dirclean or something that requires all the tooling to rebuild.

My usual morning git pull a bunch of stuff and make -j32 takes a minute or two (x86/64 target, stuff like "Mu;tiple devices" ath79 would take a lot longer). Current dev box is 7950x with 2TB SSD (I haven't built a workstation with an HDD since probably 2011-12, so have no idea if that's a build bottleneck).

2 Likes

That is ULP processor, are you buulding on fast or slow cores?

I'm just getting into building my own firmware. With no optimizations apart from -j4 and on an antique laptop from 2011 it takes 4:23 to do generic ath79.

I just make -j nproc , which nproc gives output as 12. Am I doing it right?

1min for what? Do you build all packages? Without a specific config sharing any number is absolut nonsense.

23 hours after a lot of tweaking.. on my old laptop.. So I gave up and started to use the imagebuilder and got my custom images in 5 minutes.
Two laptops later, imagebuilder takes maybe 10 seconds, I have never tried going back to a full build - haven't needed to so far.

2 Likes

You need plenty of ramdisk or disk io to build eg golang for single package needing it. 8core ryzen7 builds toolset in under 10 minutes, then kernel in under 5.

1 Like

Is 32GB ram good enough for compile everything in RAM?

Just build and check swap after. With 16GB (8 GB tmpfs.mount) it sometimes went there, but cannot guarantee it was not something else running at fault.

I build most USB packages, ksmbd and most luci-app stuff. Those take very little time tho.

Once you know the number of cores you have (from executing nproc once) you can just type make -j8or make -j12 or however many cores you have. I find it much easier to type -j8 than -j$(nproc --all)