On boards with large page size, the rootfs we generate might end up using less
PEB than the minimum number required by UBI for a dynamic volume.

Change the rootfs to a static volume, which removes such a requirement, and
isn't changing anything, since our rootfs is in read only anyway.

Signed-off-by: Maxime Ripard <maxime.rip...@free-electrons.com>
---
 scripts/ubinize-image.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/ubinize-image.sh b/scripts/ubinize-image.sh
index 6762c22bc4a6..11c25ecc8ee1 100755
--- a/scripts/ubinize-image.sh
+++ b/scripts/ubinize-image.sh
@@ -25,13 +25,17 @@ ubivol() {
        echo "[$name]"
        echo "mode=ubi"
        echo "vol_id=$volid"
-       echo "vol_type=dynamic"
        echo "vol_name=$name"
        if [ "$image" ]; then
                echo "image=$image"
        else
                echo "vol_size=1MiB"
        fi
+       if [ "$name" = "rootfs" ]; then
+               echo "vol_type=static"
+       else
+               echo "vol_type=dynamic"
+       fi
        if [ "$autoresize" ]; then
                echo "vol_flags=autoresize"
        fi
-- 
2.1.1
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to