The binwalk
utility can provide some insight as to how large the overlay file system is. It's no guarantee that it won't brick your unit, but at least a bit of insight into if the flashed ROM will likely have enough storage to support configuration and operation.
Here's an example that I have running on my Archer C7:
$ binwalk out/OpenWrt-2018-09-05_2218-0700-ath79-generic/targets/ath79/generic/OpenWrt-2018-09-05_2218-0700-ath79-generic-tplink_archer-c7-v2-squashfs-sysupgrade.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
512 0x200 LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 5034275 bytes
1587612 0x18399C Squashfs filesystem, little endian, version 4.0, compression:xz, size: 10097010 bytes, 1319 inodes, blocksize: 262144 bytes, created: 2018-09-02 18:58:29
size: 10097010 bytes -- About 10 MB for the ROM file system on this Archer C7 (16 MB flash)
and the output of df
on the running device
jeff@office:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 9984 9984 0 100% /rom
tmpfs 62248 420 61828 1% /tmp
/dev/mtdblock4 4736 860 3876 18% /overlay
overlayfs:/overlay 4736 860 3876 18% /
tmpfs 512 0 512 0% /dev
You'll typically want at least three "erase blocks" in your overlay filesystem for it to be usable.