[OpenWrt-Devel] [PATCH 2/4] ubinize-image: Change the rootfs to a static volume

Daniel Golle daniel at makrotopia.org
Sun Oct 26 18:37:18 EDT 2014


Hi Maxime,

On Thu, Oct 09, 2014 at 05:59:27PM +0200, Maxime Ripard wrote:
> 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 at 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

This will break things if rootfs is a read-write UBIFS volume which should
by dynamic. I also saw weird things happening when trying to access static
volumes in U-Boot and thus avoided them for now.
Please also consider that ubootenv* and kernel could be static volumes as
well, however, that needs to be tested with a more recent U-Boot (I hope
it'll work).


>  	if [ "$autoresize" ]; then
>  		echo "vol_flags=autoresize"
>  	fi
> -- 
> 2.1.1
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel at lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list