A way to force build of factory image even if too big

Hello all,

Question is in the title, I'm looking for a way to force the image builder to output the *-factory.bin even if it is too big. Will be flashed via u-boot TFTP.

Also, where are the maximum sizes for images declared ? I can't find anything appart from the SPI flash memory map in the .dts file. (real target is a MT7688 with 128MiB ram and 32MiB flash).

My final objective is to create a custom board and boot from an SD card.

Hello new member,

take a look into the following file and you will find your answer...

Greets and happy porting your custom device.

Hi ! Thanks, that was quick.

So the hlk-7628 is not actually making a factory.bin ?

I tried to modify the mk file like this:

define Device/hilink_hlk-7628n
  MTK_SOC := mt7628an
  IMAGE_SIZE := 32448k
## added these lines
  IMAGE += factory.bin
  IMAGE/factory.bin := \
        $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 92.122
TARGET_DEVICES += hilink_hlk-7628n

Still no factory image. I'm confused here. :confused:

Do you checked the build log for missing options...
Don't know what jgc-header requires...

The author of the commit for you modified device suggest a installation through tftp and this does not need a installation over the vendor web gui or something else...

Why do you need a factory bin?
Easy installation?
Please describe your goal more clearly...

Yeah, I'm designing a board so I would prefer first to be able to flash the firmware directly from uboot to quickly test different device tree and drivers.

I think you don't need a factory image for your purpose...
A factory image is mostly a wrapped sysupgrade image with additional headers or something else to match the requirements of a specific board / device vendor.

Why do you think you need a factory image?

Do you mean I could directly flash the ROM with a sysupgrade image ?


Take al look here...

The sysupgrade image does contain at first the kernel, then the rootfs and at the end some meta data.

For example, if you have the sysupgrade at address 0x8000000 you will boot it from there with bootm 0x80000000.
Note this is only a example!!!

Hi @juppin

I'm using your solution since two days. Works like a charm. Thank you a lot.