* Re: [PATCH 1/2] config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd
@ 2024-11-27 15:29 Pascal Zimmermann
0 siblings, 0 replies; 3+ messages in thread
From: Pascal Zimmermann @ 2024-11-27 15:29 UTC (permalink / raw)
To: Simon Glass; +Cc: u-boot@lists.denx.de, Tom Rini
Hello Simon,
On Wed, 27 Nov 2024 at 14:08, Simon Glass <sjg@chromium.org> wrote:
>
> Hi Pascal,
>
> On Wed, 27 Nov 2024 at 03:30, Pascal Zimmermann <pzimmermann@dh-
> electronics.com> wrote:
> >
> > Make it possible to substitute the 'part list' command inside
> > 'scan_dev_for_boot_part' with a custom board specific implementation.
> >
> > For this the new define 'SCAN_DEV_FOR_BOOT_PARTS' is introduced.
> >
> > Signed-off-by: Pascal Zimmermann <pzimmermann@dh-electronics.com>
> > ---
> > Cc: Tom Rini <trini@konsulko.com>
> > Cc: Simon Glass <sjg@chromium.org>
> > Cc: u-boot@lists.denx.de
> > ---
> > include/config_distro_bootcmd.h | 7 ++++++-
> > 1 file changed, 6 insertions(+), 1 deletion(-)
>
> Have you looked at converting the board to standard boot?
We are at internal discussion about the switch to standard boot
for our boards, but this will take some time.
>
> >
> > diff --git a/include/config_distro_bootcmd.h
> > b/include/config_distro_bootcmd.h index 0a4e4b8ff8..df0dc8cfde 100644
> > --- a/include/config_distro_bootcmd.h
> > +++ b/include/config_distro_bootcmd.h
> > @@ -194,6 +194,11 @@
> > #define SCAN_DEV_FOR_EFI
> > #endif
> >
> > +#ifndef SCAN_DEV_FOR_BOOT_PARTS
> > +#define SCAN_DEV_FOR_BOOT_PARTS \
> > + "part list ${devtype} ${devnum} -bootable devplist; "
> > +#endif
> > +
> > #ifdef CONFIG_SATA
> > #define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata)
> > #define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV
> > @@ -538,7 +543,7 @@
> > "\0" \
> > \
> > "scan_dev_for_boot_part=" \
> > - "part list ${devtype} ${devnum} -bootable devplist; " \
> > + SCAN_DEV_FOR_BOOT_PARTS \
> > "env exists devplist || setenv devplist 1; " \
> > "for distro_bootpart in ${devplist}; do " \
> > "if fstype ${devtype} " \
> > --
> > 2.30.2
> >
>
> Regards,
> Simon
Best regards,
Pascal
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 0/2] ARM: stm32: env: Enable scan and start for AB schema on STM32MP15 DHSOM
@ 2024-11-27 10:29 Pascal Zimmermann
2024-11-27 10:29 ` [PATCH 1/2] config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd Pascal Zimmermann
0 siblings, 1 reply; 3+ messages in thread
From: Pascal Zimmermann @ 2024-11-27 10:29 UTC (permalink / raw)
To: u-boot
Cc: Pascal Zimmermann, Marek Vasut, Patrick Delaunay, Patrice Chotard,
Tom Rini, Simon Glass, u-boot, uboot-stm32
For the STM32MP15 DHSOM, change the default environment so an AB schema
on a device can be detected.
The first patch makes possible to substitute the 'part list' command
inside 'scan_dev_for_boot_part' with a custom board specific
implementation.
The second patch uses the change of the first patch to plug the board
specific code for booting from AB into the standard boot of all boot
targets at the STM32MP15 DHSOM.
The detection works by looking for the partitions with specific lables.
The name of those partitions are in the variables and its defaults:
* dh_ab_partname_primary=rootfs-a
* dh_ab_partname_secondary=rootfs-b
To prevent being hanging at bootcmd, enable "CONFIG_BOOT_RETRY" and
"CONFIG_RESET_TO_RETRY", but the timer will only be activated, if the AB
partitions are detected.
Pascal Zimmermann (2):
config_distro_bootcmd: make possible to substitute 'part list' in
distro_bootcmd
ARM: stm32: env: Enable scan and start for AB schema on STM32MP15
DHSOM
configs/stm32mp15_dhsom.config | 3 +++
include/config_distro_bootcmd.h | 7 +++++-
include/configs/stm32mp15_dh_dhsom.h | 33 ++++++++++++++++++++++++++++
3 files changed, 42 insertions(+), 1 deletion(-)
Signed-off-by: Pascal Zimmermann <pzimmermann@dh-electronics.com>
---
Cc: Marek Vasut <marex@denx.de>
Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
Cc: Patrice Chotard <patrice.chotard@foss.st.com>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: u-boot@dh-electronics.com
Cc: uboot-stm32@st-md-mailman.stormreply.com
Cc: u-boot@lists.denx.de
--
2.30.2
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH 1/2] config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd
2024-11-27 10:29 [PATCH 0/2] ARM: stm32: env: Enable scan and start for AB schema on STM32MP15 DHSOM Pascal Zimmermann
@ 2024-11-27 10:29 ` Pascal Zimmermann
2024-11-27 13:07 ` Simon Glass
0 siblings, 1 reply; 3+ messages in thread
From: Pascal Zimmermann @ 2024-11-27 10:29 UTC (permalink / raw)
To: u-boot; +Cc: Pascal Zimmermann, Tom Rini, Simon Glass
Make it possible to substitute the 'part list' command inside
'scan_dev_for_boot_part' with a custom board specific implementation.
For this the new define 'SCAN_DEV_FOR_BOOT_PARTS' is introduced.
Signed-off-by: Pascal Zimmermann <pzimmermann@dh-electronics.com>
---
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: u-boot@lists.denx.de
---
include/config_distro_bootcmd.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index 0a4e4b8ff8..df0dc8cfde 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -194,6 +194,11 @@
#define SCAN_DEV_FOR_EFI
#endif
+#ifndef SCAN_DEV_FOR_BOOT_PARTS
+#define SCAN_DEV_FOR_BOOT_PARTS \
+ "part list ${devtype} ${devnum} -bootable devplist; "
+#endif
+
#ifdef CONFIG_SATA
#define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata)
#define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV
@@ -538,7 +543,7 @@
"\0" \
\
"scan_dev_for_boot_part=" \
- "part list ${devtype} ${devnum} -bootable devplist; " \
+ SCAN_DEV_FOR_BOOT_PARTS \
"env exists devplist || setenv devplist 1; " \
"for distro_bootpart in ${devplist}; do " \
"if fstype ${devtype} " \
--
2.30.2
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH 1/2] config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd
2024-11-27 10:29 ` [PATCH 1/2] config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd Pascal Zimmermann
@ 2024-11-27 13:07 ` Simon Glass
0 siblings, 0 replies; 3+ messages in thread
From: Simon Glass @ 2024-11-27 13:07 UTC (permalink / raw)
To: Pascal Zimmermann; +Cc: u-boot, Tom Rini
Hi Pascal,
On Wed, 27 Nov 2024 at 03:30, Pascal Zimmermann
<pzimmermann@dh-electronics.com> wrote:
>
> Make it possible to substitute the 'part list' command inside
> 'scan_dev_for_boot_part' with a custom board specific implementation.
>
> For this the new define 'SCAN_DEV_FOR_BOOT_PARTS' is introduced.
>
> Signed-off-by: Pascal Zimmermann <pzimmermann@dh-electronics.com>
> ---
> Cc: Tom Rini <trini@konsulko.com>
> Cc: Simon Glass <sjg@chromium.org>
> Cc: u-boot@lists.denx.de
> ---
> include/config_distro_bootcmd.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
Have you looked at converting the board to standard boot?
>
> diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
> index 0a4e4b8ff8..df0dc8cfde 100644
> --- a/include/config_distro_bootcmd.h
> +++ b/include/config_distro_bootcmd.h
> @@ -194,6 +194,11 @@
> #define SCAN_DEV_FOR_EFI
> #endif
>
> +#ifndef SCAN_DEV_FOR_BOOT_PARTS
> +#define SCAN_DEV_FOR_BOOT_PARTS \
> + "part list ${devtype} ${devnum} -bootable devplist; "
> +#endif
> +
> #ifdef CONFIG_SATA
> #define BOOTENV_SHARED_SATA BOOTENV_SHARED_BLKDEV(sata)
> #define BOOTENV_DEV_SATA BOOTENV_DEV_BLKDEV
> @@ -538,7 +543,7 @@
> "\0" \
> \
> "scan_dev_for_boot_part=" \
> - "part list ${devtype} ${devnum} -bootable devplist; " \
> + SCAN_DEV_FOR_BOOT_PARTS \
> "env exists devplist || setenv devplist 1; " \
> "for distro_bootpart in ${devplist}; do " \
> "if fstype ${devtype} " \
> --
> 2.30.2
>
Regards,
Simon
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-27 17:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-27 15:29 [PATCH 1/2] config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd Pascal Zimmermann
-- strict thread matches above, loose matches on Subject: below --
2024-11-27 10:29 [PATCH 0/2] ARM: stm32: env: Enable scan and start for AB schema on STM32MP15 DHSOM Pascal Zimmermann
2024-11-27 10:29 ` [PATCH 1/2] config_distro_bootcmd: make possible to substitute 'part list' in distro_bootcmd Pascal Zimmermann
2024-11-27 13:07 ` Simon Glass
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox