How to create exactly the official images with Image Builder?

I have a MikroTik RB750Gr3 and the 19.07.6 release downloaded from here includes LuCI.

However, if I use the Image Builder from the same directory to build the image myself, LuCI (and possibly other packages?) are not included. Why is this and how do I find out what packages are enabled in the pre-built image? I want exactly the same thing as the official release, but with two extra packages (wireguard and luci-app-wireguard) built in.

Also, I read something about OpenWrt supporting reproducible builds, but every time I regenerate the image it has a different SHA-256. Is this supposed to happen?

There is a ".manifest" file in the downloads folder, that contains the list of packages included in the image. You can compare that with the output of "make manifest".

1 Like

I tried that with x86-64 and the resulting manifest is completely different, the manifest generated with image builder is missing many packages including luci and several kmods.

Can I use the official image manifest somehow to feed the image builder?

I also noticed there is .config file in image builder root dir, looking at it, it has some options set that seem to match (i.e. CONFIG_PACKAGE_luci=y) some of the options in the official image manifes, but it seems the options set there are somehow ignored in the image builder resulting build?

Yes, or generate it from a running image.

See:

Pass the PACKAGES= list to make as in the above link.

Generate your own manifest using:
opkg list-installed | awk -F" - " '{printf "%s ", $1}'

1 Like

You can instruct the image builder to add as many packages (and their dependencies) as you need.

If I don't have a running image how do I convert the manifest file to a string of package names?
Can I pass the package list as a file somehow?
I was looking for an automated way to just use the manifest file as a config file for the make image command...

The same way as with opkg.... You probably need to get up to speed with Linux scripting....

This should do it:
cat openwrt-23.05.0xxxxx.manifest | awk -F" - " '{printf "%s ", $1}'

Go to https://firmware-selector.openwrt.org and choose your version and model, then expand the triangle next to “Customize installed packages and/or first boot script”. The list of default packages will be shown in the “Installed Packages” box, including luci.

I've used that before and it didn't work that way, the package list was loaded with the bare minimum packages same as the image builder I think.
I even posted about it on the firmware selector thread.

Did they recently fix that bug ?
I'll give it a try next time, thanks

Thanks for the hint, I'm using Debian but I don't really know anything about shell scripting.

If it's really that trivial to produce the default installed package list, shouldn't it be on the image builder archive by default?
I'm not sure if it's reasonable to expect newbies like me to find that on its own, much less for people just following the wiki instructions...