ImageBuilder for FritzBox 4040 fails


I am trying to build a custom image with 18.06.2 for the FritzBox 4040. Unfortunately, the "make image PROFILE=avm_fritzbox-4040 PACKAGES=..." fails with "Cannot install package u-boot-fritz4040." Somewhere above this line it says "Unknown package 'u-boot-fritz4040'." I guess that this actually isn't a real "package", but I couldn't figure out how this Makefile is supposed to work.

Thank you!

Thank you for reporting this. Yes, this is a mistake on my part, I failed to backport the fixed from -snapshot:

ipq40xx: copy Fritz4040 UBoot to STAGING_DIR_IMAGE

This has now been "fixed" and I added it to the openwrt-18.06 branch. However this will take until the next release (18.06.3) until it will work out-of-the-box.

In the mean time, you can still make it work with 18.06.2. But you have to do some shimming to make it all work:

  • unpack openwrt-imagebuilder-18.06.2-ipq40xx.Linux-x86_64.tar.xz
    (and go into the extracted openwrt-imagebuilder-18.06.2-ipq40xx.Linux-x86_64 directory, alternatively you can try to run make clean on your existing directory )

  • Edit the .targetinfo file in the root directory.

    • Look for this line
      Target-Profile-Packages: fritz-tffs fritz-caldata u-boot-fritz4040
      and replace it with
      Target-Profile-Packages: fritz-tffs fritz-caldata
  • edit target/linux/ipq40xx/image/Makefile

    • Look for this line
      UBOOT_PATH := $$(BIN_DIR)/u-boot-fritz4040/uboot-fritz4040.bin
      and replace it with
      UBOOT_PATH := uboot-fritz4040.bin
      (Make sure to keep the leading "tab" in front of UBOOT_PATH just the way it was)
  • download the uboot-fritz4040.bin from

    and place it into the target/linux/ipq40xx/image/ directory (EDITED!).

  • (repack the openwrt-imagebuilder-18.06.2-ipq40xx.Linux-x86_64.tar.xz if you need it for later)

And now you should be able to run your "make image PROFILE=avm_fritzbox-4040 PACKAGES=..."

Thank you very much. That almost worked, except that at first it couldn't find uboot-fritz4040.bin. I have no idea where it was looking for it; instead I left the line as is in the Makefile and instead copied the uboot-fritz4040.bin to bin/targets/ipq40xx/generic/u-boot-fritz4040/, and that worked.
That is, it produced an image. I will see tomorrow if that actually works... :wink:

1 Like

Thanks, that should have been "target/linux/ipq40xx/image/", I'll edit the comment above.

Yes, it should work in a pinch. That said "make clean" will delete it there I think.

1 Like