[OpenWrt Wiki] Extroot configuration
openwrt.org › docs › guide-userNov 28, 2021 · # Create swap file dd if = / dev / zero of = / overlay / swap bs =1M count = 100 mkswap / overlay / swap # Enable swap file uci -q delete fstab.swap uci set fstab.swap= "swap" uci set fstab.swap.device= "/overlay/swap" uci commit fstab / etc / init.d / fstab boot # Verify swap status cat / proc / swaps
[OpenWrt Wiki] The OpenWrt Flash Layout
openwrt.org › docs › techrefThe combination of OverlayFS with SquashFS and JFFS2 has been the default OpenWrt setup since the beginning, and it works flawlessly on “raw NOR flash”. “Raw NAND flash” in typical routers is generally larger (32 MiB – 256 MiB) and not error-free, i.e. it may contain bad erase blocks.
[OpenWrt Wiki] Saving firmware space and RAM
openwrt.org › docs › guide-userIncrease block size from the default 256 KB to improve compression Block size must be a power of 2, between 4096 bytes and 1 Megabyte. By default, 3 blocks will be cached so this will also make the router use more RAM (if 3 blocks are cached, and a block size of 1024 KB is used, this will use 2,304 KB more RAM (3 * 1024 KB - 3 * 256 KB)).