What is included by default by the LEDE Image Builder?

After some struggling, I have successfully compiled LEDE from source and customized packages and config files. So far, so good.

Now, I would like to use the LEDE image Builder. I have built it also from source and I have successfully built some images wit it.

However, the image size is roughly 1 MB less than configuring and building from source. So, it seems that it is not using the customized .config (even if it is present in the directory).

So, the question is what packages are included by default? I suppose the rest must be added to the PACKAGES var.

Somehow related, the .../bin/targets/ar71xx/generic/config.seed file contains the changes from default config. The PACKAGES could be extracted from here, but what about libraries and others... How to add them to PACKAGES? For instance:

CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_CONFIG_STTY=y
CONFIG_IB=y
CONFIG_IB_STANDALONE=y
CONFIG_LIBCURL_COOKIES=y
CONFIG_LIBCURL_FILE=y
CONFIG_LIBCURL_FTP=y
CONFIG_LIBCURL_HTTP=y
CONFIG_LIBCURL_MBEDTLS=y
CONFIG_LIBCURL_NO_SMB="!"
CONFIG_LIBCURL_PROXY=y
CONFIG_MINIUPNPD_IGDv2=y

Noob questions, I believe, but I could not found them on the docs, nor on any forum...

I thought make info in the image builder directory provides that information, does it not?

Image builder does not compile packages themselves, so they are included with the same config options as in buildbot. You can't change the compiled packages as they are just downloaded from the repo.

Libraries are normal packages.

Imagebuilder includes just the same packages that get selected by selecting the device in make menuconfig.

I've checked, looks like the combination of .profiles.mk and .targetinfo in the image builder directory provides the information you're looking for.

To add packages when using IB, use PACKAGES command line variable.

Thank @Strangi and @hnyman for clarifying the missing pieces.

So, to summarise:

  1. List all available router models to a file, to be able to search for specific models easily.
    make info > AllTargets.txt
  2. Search in .targetinfo the desired "Source Makefile" (should be the Target System that would be selected on menuconfig if compiling from source). This would give the default packages that are included in (section "Default-Packages"). Scroll down to find the specific device profile and there will be specified some additional packages (which will be the same as declared in point 3).
  3. Search target in .targetinfo or .profiles.mk. This will give the default extra packages included in the target.
  4. All packages/libraries will be included with the specific options selected when generating the Image Builder.

For instance, for TP-Link 1043ND v4 and searching in file:

make info > AllTargets.txt 
...
tl-wr1043nd-v1:
    TP-LINK TL-WR1043N/ND v1
    Packages: kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
tl-wr1043nd-v2:
    TP-LINK TL-WR1043N/ND v2
    Packages: kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
tl-wr1043nd-v3:
    TP-LINK TL-WR1043N/ND v3
    Packages: kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
tl-wr1043nd-v4:
    TP-LINK TL-WR1043N/ND v4
    Packages: kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport

So, the exact target is 'tl-wr1043nd-v4' and the extra packages (same as defined in -3) are "kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport".

Now, Searching in .targetinfo for the "Source Makefile" (which should be target/linux/ar71xx):

Source-Makefile: target/linux/ar71xx/Makefile
Target: ar71xx
Target-Board: ar71xx
...
@@
Default-Packages: base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd odhcp6c kmod-gpio-button-hotplug swconfig kmod-ath9k wpad-mini uboot-envtools iwinfo
Target: ar71xx/generic
Target-Board: ar71xx
Target-Name: Generic
....
@@
Default-Packages: base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd odhcp6c kmod-gpio-button-hotplug swconfig kmod-ath9k wpad-mini uboot-envtools iwinfo
Target-Profile: Default
Target-Profile-Priority: 1
Target-Profile-Name: Default Profile (all drivers)
Target-Profile-Packages: kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport 
Target-Profile-Description:
    Default package set compatible with most boards.
@@

And the included packages would be:

base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd odhcp6c kmod-gpio-button-hotplug swconfig kmod-ath9k wpad-mini uboot-envtools iwinfo kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport

Any other desired package should be added to PACKAGES. Let's suppose we want to include 'luci' and the 'nano' editor, add a 'custom' part to our image name and use some config files under 'myConfigFiles' directory, the build command would be something like:

make -j4 image \
PROFILE=tl-wr1043nd-v4 \
EXTRA_IMAGE_NAME="custom" \
FILES=myConfigFiles/  \
PACKAGES="luci nano"

Hope this helps others to use the Image Builder, which is very fast and convenient to generate multiple builds.

1 Like