mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Daniel Schultz <d.schultz@phytec.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v5] arm: boards: phytec-som-am335x: Update boot scripts
Date: Tue, 27 Jun 2017 11:45:44 +0200	[thread overview]
Message-ID: <6876fb2d-ab61-087f-22a8-b4431d09328e@phytec.de> (raw)
In-Reply-To: <20170626063554.kskmccgsdzwtusew@pengutronix.de>

Hi Sascha,

Am 26.06.2017 um 08:35 schrieb Sascha Hauer:
> 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?
> 
Ah that's a good point! We add these commands in Yocto, but I forgot the 
use case without Yocto. So I will add a nv/linux.bootargs.rootfs file 
with "rootwait ro fsck.repair=yes" (fsck.repair is a systemd unit).

>>   
>> -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.
> 

This is already implemented by a test above these changes, isn't it?

snippet from init/bootsource:
   1 #!/bin/sh 

   2 

   3 if [ -n "$nv.boot.default" ]; then 

   4         exit 

   5 fi 

   6 

   7 if [ -e /dev/mmc1.0 ]; then
   ...

> Sascha
> 

-- 
Mit freundlichen Grüßen,
With best regards,
   Daniel Schultz

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-06-27  9:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-20 15:42 Daniel Schultz
2017-06-26  6:35 ` Sascha Hauer
2017-06-27  9:45   ` Daniel Schultz [this message]
2017-06-27 14:36     ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6876fb2d-ab61-087f-22a8-b4431d09328e@phytec.de \
    --to=d.schultz@phytec.de \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox