All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/3] sunxi: add "fel" boot target
Date: Wed, 16 Sep 2015 04:04:54 +0300	[thread overview]
Message-ID: <20150916040454.74394d6d@i7> (raw)
In-Reply-To: <1442236530-24382-4-git-send-email-bernhard.nortmann@web.de>

On Mon, 14 Sep 2015 15:15:30 +0200
Bernhard Nortmann <bernhard.nortmann@web.de> wrote:

> This patch makes use of the previous changes to add a new "fel" boot
> target for sunxi boards.
> 
> When booting via FEL, it's often desirable to work around the absence
> of other (usable) boot devices - or to be able to override them,
> deviating from the standard boot sequence. To achieve this, the "fel"
> boot target gets the highest priority, but won't actually do anything
> unless certain criteria are met.
> 
> The "bootcmd_fel" implementation proposed here first tests if an actual
> FEL boot takes place (using the "fel_booted" env var), and secondly
> checks that "fel_scriptaddr" was set (originating from the 'loader',
> i.e. the sunxi-tools fel utility). If both checks pass, then it will
> try to execute the boot script (boot.scr) at the given address. In case
> of an error (e.g. an invalid image), the source command might return
> "false", causing "distro_bootcmd" to proceed with the next boot target.
> 
> Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
> 
> ---
> 
> Changes in v2:
> - renamed fel_data_addr to fel_scriptaddr
> - combined both tests into one as suggested by Hans de Goede
> 
>  include/configs/sunxi-common.h | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 48cc4ed..889146b 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -423,7 +423,18 @@ extern int soft_i2c_gpio_scl;
>  #define BOOT_TARGET_DEVICES_USB(func)
>  #endif
>  
> +/* FEL boot support, auto-execute boot.scr if a script address was provided */
> +#define BOOTENV_DEV_FEL(devtypeu, devtypel, instance) \
> +	"bootcmd_fel=" \
> +		"if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then " \
> +			"echo '(FEL boot)'; " \
> +			"source ${fel_scriptaddr}; " \
> +		"fi\0"
> +#define BOOTENV_DEV_NAME_FEL(devtypeu, devtypel, instance) \
> +	"fel "
> +
>  #define BOOT_TARGET_DEVICES(func) \
> +	func(FEL, fel, na) \
>  	BOOT_TARGET_DEVICES_MMC(func) \
>  	BOOT_TARGET_DEVICES_SCSI(func) \
>  	BOOT_TARGET_DEVICES_USB(func) \

Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>

-- 
Best regards,
Siarhei Siamashka

  reply	other threads:[~2015-09-16  1:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-14 13:15 [U-Boot] [PATCH v2 0/3] sunxi: support FEL-provided environment vars and "fel" boot target Bernhard Nortmann
2015-09-14 13:15 ` [U-Boot] [PATCH v2 1/3] sunxi: (mksunxiboot) signature to indicate "sunxi" SPL variant Bernhard Nortmann
2015-09-16  1:03   ` Siarhei Siamashka
2015-09-14 13:15 ` [U-Boot] [PATCH v2 2/3] sunxi: retrieve FEL-provided values to environment variables Bernhard Nortmann
2015-09-16  1:00   ` Siarhei Siamashka
2015-09-17 14:05     ` Bernhard Nortmann
2015-09-14 13:15 ` [U-Boot] [PATCH v2 3/3] sunxi: add "fel" boot target Bernhard Nortmann
2015-09-16  1:04   ` Siarhei Siamashka [this message]
2015-09-14 14:12 ` [U-Boot] [PATCH v2 0/3] sunxi: support FEL-provided environment vars and " Hans de Goede
2015-09-16  1:34   ` Siarhei Siamashka

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=20150916040454.74394d6d@i7 \
    --to=siarhei.siamashka@gmail.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.