I recently build a firmware using this fork for my Vizio XWR100. The final squashfs-xx.bin is less than the flash size (8 MB). But after flashing it from the original firmware's upgrade page, I found out that all of the writeable space is mounted in RAM, and I can't save any of my settings. After building a firmware with only basic packages and then tried a prebuild image from here, I've come to the conclusion that the issue is not related to how I make the image or the fork where the source codes are from.
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 4.3M 4.3M 0 100% /rom
tmpfs 13.5M 536.0K 13.0M 4% /tmp
tmpfs 13.5M 72.0K 13.4M 1% /tmp/root
overlayfs:/tmp/root 13.5M 72.0K 13.4M 1% /
tmpfs 512.0K 0 512.0K 0% /dev
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00030000 00010000 "uboot"
mtd1: 00010000 00010000 "env"
mtd2: 00160000 00010000 "linux"
mtd3: 00600000 00010000 "rootfs"
mtd4: 001c0000 00010000 "rootfs_data"
mtd5: 00010000 00010000 "nvram"
mtd6: 00010000 00010000 "factory"
mtd7: 00020000 00010000 "language"
mtd8: 00010000 00010000 "caldata"
mtd9: 00770000 00010000 "firmware"
root@OpenWrt:~# dmesg
[ 0.000000] Linux version 4.9.120 (ubuntu@ip-172-31-42-178) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7258-5eb055306f) ) #0 Thu Aug 16 07:51:15 2018
[ 0.000000] MyLoader: sysp=aaaa5554, boardp=aaaa5554, parts=aaaa5554
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[ 0.000000] SoC: Atheros AR7161 rev 2
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 @ 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[ 0.000000] On node 0 totalpages: 8192
[ 0.000000] free_area_init_node: node 0, pgdat 804663f4, node_mem_map 81000020
[ 0.000000] Normal zone: 64 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 8192 pages, LIFO batch:0
[ 0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 8128
[ 0.000000] Kernel command line: board=XWR100 console=ttyS0,115200 rootfstype=squashfs noinitrd
[ 0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[ 0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] Memory: 27408K/32768K available (3158K kernel code, 169K rwdata, 796K rodata, 284K init, 213K bss, 5360K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS:51
[ 0.000000] Clocks: CPU:680.000MHz, DDR:340.000MHz, AHB:170.000MHz, Ref:40.000MHz
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5621354254 ns
[ 0.000009] sched_clock: 32 bits at 340MHz, resolution 2ns, wraps every 6316128254ns
[ 0.007820] Calibrating delay loop... 452.19 BogoMIPS (lpj=2260992)
[ 0.070524] pid_max: default: 32768 minimum: 301
[ 0.075248] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.081857] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.091693] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.101575] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.108262] NET: Registered protocol family 16
[ 0.114228] MIPS: machine is Vizio XWR100
[ 2.573943] random: fast init done
[ 2.796663] registering PCI controller with io_map_base unset
[ 2.816608] PCI host bridge to bus 0000:00
[ 2.820722] pci_bus 0000:00: root bus resource [mem 0x10000000-0x16ffffff]
[ 2.827643] pci_bus 0000:00: root bus resource [io 0x0000]
[ 2.833205] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 2.839984] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 2.847933] pci 0000:00:11.0: [168c:ff1d] type 00 class 0x020000
[ 2.847942] pci 0000:00:11.0: fixup device configuration
[ 2.854970] pci 0000:00:11.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[ 2.855026] pci 0000:00:11.0: PME# supported from D0 D3hot
[ 2.855216] pci 0000:00:12.0: [168c:ff1d] type 00 class 0x020000
[ 2.855224] pci 0000:00:12.0: fixup device configuration
[ 2.861739] pci 0000:00:12.0: reg 0x10: [mem 0x00000000-0x0000ffff]
[ 2.861784] pci 0000:00:12.0: PME# supported from D0 D3hot
[ 2.861963] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[ 2.861993] pci 0000:00:11.0: BAR 0: assigned [mem 0x10000000-0x1000ffff]
[ 2.868804] pci 0000:00:12.0: BAR 0: assigned [mem 0x10010000-0x1001ffff]
[ 2.875594] pci 0000:00:11.0: using irq 40 for pin 1
[ 2.880562] pci 0000:00:12.0: using irq 41 for pin 1
[ 2.886206] clocksource: Switched to clocksource MIPS
[ 2.892343] NET: Registered protocol family 2
[ 2.897540] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[ 2.904512] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[ 2.910930] TCP: Hash tables configured (established 1024 bind 1024)
[ 2.917400] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 2.923254] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 2.929810] NET: Registered protocol family 1
[ 2.934207] PCI: CLS 0 bytes, default 32
[ 2.939323] Crashlog allocated RAM at address 0x1f00000
[ 2.945716] workingset: timestamp_bits=30 max_order=13 bucket_order=0
[ 2.958812] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 2.964632] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 2.984123] io scheduler noop registered
[ 2.988107] io scheduler deadline registered (default)
[ 2.993552] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[ 3.000339] console [ttyS0] disabled
[ 3.023983] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 10625000) is a 16550A
[ 3.032698] console [ttyS0] enabled
[ 3.039666] bootconsole [early0] disabled
[ 3.051317] m25p80 spi0.0: found w25x64, expected m25p80
[ 3.065897] m25p80 spi0.0: w25x64 (8192 Kbytes)
[ 3.070779] Creating 9 MTD partitions on "spi0.0":
[ 3.075594] 0x000000000000-0x000000030000 : "uboot"
[ 3.082568] 0x000000030000-0x000000040000 : "env"
[ 3.089448] 0x000000040000-0x0000001a0000 : "linux"
[ 3.096495] 0x0000001b0000-0x0000007b0000 : "rootfs"
[ 3.103038] mtd: device 3 (rootfs) set to be root filesystem
[ 3.108815] 1 squashfs-split partitions found on MTD device rootfs
[ 3.114988] 0x0000005f0000-0x0000007b0000 : "rootfs_data"
[ 3.122604] 0x0000007b0000-0x0000007c0000 : "nvram"
[ 3.129691] 0x0000007c0000-0x0000007d0000 : "factory"
[ 3.136920] 0x0000007d0000-0x0000007f0000 : "language"
[ 3.144201] 0x0000007f0000-0x000000800000 : "caldata"
[ 3.151450] 0x000000040000-0x0000007b0000 : "firmware"
[ 3.159832] libphy: Fixed MDIO Bus: probed
[ 3.175178] switch0: Atheros AR8236 rev. 1 switch registered on ag71xx-mdio.0
[ 3.196388] libphy: ag71xx_mdio: probed
[ 3.538192] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII
[ 3.877551] ag71xx ag71xx.1: connected to PHY at ag71xx-mdio.0:04 [uid=004dd043, driver=Atheros AR8216/AR8236/AR8316]
[ 3.888878] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RMII
[ 3.896562] NET: Registered protocol family 10
[ 3.904830] NET: Registered protocol family 17
[ 3.909502] 8021q: 802.1Q VLAN Support v1.8
[ 3.919432] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[ 3.928330] Freeing unused kernel memory: 284K
[ 3.932767] This architecture does not have kernel memory protection.
[ 4.645254] init: Console is alive
[ 4.648988] init: - watchdog -
[ 5.751285] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 5.929601] usbcore: registered new interface driver usbfs
[ 5.935156] usbcore: registered new interface driver hub
[ 5.940628] usbcore: registered new device driver usb
[ 5.951705] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 5.960031] ehci-platform: EHCI generic platform driver
[ 5.965335] ehci-platform ehci-platform: EHCI Host Controller
[ 5.971174] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[ 5.979263] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[ 6.006244] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[ 6.013405] hub 1-0:1.0: USB hub found
[ 6.017629] hub 1-0:1.0: 2 ports detected
[ 6.022596] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 6.040346] init: - preinit -
[ 6.827370] ar71xx: pll_reg 0xb8050010: 0x1099
[ 6.827392] eth0: link up (100Mbps/Full duplex)
[ 6.853347] random: procd: uninitialized urandom read (4 bytes read)
[ 10.106743] mount_root: no usable overlay filesystem found, using tmpfs overlay
[ 10.147542] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 10.340784] eth0: link down
[ 10.355177] procd: - early -
[ 10.358967] procd: - watchdog -
[ 10.976347] procd: - watchdog -
[ 10.979774] procd: - ubus -
[ 11.069927] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.165811] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.172702] random: ubusd: uninitialized urandom read (4 bytes read)
[ 11.179969] procd: - init -
[ 11.583871] kmodloader: loading kernel modules from /etc/modules.d/*
[ 11.604166] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 11.620046] Netfilter messages via NETLINK v0.30.
[ 11.627797] ip_set: protocol 6
[ 11.668370] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[ 11.676429] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[ 11.686705] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 11.702411] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[ 11.711608] ctnetlink v0.93: registering with nfnetlink.
[ 11.786072] xt_time: kernel timezone is -0000
[ 11.852518] PPP generic driver version 2.4.2
[ 11.859502] NET: Registered protocol family 24
[ 11.901329] PCI: Enabling device 0000:00:11.0 (0000 -> 0002)
[ 11.911936] ath: phy0: Ignoring endianness difference in EEPROM magic bytes.
[ 11.920539] ath: EEPROM regdomain: 0x37
[ 11.920543] ath: EEPROM indicates we should expect a direct regpair map
[ 11.920550] ath: Country alpha2 being used: AW
[ 11.920553] ath: Regpair used: 0x37
[ 11.933079] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[ 11.937662] ieee80211 phy0: Atheros AR9287 Rev:2 mem=0xb0000000, irq=40
[ 12.032901] PCI: Enabling device 0000:00:12.0 (0000 -> 0002)
[ 12.043510] ath: phy1: Ignoring endianness difference in EEPROM magic bytes.
[ 12.052133] ath: EEPROM regdomain: 0x13
[ 12.052138] ath: EEPROM indicates we should expect a direct regpair map
[ 12.052153] ath: Country alpha2 being used: 00
[ 12.052156] ath: Regpair used: 0x13
[ 12.067962] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 12.072473] ieee80211 phy1: Atheros AR9280 Rev:2 mem=0xb0010000, irq=41
[ 12.136167] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 13.382599] urandom_read: 5 callbacks suppressed
[ 13.382608] random: jshn: uninitialized urandom read (4 bytes read)
[ 25.872535] ar71xx: pll_reg 0xb8050010: 0x1099
[ 25.872580] eth0: link up (100Mbps/Full duplex)
[ 25.877289] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 25.936301] br-lan: port 1(eth0.1) entered blocking state
[ 25.941711] br-lan: port 1(eth0.1) entered disabled state
[ 25.947552] device eth0.1 entered promiscuous mode
[ 25.952338] device eth0 entered promiscuous mode
[ 26.052323] br-lan: port 1(eth0.1) entered blocking state
[ 26.057793] br-lan: port 1(eth0.1) entered forwarding state
[ 26.063543] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[ 26.169019] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[ 26.916328] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 26.923112] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[ 27.486736] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x697c instead
[ 27.536272] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0xc8fe instead
[ 27.545752] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xfafe instead
[ 27.636259] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x6ffc instead
[ 27.645736] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0xcd1f instead
[ 27.719176] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0xcced instead
[ 27.773378] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0xde46 instead
[ 27.816260] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0xbffc instead
[ 27.825735] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0xffe9 instead
[ 27.881925] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0xfcfe instead
[ 27.891468] jffs2: Further such events for this erase block will not be printed
[ 27.935946] jffs2: Empty flash at 0x00000a2c ends at 0x00000a30
[ 27.980617] jffs2: Empty flash at 0x00002a2c ends at 0x00002a30
[ 28.007746] jffs2: Empty flash at 0x00003720 ends at 0x00003724
[ 28.015599] jffs2: Empty flash at 0x00003a2c ends at 0x00003a30
[ 28.068461] jffs2: Empty flash at 0x00004a2c ends at 0x00004a30
[ 28.096296] jffs2: Empty flash at 0x00005a2c ends at 0x00005a30
[ 28.104389] jffs2: Empty flash at 0x00006a2c ends at 0x00006a30
[ 28.132477] jffs2: Empty flash at 0x00008a2c ends at 0x00008a30
[ 28.172849] jffs2: Empty flash at 0x0000ba2c ends at 0x0000ba30
...
[ 38.855084] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b0000: 0xffdd instead
[ 38.864798] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b0004: 0xff5b instead
[ 38.874434] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b0008: 0x7fe7 instead
[ 38.884090] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b000c: 0xfaff instead
[ 38.893735] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b0010: 0xfffa instead
[ 38.903389] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b0014: 0xf3fb instead
[ 38.913050] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b0018: 0x3ff7 instead
[ 38.922720] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b001c: 0xfeff instead
[ 38.932365] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b0020: 0x2fde instead
[ 38.942015] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x001b0024: 0x9bbb instead
[ 38.951513] jffs2: Further such events for this erase block will not be printed
[ 38.993398] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[ 39.001846] jffs2: empty_blocks 0, bad_blocks 0, c->nr_blocks 28
So does anyone know how to fix this?