Hi.
I'm building for x86/64. The make command generates four images : squashfs / ext4 and EFI / MBR. I use a low end refurbished laptop, and that takes time.
In order to render the build faster, is there a way to force building of only one image?
Does it involve editing building script?
I need only MBR images. I would like to build only the ext4 or only the squashfs image. I need the ext4 for a stable router, and the squashfs for a testing router (I have two as you understand).
Thank you.
the content should be the same, only packaging differs, generating the actual images shouldn't be that big part of the whole process - it's not compiling the same binary 4x for 4 different image formats.
The time needed for those images is minimal, even more so compared to the time it takes for all the binaries to be compiled (toolchain etc). If you want to disable some of those images you need to go into the configuration, open Target images and deselect what you don't want.
Yes I know all this. Actually generating the four images is what take most time. Just ran a build ...
1:50 (min) to download files until the "building images" message
6:10 end
building the four images took approximately 4:20, hence 1:05 min per image
I know such online engine builder (great stuff !).
Actually, when selecting snapshot, firewall4 is the default firewall package, and it's generating a flaw (nftables)
Hi all.
I have came to a solution. As I guessed, it involves editing a script.
Goal : using the x86_64 image builder, generate only one image (squashfs MBR in this case) instead of the 4 generated by default. The real goal is to spare build time.
I have installed the building system, and studied what happened to .config once I have checked/unchecked a few options in menuconfig.
It appears that modifying two lines in .config achevies the goal. You may have hard feelings manually editing .config Put comments in front of:
line 177 # CONFIG_TARGET_ROOTFS_EXT4FS=y
line 189 # CONFIG_GRUB_EFI_IMAGES=y
Now just run the MAKE command. After downloading the packages, only one image is generated.
Keep in mind that this solution is harsh and may not fits for everyone's case.
Should be under or around 20s per image on any system built within the last decade. We're talking about compressing around 20-30 MB (depending on how many optional packages get included) with squashs-lzma. Yes, compressing with lzma is relatively slow, but it profits significantly from multiple cores and the input data size is small, if not to say tiny.
As I can skip 3 images, I can save 3 min, so about half of the building time.
I'm using a low end laptop which is dedicated for building. It has a slow APU (2 cores) and a single HDD. I can understand that such tweak may seem meaningless for a high end computer, but not in my case.
The download phase is done once, and a fixed constant depending on your WAN speed - but the image creation step looks quite off…
$ wget https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-imagebuilder-x86-64.Linux-x86_64.tar.xz
$ tar -xJf openwrt-imagebuilder-x86-64.Linux-x86_64.tar.xz
$ cd openwrt-imagebuilder-x86-64.Linux-x86_64/
$ time make image PACKAGE="luci-ssl"
[…]
Calculating checksums...
real 0m48,927s
user 0m31,046s
sys 0m6,411s
I manually started a stopwatch at "Building images", and got a total of just under 30s on my 2013 vintage system for the full set of images.
He is probably using a netbook or a laptop with netbook-grade CPU, I have one with an A4-1200 APU and that hardware is so absolute garbage-tier that it's not even capable of printing a pdf over USB at full speed. The CPU chokes and goes 100% on the print spooler service that is converting the pdf into the protocol to the printer over USB, and the printer pauses like 3 times per page to wait for the data stream from the laptop. Loading basic programs is still slow even if I have put a basic SSD in it. It's faster than with the original hard drive, that's for sure, but it's still not very responsive by modern standards.
I still use it to run SPI flashing tools and similar, troubleshooting networking equipment and other very basic tasks where I need Windows OS to run the tools
This has gone off topic.
I have a lot of computers at home, from glorious vintage 8bit , to a modern high end gaming.
I don't need more computer power. I have installed OpenWrt on several routers, in different places (family, relatives), so what I need is a transportable solution dedicated to build. That is why I use this laptop, despite being very slow. Building for ath79 or mt7621 is fast enough, only building for x86 is rather slow.