mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Andreas Pretzsch <apr@cn-eng.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH] rauc: select on-target tools depending on bootloader
Date: Fri, 31 May 2019 19:18:07 +0200	[thread overview]
Message-ID: <9e30a398527d800b20029be5c0a803020d33c84a.camel@cn-eng.de> (raw)
In-Reply-To: <1559322118-9072-1-git-send-email-apr@cn-eng.de>

On Fri, 2019-05-31 at 19:01 +0200, Andreas Pretzsch wrote:
> RAUC relies on tools on the target to interact with the bootloader.
> As the bootloader selection is not part of ptxconfig, but
> platformconfig,
> have the user select the bootloader used on the target.

Had this on a new system (DistroKit based) using barebox, where dt-
utils was not selected. Therefore, no barebox-state present on the
target. RAUC relies on it to interact with barebox, so it should be
automatically selected.

Also the standard way (select DT_UTILS if BAREBOX) did not trigger,
presumably as PTXCONF_BAREBOX is part of platformconfig, not ptxconfig.
So I introduced a choice. Or is there any way to achieve this using
simple if-conditions ?


> Based on this choice, auto-select the appropriate packages:
>   barebox: dt-utils (barebox-state)

Well, this works.

>   U-Boot: u-boot-tools (fw_printenv, fw_setenv)

I suppose this is sufficient, but didn't check. @PTX: please verify.


>   GRUB: none (grub-editenv already part of GRUB package)

I suppose this true, but didn't check. @PTX: please verify.


>   EFI: efibootmgr (efibootmgr)

I suppose this make sense, but didn't check. @PTX: please verify.


Any sense to also add a "none", like rauc supports it (via 'noop') ?
What about a default, now 'barebox' is implicit default. Suggestions ?


Anything to look into for host-rauc ?
Target will most likely only have one type of bootloader, host tool
might be used for several different targets.

Or do you see any use in not making this a choice, but allow to select
multiple bootloaders (here: for auto-dependencies on target, but maybe
in future, those config options be used for other things, too) ?


> Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>

Feel free to adapt patch by your own discretion.
Of course, I can always also send in a V2.


> ---
>  rules/rauc.in | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/rules/rauc.in b/rules/rauc.in
> index 213a1211e..62977a0cb 100644
> --- a/rules/rauc.in
> +++ b/rules/rauc.in
> @@ -7,6 +7,9 @@ menuconfig RAUC
>  	select GLIB
>  	select GLIB_LIBMOUNT
>  	select HOST_GLIB
> +	select DT_UTILS		if RAUC_BAREBOX
> +	select U_BOOT_TOOLS	if RAUC_U_BOOT
> +	select EFIBOOTMGR	if RAUC_EFI
>  	select BUSYBOX_FEATURE_TAR_LONG_OPTIONS	if BUSYBOX_TAR
>  	select BUSYBOX_FEATURE_TAR_AUTODETECT 	if BUSYBOX_TAR
>  	select BUSYBOX_FEATURE_SEAMLESS_XZ 		if
> BUSYBOX_TAR
> @@ -19,6 +22,18 @@ menuconfig RAUC
>  
>  if RAUC
>  
> +choice
> +	prompt "Bootloader used on target"
> +	config RAUC_BAREBOX
> +		bool "barebox"
> +	config RAUC_U_BOOT
> +		bool "U-Boot "
> +	config RAUC_GRUB
> +		bool "GRUB   "
> +	config RAUC_EFI
> +		bool "EFI    "
> +endchoice
> +
>  config RAUC_SERVICE
>  	bool
>  	prompt "Enable service (D-Bus) support"

-- 

carpe noctem engineering
Ingenieurbuero fuer Hard- & Software-Entwicklung Andreas Pretzsch
Dipl.-Ing. (FH) Andreas Pretzsch        Tel. +49-(0)7307-936088-1
Lange Strasse 28a                       Fax: +49-(0)7307-936088-9
89250 Senden, Germany                   email: apr@cn-eng.de


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2019-05-31 17:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 17:01 Andreas Pretzsch
2019-05-31 17:18 ` Andreas Pretzsch [this message]
2019-05-31 18:10 ` Michael Olbrich
2019-07-01 16:57 ` [ptxdist] [PATCH v2] " Andreas Pretzsch

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=9e30a398527d800b20029be5c0a803020d33c84a.camel@cn-eng.de \
    --to=apr@cn-eng.de \
    --cc=ptxdist@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