WARNING: Image file /builder/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-24.10.0-a372683279f4-ramips-mt7621-hiwifi_hc5962-squashfs-factory.bin is too big: 35389440 > 33554432
cp: cannot stat '/builder/build_dir/target-mipsel_24kc_musl/linux-ramips_mt7621/tmp/openwrt-24.10.0-a372683279f4-ramips-mt7621-hiwifi_hc5962-squashfs-factory.bin': No such file or directory
An error occurred when compiling firmware for HC5962
@minisind - If you are building locally on your computer, this is not the right thread... would you like me to move your post to a new thread so that it can get the right audience?
just used : Customize installed packages and/or first boot script online
Ok... understood.
This is the problem:
You've tried to add too much to the image. It will not fit in the flash memory of your device. Remove some packages and try again.
No, it's a bug.
Flash MB:
128NAND
https://openwrt.org/toh/hwdata/hiwifi_gee/hiwifi_gee_hc5962
I've moved this to a new thread since what you are experiencing is not the same as the problems from the original thread.
I'm not so sure about that... It could be, but consider this thread about the WRT1200AC (different device, but also 128MB flash).
If your device has a dual-partitioned layout (common in newer devices to make them nearly impossible to brick -- the currently booted partition will flash an image to the other partition and then switch the boot loader to boot from that newly flashed partition. If this new partition doesn't boot properly, the system will fall back to the known good partition).
So, if your device does have two partitions, you are down to 128MB / 2 = 64MB. And then there are other pats of the partitioning tables that will further reduce the usable/available size.
Does that make sense?
It's an old device. The company that originally produced and designed it has closed down due to some financial problems. It only has one partition layout model.
Is it running OpenWrt currently?
Let's see the current mounted partitions:
df -h
mount
And you can find out more:
https://openwrt.org/docs/techref/flash.layout
[ 2.522710] 7 fixed-partitions partitions found on MTD device mt7621-nand
[ 2.529478] Creating 7 MTD partitions on "mt7621-nand":
[ 2.534682] 0x000000000000-0x000000080000 : "u-boot"
[ 2.540761] 0x000000080000-0x000000100000 : "debug"
[ 2.546717] 0x000000100000-0x000000140000 : "factory"
[ 2.552778] 0x000000140000-0x000000540000 : "kernel"
[ 2.558808] 0x000000540000-0x0000021c0000 : "ubiconcat0"
[ 2.565234] 0x0000021c0000-0x000002240000 : "bdinfo"
[ 2.571277] 0x000002240000-0x000007f80000 : "ubiconcat1"
[ 2.578387] Concatenating MTD devices:
[ 2.582130] (0): "ubiconcat0"
[ 2.585074] (1): "ubiconcat1"
[ 2.588067] into device "ubi-concat"
[ 2.591659] 1 fixed-partitions partitions found on MTD device ubi-concat
[ 2.598341] Creating 1 MTD partitions on "ubi-concat":
[ 2.603459] 0x000000000000-0x0000079c0000 : "ubi"
Boot and Recovery Environment for Embedded Devices
Copyright (C) 2022 HackPascal hackpascal@gmail.com
Build date 2022-07-24 [git-46ae2a1]
Version 1.2 (r1416)
DRAM: 256MB
Platform: MediaTek MT7621A ver 1, eco 3
Board: HiWiFi HC5962 (B70)
Clocks: CPU: 880MHz, DDR: 1200MHz, Bus: 220MHz, Ref: 40MHz
NAND: Factory BBT found at 0x07fe0000
NAND: Scanning for bad blocks
Flash: ESMT NAND 3.3V 8-bit (128MB) on mt7621-nfc
Environment variables @ 00060000 on flash bank 0, size 00020000
rt2880-eth: MAC address from EEPROM is invalid, using default settings.
rt2880-eth: Using MAC address 00:0c:43:00:00:01
eth0: MediaTek MT7530 Gigabit switch
Network started on eth0, inet addr 192.168.1.1, netmask 255.255.255.0
Press any key to interrupt autoboot ... 0
Image Name: MIPS OpenWrt Linux-5.4.241
Image Type: Linux Kernel MIPS32 (LZMA compressed)
Data Size: 2572642 Bytes (0x274162)
Load Address: 80001000
Entry Point: 80001000
Uncompressing LZMA ... done.
Flushing cache ... done.
Starting kernel at 0x80001000...
[ 0.000000] Linux version 5.4.241 (fdh@fdh-MS-7C94) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r5776-13c63d62d)) #0 SMP Mon Apr 24 07:02:41 2023
[ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[ 0.000000] MIPS: machine is HiWiFi HC5962
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] VPE topology {2,2} total 4
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] percpu: Embedded 14 pages/cpu s26640 r8192 d22512 u57344
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
[ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Writing ErrCtl register=00008240
[ 0.000000] Readback ErrCtl register=00008240
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 250024K/262144K available (6223K kernel code, 271K rwdata, 1308K rodata, 1272K init, 235K bss, 12120K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] NR_IRQS: 256
[ 0.000000] CPU Clock: 1100MHz
[ 0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xfdb1960d81, max_idle_ns: 440795240157 ns
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 3475018995 ns
[ 0.000007] sched_clock: 32 bits at 550MHz, resolution 1ns, wraps every 3904515583ns
[ 0.007851] Calibrating delay loop... 732.36 BogoMIPS (lpj=3661824)
[ 0.074040] pid_max: default: 32768 minimum: 301
[ 0.078796] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.085992] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.096240] rcu: Hierarchical SRCU implementation.
This partition is just shy of 32MB:
I suspect that this is where OpenWrt is flashing the image.
This one is >90MB:
Let's see what df -h
shows? Does the 90MB partition get mounted as the overlay?
[root@Kwrt:01:50 ~] # df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 13.3M 13.3M 0 100% /rom
tmpfs 121.3M 308.0K 121.0M 0% /tmp
/dev/ubi0_1 92.2M 180.0K 87.3M 0% /overlay
overlayfs:/overlay 92.2M 180.0K 87.3M 0% /
tmpfs 512.0K 0 512.0K 0% /dev
[root@Kwrt:01:50 ~] #
yup... overlay is 92MB
ROM (where the squashfs image is stored) is 13MB.
This suggests that the maximum image size is a bit less than 32MB as we saw earlier from the first UBI partition.
So, keep your image size less than 32MB and then You can install whatever other packages you need in the overlay (I.e. post flash).