How to edit system flash size in build for zyxel nbg6817

The Zyxel NBG6817 has ~4gb of built in flash mem built in however only 64mb is currently defaulted for the rootfs partition. I have followed this post (Zyxel Armor Z2 (NBG6817) - 3GB extroot on 19.07) and successfully mounted the remaining ~2.8gb-3.2gb of flash mem to the overlay. However the issue is that when you do a sysupgrade- this gets wiped and you have to remount & reboot the router.

I would like to edit my openwrt build to allow for the majority of this unused flash mem to be allocated to rootfs upon flashing openwrt without the need to mount the usused space to overlay

There was a comment on that thread about "I discussed it with @slh and he pointed out that for most people those 60MiB of storage would be enough to install packages, and only few people would benefit the increased storage"

well I am one of those people whom would benefit from using the extra flash mem and that is precisely why I purchased the nbg6817- to gain access to this greater flash mem.

I have seen posts about increasing the flash mem size for rootfs by editing the DTS file- however I cannot find the equivalant of the partition json obj in the zyxel nbg6817 dts file.

Zyxel nbg6817 dts file? :

I have also seen config options that allow you to increase the rootfs in the openwrt only for x86, such as

but the nbg6817 does not have this option in make menuconfig like x86 does... and when I attempted to add this to the .config - it didn't work.

There is also the makefile for the nbg6817 where I think I could in theory add options for the build but I havent seen enough documentation that gives me a serious hope it would work. What would I add here if this is all that is needed:

Also I would imagine that I can use the memory locations of the partitions to mount as described in the eMMC section of the device page- I just dont know how to edit that in the build configuration:[]=zyxel&s[]=nbg6817
Example: gdisk -l /dev/mmcblk0 will give the memory locations (start & end) of each mmcblk0 partition

Any help would be greatly appreciated. Honestly this zyxel nbg6817 in the build config make menuconfig should have and advanced option to build to use the majority of the unused flash mem.

1 Like