We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Omega 2S+ Image Size

  • Hi all, we are creating a custom image for the Omega 2S+. When adding packages, if the image is greater than 16MB the binary is not generated and an ERROR message is shown.

    However, when looking for the 'firmware' partition (mtd3), its size is almost 32MB. We wonder why we are not able to compile images bigger than 16MB which would fit into the Omega flash 'firmware' partition.

    Best regards,

  • administrators

    @matiaslao what method are you using to create the custom image?
    Please also share the error message you're seeing.

  • @Lazar-Demin thanks for your response.

    I'm building the image following the instructions from the readme in https://github.com/OnionIoT/source repository. In my case I'm using a PC running Ubuntu 18.04 as my Build System.

    Please find below the error message shown. It first shows a warning message and then if fails when trying to copy the image from build_dir to bin.

    WARNING: Image file /home/lyrtron-dev/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin is too big
    cp /home/lyrtron-dev/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin /home/lyrtron-dev/onion/source/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin
    cp: cannot stat '/home/lyrtron-dev/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin': No such file or directory
    Makefile:288: recipe for target '/home/lyrtron-dev/onion/source/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin' failed
    make[5]: [/home/lyrtron-dev/onion/source/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin] Error 1 (ignored)

    Best regards,

  • @matiaslao You need to remove some items from your build, there is often a lot of stuff installed by default that you don't need. Depending on your purposes you may remove stuff like sound, I remove Python, perhaps there are other items you don't need.

  • administrators

    Agree with @crispyoz, this line in the warning message spells it out: WARNING: Image file /home/lyrtron-dev/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin is too big

  • @Lazar-Demin thanks for your response, as well as @crispyoz.

    I understand that the warning message spells it out and that is what triggered my original question. When compiling the image (removing some custom files), I get a binary whose size is 14.5 MB.

    If I include some custom files into the firmware image, as described in OnionIot source repository readme, I get the warning message and the binary is not generated. Please note that the size for the custom files added is less than 2 MB.

    The 'firmware' partition for the Onion Omega2S is ~31.2 MB. This is the reason why I'm asking if it is possible to build an image whose size greater than ~16 MB (and smaller than 31.2 MB).

    Best regards,

  • @matiaslao Do you have an Omega2S+ or an Omega2S? If you have 32mb flash then it means you have a 2S+, so when build your firmware ensure you select Omega2S+ then your image can be up to 32MB

  • Hi @crispyoz. It's an Omega2S+.

    In the OpenWRT configuration, I've selected Multiple Devices in the Target Profile menu and then Onion Omega2 Pro in the Target Devices menu. BTW, if we select Onion Omega2 Pro in the Target Profile menu, image was not being built correctly.

    Best regards,

  • administrators

    @matiaslao Ah looks like there's a typo in the Omega2 Pro device tree specification file. That's why the build system thinks only 16MB are available.

    We'll look into fixing that and will let you know!

  • Awesome, thank you @Lazar-Demin! I'll be waiting for your updated status so I can give it a try.

    Best regards,

  • administrators

    @matiaslao the fix has been added to https://github.com/OnionIoT/source (and firmware v0.3.4 b258 has been released with this fix).

    If you're working on with a local copy of the https://github.com/OnionIoT/source repo, you will need to do a pull to get the DTS changes.

    If you've been compiling with this build system already, you'll also need to remove the tmp directory for the DTS changes to take effect (if I remember correctly)

    Let me know how it goes!

  • Hi @Lazar-Demin, I've cloned the repo to start from scratch and make sure the latest commit was being used from https://github.com/OnionIoT/source (and also for the new DTS to take effect).
    I'm still observing the same issue. Please let me know if there is any extra infromation I can provide you. I'm including below the output for the make command, where the error is raised.

    Image Name:   MIPS OpenWrt Linux-4.14.81
    Created:      Thu Feb 15 20:37:21 2024
    Image Type:   MIPS Linux Kernel Image (lzma compressed)
    Data Size:    1617556 Bytes = 1579.64 KiB = 1.54 MiB
    Load Address: 80000000
    Entry Point:  80000000
    mv /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/omega2pro-kernel.bin.new /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/omega2pro-kernel.bin
    [ -f /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/omega2pro-kernel.bin -a -f /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/root.squashfs ]
    dd if=/home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/omega2pro-kernel.bin >> /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin
    3159+1 records in
    3159+1 records out
    1617620 bytes (1.6 MB, 1.5 MiB) copied, 0.0263151 s, 61.5 MB/s
    dd if=/home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/root.squashfs >> /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin
    31685+1 records in
    31685+1 records out
    16222728 bytes (16 MB, 15 MiB) copied, 0.25631 s, 63.3 MB/s
    /home/user/onion/source/staging_dir/host/bin/padjffs2 /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin  4 8 16 64 128 256
    padding image to 01104000
    padding image to 01110000
    padding image to 01120000
    padding image to 01140000
    echo '{  "supported_devices":["omega2pro"], "version": { "dist": "OpenWrt", "version": "18.06.1", "revision": "r7501-928cad900f", "board": "ramips" } }' | fwtool -I - /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin
    WARNING: Image file /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin is too big
    cp /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin /home/user/onion/source/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin
    cp: cannot stat '/home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin': No such file or directory

    Best regards,

  • @matiaslao Please post each step you are using to build your firmware so we duplicate your issue.

  • Hi @crispyoz, I'm including below the steps followed to setup the build system and compile it. I started from scratch to make sure that the changes pushed by @Lazar-Demin were included in the build system.

    Note: I'm using a Linux System and not the Docker image.

    • create an onion folder, navigate into it and download the build system from github.
      mkdir onion
      cd onion
      git clone https://github.com/OnionIoT/source.git -b openwrt-18.06
      cd source
    • setup the onion feeds.
      sh scripts/onion-feed-setup.sh
      python scripts/onion-setup-build.py
    • update the image configuration. If I manually chose the packages and target (among other options), I run make menuconfig. However, I usually use an already generated .config file, which has a diff format.
      cp CustomConfig /home/user/onion/source/.config
      cd /home/user/onion/source
      make defconfig
    • finally, the image is built by running make -j4. If any error is raised, I re run the command with the following syntax to get more information about the error: make -j1 V=s

    These bullets summarize the steps followed to build the image. Let me know if there is any way I can share with you the config file.

    BTW, when selecting both the Omega2 Pro and the Omega2+ as the Target Devices, binary for Omega2+ is generated but not for the Omega2 Pro. As for the Omega2+, the binary size is 18 MB, and as for the Omega2 Pro, I get the warning message that the image is too big.

    Best regards,

  • @matiaslao You can paste the CustomConfig to https://paste.mozilla.org/

  • @crispyoz please find the CustomConfig in the following link. https://paste.mozilla.org/qrMwjsZR

    Best regards,

  • @matiaslao I built your firmware from scratch using your config file and it completed fine. Have you checked the updated is in place? It's in source/target/linux/ramips/dts/OMEGA2PRO.dts

  • @crispyoz good to know that it worked for you.

    I've checked the source/target/linux/ramips/dts/OMEGA2PRO.dts and it includes the latest modification pushed by @Lazar-Demin to the source repo.

    #include "OMEGA2.dtsi"
    / {
            model = "Onion Omega2 Pro";
            memory@0 {
                    device_type = "memory";
                    reg = <0x0 0x8000000>;
            new-leds {
                    compatible = "gpio-leds";
                    wifi {
                            label = "omega2pro:blue:wifi";
                            gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
    &firmware {
            reg = <0x50000 0x1f30000>;
    &system_led {
            label = "omega2pro:amber:system";
            gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
    &pinctrl {
            state_default: pinctrl0 {
                    uart2 {
                            ralink,group = "uart2";
                            ralink,function = "gpio";

    BTW, I'm sharing with you the content from source/bin/targets/ramips/mt76x8 directory. Does the Omega2+ image build has the same size than the one you built?

    user@ML-PC:~/onion/source/bin/targets/ramips/mt76x8$ ls -lh
    total 58M
     -rw-r--r-- 1 user user  12K Feb 22 10:45 config.seed
     -rw-r--r-- 1 user user  18M Feb 22 11:17 openwrt-ramips-mt76x8-omega2p-squashfs-sysupgrade.bin
     -rw-r--r-- 1 user user 7.3K Feb 22 11:17 openwrt-ramips-mt76x8.manifest
     -rw-r--r-- 1 user user  41M Feb 22 11:15 openwrt-toolchain-ramips-mt76x8_gcc-7.3.0_musl.Linux-x86_64.tar.bz2
     drwxr-xr-x 1 user user  512 Feb 22 11:18 packages
     -rw-r--r-- 1 user user  429 Feb 22 11:18 sha256sums

    Thanks for the support being provided.

    Best regards,

  • @matiaslao I think I have managed to duplicate your problem, it's not generating the openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin firmware. No error but I only have the issue when using your config. Don't have a lot of time right now but but will try to nail down the cause.

  • @crispyoz thanks for the update. You're correct. The make command does not return an error. However, after it finishes running openwrt-ramips-mt76x8-omega2p-squashfs-sysupgrade.bin is generated but not openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin.
    When looking into the make command output, the messages shown below are the only reference to the Omega2Pro image.

    WARNING: Image file /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin is too big
    cp /home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin /home/user/onion/source/bin/targets/ramips/mt76x8/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin
    cp: cannot stat '/home/user/onion/source/build_dir/target-mipsel_24kc_musl/linux-ramips_mt76x8/tmp/openwrt-ramips-mt76x8-omega2pro-squashfs-sysupgrade.bin': No such file or directory

    Please let me know if you have any new finding.

    Thanks in advance,

Looks like your connection to Community was lost, please wait while we try to reconnect.