[PATCH 12/13] defaultenv: support kernel and oftree on a filesystem

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Aug 20 11:00:47 EDT 2012


On 16:20 Mon 20 Aug     , Jan Luebbe wrote:
> The path specified by kernel/oftree_path must be mounted
> aready (either via automount or by the board code).
please use defaultenv-2

Best Regards,
J.
> 
> Signed-off-by: Jan Luebbe <jlu at pengutronix.de>
> ---
>  defaultenv/bin/boot |   18 ++++++++++++++++--
>  1 file changed, 16 insertions(+), 2 deletions(-)
> 
> diff --git a/defaultenv/bin/boot b/defaultenv/bin/boot
> index bf6ec76..81593bd 100644
> --- a/defaultenv/bin/boot
> +++ b/defaultenv/bin/boot
> @@ -129,7 +129,14 @@ elif [ x$kernel_loc = xnand ]; then
>  	fi
>  	kdev="/dev/nand0.${kernel_mtd_nand}.bb"
>  elif [ x$kernel_loc = xdisk ]; then
> -	kdev="/dev/$kernel_part"
> +	if [ -n $kernel_path ]; then
> +		kdev="$kernel_path"
> +	elif [ -n $kernel_part ]; then
> +		kdev="/dev/$kernel_part"
> +	else
> +		echo "error: set either kernel_path or kernel_part"
> +		exit 1
> +	fi
>  else
>  	echo "error: set kernel_loc to one of 'tftp', 'nfs', 'nand', 'nor' or 'disk'"
>  	exit 1
> @@ -145,7 +152,14 @@ elif [ x$oftree_loc = xnor ]; then
>  elif [ x$oftree_loc = xnand ]; then
>  	odev="/dev/nand0.oftree.bb"
>  elif [ x$oftree_loc = xdisk ]; then
> -	odev="/dev/$oftree_part"
> +	if [ -n $oftree_path ]; then
> +		odev="$oftree_path"
> +	elif [ -n $oftree_part ]; then
> +		odev="/dev/$oftree_part"
> +	else
> +		echo "error: set either oftree_path or oftree_part"
> +		exit 1
> +	fi
>  fi
>  
>  [ x$odev = x ] || bootm_opt="$bootm_opt -o $odev"
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> barebox mailing list
> barebox at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox



More information about the barebox mailing list