[OpenWrt-Devel,RFC,2/5] ubinize-image: Change the rootfs to a static volume
diff mbox

Message ID 1418397665-28828-3-git-send-email-maxime.ripard@free-electrons.com
State RFC
Headers show

Commit Message

Maxime Ripard Dec. 12, 2014, 3:21 p.m. UTC
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.ripard@free-electrons.com>
 scripts/ubinize-image.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff mbox

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"
 		echo "vol_size=1MiB"
+	if [ "$name" = "rootfs" ]; then
+		echo "vol_type=static"
+	else
+		echo "vol_type=dynamic"
+	fi
 	if [ "$autoresize" ]; then
 		echo "vol_flags=autoresize"