Skip to content

hi3520dv200: enable CONFIG_OVERLAYFS_FS (mirror hi3516cv100)#2096

Merged
widgetii merged 1 commit into
masterfrom
hi3520dv200-enable-overlayfs
May 14, 2026
Merged

hi3520dv200: enable CONFIG_OVERLAYFS_FS (mirror hi3516cv100)#2096
widgetii merged 1 commit into
masterfrom
hi3520dv200-enable-overlayfs

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

Why

On a freshly-flashed hi3520dv200, `general/overlay/init` exits at the `grep -q overlay /proc/filesystems || exit 1` check because Linux 3.0.8 ships with no overlayfs. The rootfs stays squashfs-read-only, `/var/lib` and `/etc` are not writable, and every init script that calls `fw_printenv` (rcS, S40network, S98wireguard, /etc/profile, udhcpc default.script, …) prints:

```
Cannot parse config file '/etc/fw_env.config': No such file or directory
```

hi3516cv100 (same Linux 3.0.x kernel vintage) doesn't have this problem because its branch carries the overlayfs-v11 backport and the matching `CONFIG_OVERLAYFS_FS=y` flag.

With OpenIPC/linux#40 merged and this flag flipped:

  • `/proc/filesystems` now lists `overlayfs` -> `/init` proceeds past the gate.
  • The jffs2 `rootfs_data` partition is mounted at `/overlay`, then overlay-mounted over `/` via pivot_root.
  • `/var/lib/seedrng` becomes writable (confirmed in QEMU: `Saving 2048 bits of creditable seed for next boot` instead of `Read-only file system`).

Test plan

  • Cherry-pick OpenIPC/linux@a55ffb8c73 onto `hisilicon-hi3520dv200` -> merged as hi3520dv200: backport overlayfs v11 (mirror hi3516cv100) linux#40.
  • `make BOARD=hi3520dv200_lite br-linux-dirclean && make BOARD=hi3520dv200_lite br-linux` -> `fs/overlayfs/*.o` built into the 3.0.8 kernel, `CONFIG_OVERLAYFS_FS=y` retained in `.config`.
  • Boot resulting `uImage` in QEMU against a fresh hi3520dv200 flash dump (`qemu-hisilicon` / `run-hi3520dv200-flash.sh`) -> seedrng now writes successfully, confirming overlay mount.
  • Test on real hi3520dv200 hardware.

Known limitation

A second, unrelated source of `Cannot parse config file '/etc/fw_env.config'` spam remains on factory-raw flash: the OpenIPC `fw_env` patch (`0011-env-partition-autosearch.patch`) locates the env partition by CRC-scanning each MTD, which fails when the env partition is still erased (all `0xFF`). That affects every SoC, not just hi3520dv200, and is out of scope for this PR.

Without overlayfs the rootfs stays squashfs read-only after /init's
overlay check fails, /var/lib and /etc cannot be written, and
fw_printenv spams "Cannot parse config file '/etc/fw_env.config'"
from every init script that consults the U-Boot env.  hi3516cv100
(same Linux 3.0.x base) ships the overlayfs-v11 backport and this
flag enabled.

Pairs with OpenIPC/linux#40 which cherry-picks the v11 backport onto
the hisilicon-hi3520dv200 kernel branch (already merged).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@widgetii widgetii force-pushed the hi3520dv200-enable-overlayfs branch from 81a9fe1 to 836da7c Compare May 13, 2026 19:42
@widgetii widgetii merged commit c64f924 into master May 14, 2026
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant