* [ptxdist] [PATCH] rauc: select on-target tools depending on bootloader
@ 2019-05-31 17:01 Andreas Pretzsch
2019-05-31 17:18 ` Andreas Pretzsch
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andreas Pretzsch @ 2019-05-31 17:01 UTC (permalink / raw)
To: ptxdist
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.
Based on this choice, auto-select the appropriate packages:
barebox: dt-utils (barebox-state)
U-Boot: u-boot-tools (fw_printenv, fw_setenv)
GRUB: none (grub-editenv already part of GRUB package)
EFI: efibootmgr (efibootmgr)
Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
---
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"
--
2.19.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [PATCH] rauc: select on-target tools depending on bootloader
2019-05-31 17:01 [ptxdist] [PATCH] rauc: select on-target tools depending on bootloader Andreas Pretzsch
@ 2019-05-31 17:18 ` Andreas Pretzsch
2019-05-31 18:10 ` Michael Olbrich
2019-07-01 16:57 ` [ptxdist] [PATCH v2] " Andreas Pretzsch
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Pretzsch @ 2019-05-31 17:18 UTC (permalink / raw)
To: ptxdist
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [ptxdist] [PATCH] rauc: select on-target tools depending on bootloader
2019-05-31 17:01 [ptxdist] [PATCH] rauc: select on-target tools depending on bootloader Andreas Pretzsch
2019-05-31 17:18 ` Andreas Pretzsch
@ 2019-05-31 18:10 ` Michael Olbrich
2019-07-01 16:57 ` [ptxdist] [PATCH v2] " Andreas Pretzsch
2 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2019-05-31 18:10 UTC (permalink / raw)
To: ptxdist
On Fri, May 31, 2019 at 07:01:58PM +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.
> Based on this choice, auto-select the appropriate packages:
> barebox: dt-utils (barebox-state)
> U-Boot: u-boot-tools (fw_printenv, fw_setenv)
> GRUB: none (grub-editenv already part of GRUB package)
> EFI: efibootmgr (efibootmgr)
>
> Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
> ---
> 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
These are runtime dependencies, so:
select xxx if RAUC_xxxx && RUNTIME
Michael
> 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"
> --
> 2.19.1
>
>
> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
--
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 |
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
* [ptxdist] [PATCH v2] rauc: select on-target tools depending on bootloader
2019-05-31 17:01 [ptxdist] [PATCH] rauc: select on-target tools depending on bootloader Andreas Pretzsch
2019-05-31 17:18 ` Andreas Pretzsch
2019-05-31 18:10 ` Michael Olbrich
@ 2019-07-01 16:57 ` Andreas Pretzsch
2 siblings, 0 replies; 4+ messages in thread
From: Andreas Pretzsch @ 2019-07-01 16:57 UTC (permalink / raw)
To: ptxdist
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.
Based on this, auto-select the appropriate package:
barebox: dt-utils (barebox-state)
U-Boot: u-boot-tools (fw_printenv, fw_setenv)
EFI: efibootmgr (efibootmgr)
Regarding GRUB support, grub-editenv from GRUB2 is required. Currently,
there is no "GRUB2" package in ptxdist, so no active option for it.
Signed-off-by: Andreas Pretzsch <apr@cn-eng.de>
---
Changes v1->v2:
- add "if RUNTIME", as these are runtime dependencies
- reorder down to the other runtime dependencies
- omit RAUC_GRUB (no GRUB2 in ptxdist), but keep as comment
- do not use choice, but single selections
Reason for single selections: Beside possible use cases where no specific
bootloader support at all is desired, symbols might be used later for other
decisions, even with multi-bootloader support.
rules/rauc.in | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/rules/rauc.in b/rules/rauc.in
index 213a1211e..3c5f64b00 100644
--- a/rules/rauc.in
+++ b/rules/rauc.in
@@ -14,6 +14,10 @@ menuconfig RAUC
select JSON_GLIB if RAUC_JSON
select SQUASHFS_TOOLS if RUNTIME
select SQUASHFS_TOOLS_UNSQUASHFS if RUNTIME
+ select DT_UTILS if RUNTIME && RAUC_BAREBOX
+ select U_BOOT_TOOLS if RUNTIME && RAUC_U_BOOT
+ #select GRUB2 if RUNTIME && RAUC_GRUB
+ select EFIBOOTMGR if RUNTIME && RAUC_EFI
help
Robust Auto-Update Controller. RAUC controls the update process on embedded linux systems.
@@ -78,4 +82,29 @@ config RAUC_BUNDLE_VERSION
endif
+config RAUC_BAREBOX
+ bool "barebox support"
+ help
+ To interact with barebox, barebox-state from dt-utils is used.
+ Auto-select this package for installation on the target.
+config RAUC_U_BOOT
+ bool "U-Boot support"
+ help
+ To interact with U-Boot, fw_printenv and fw_setenv from
+ u-boot-tools are used.
+ Auto-select this package for installation on the target.
+# Currently, there is no "GRUB2" package in ptxdist. Even with depends
+# on BROKEN, ptxdist will complain about undefined symbol GRUB2.
+# Still, keep this as reference, to have a complete bootloader list.
+#config RAUC_GRUB
+# bool "GRUB support"
+# help
+# To interact with GRUB2, grub-editenv from grub is used.
+# Auto-select this package for installation on the target.
+config RAUC_EFI
+ bool "EFI support"
+ help
+ To interact with EFI, efibootmgr from efibootmgr is used.
+ Auto-select this package for installation on the target.
+
endif
--
2.19.1
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-01 16:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 17:01 [ptxdist] [PATCH] rauc: select on-target tools depending on bootloader Andreas Pretzsch
2019-05-31 17:18 ` Andreas Pretzsch
2019-05-31 18:10 ` Michael Olbrich
2019-07-01 16:57 ` [ptxdist] [PATCH v2] " Andreas Pretzsch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox