[PATCH v5] arm: boards: phytec-som-am335x: Update boot scripts

Sascha Hauer s.hauer at pengutronix.de
Sun Jun 25 23:35:54 PDT 2017


On Tue, Jun 20, 2017 at 05:42:22PM +0200, Daniel Schultz wrote:
> Expand the boot scripts with EMMC and add a default file source for
> expansions.
> 
> Removed "rw" and "rootwait" bootargs from existing boot scripts.

Why is "rootwait" removed? From my experience adding "rootwait" is
pretty essential when booting from mmc. Has that changed?

>  
> -if [ $bootsource = mmc ]; then
> -	global.boot.default="mmc nand spi net"
> +if [ -e /dev/mmc1.0 ]; then
> +	nvmem="emmc"
> +else
> +	nvmem="nand"
> +fi
> +
> +if [ $bootsource = mmc -a $bootsource_instance = 1 ]; then
> +	global.boot.default="emmc mmc spi net"
> +elif [ $bootsource = mmc -a $bootsource_instance = 0 ]; then
> +	global.boot.default="mmc $nvmem spi net"
>  elif [ $bootsource = nand ]; then
>  	global.boot.default="nand spi mmc net"
>  elif [ $bootsource = spi ]; then
> -	global.boot.default="spi nand mmc net"
> +	global.boot.default="spi $nvmem mmc net"
>  elif [ $bootsource = net ]; then
> -	global.boot.default="net nand spi mmc"
> +	global.boot.default="net $nvmem spi mmc"
>  fi

Normally the desired behaviour is that the bootsource can be changed
persistently by setting nv.boot.default to the desired source. This
does not work when global.boot.default gets overwritten after the nvvars
have been read from the environment.

This behaviour is not changed with this patch, but I would welcome a
patch that changes this script to the desired behaviour. This could
be done by changing global.boot.default only when nv.boot.default is
empty.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list