All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Expose active mmc boot partition to scripts
@ 2020-09-01 22:01 Reuben Dowle
  2020-09-02  0:40 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Reuben Dowle @ 2020-09-01 22:01 UTC (permalink / raw)
  To: u-boot

This patch allows uboot scripts make choices about where to boot from based on 
the active mmc boot partition. This allows having two copies of kernel, 
filesystems etc, and choosing which to boot from based off the active 
bootloader partition.

Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
---
 cmd/mmc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/cmd/mmc.c b/cmd/mmc.c
index 1529a3e..88de0c4 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -784,6 +784,8 @@ static int mmc_partconf_print(struct mmc *mmc)
 	ack = EXT_CSD_EXTRACT_BOOT_ACK(mmc->part_config);
 	part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config);
 
+	env_set_hex("activepart", part);
+
 	printf("EXT_CSD[179], PARTITION_CONFIG:\n"
 		"BOOT_ACK: 0x%x\n"
 		"BOOT_PARTITION_ENABLE: 0x%x\n"
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] Expose active mmc boot partition to scripts
  2020-09-01 22:01 [PATCH] Expose active mmc boot partition to scripts Reuben Dowle
@ 2020-09-02  0:40 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2020-09-02  0:40 UTC (permalink / raw)
  To: u-boot

On Tue, Sep 01, 2020 at 10:01:18PM +0000, Reuben Dowle wrote:

> This patch allows uboot scripts make choices about where to boot from based on 
> the active mmc boot partition. This allows having two copies of kernel, 
> filesystems etc, and choosing which to boot from based off the active 
> bootloader partition.
> 
> Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
> ---
>  cmd/mmc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/cmd/mmc.c b/cmd/mmc.c
> index 1529a3e..88de0c4 100644
> --- a/cmd/mmc.c
> +++ b/cmd/mmc.c
> @@ -784,6 +784,8 @@ static int mmc_partconf_print(struct mmc *mmc)
>  	ack = EXT_CSD_EXTRACT_BOOT_ACK(mmc->part_config);
>  	part = EXT_CSD_EXTRACT_BOOT_PART(mmc->part_config);
>  
> +	env_set_hex("activepart", part);
> +
>  	printf("EXT_CSD[179], PARTITION_CONFIG:\n"
>  		"BOOT_ACK: 0x%x\n"
>  		"BOOT_PARTITION_ENABLE: 0x%x\n"

Rather than hard-code a variable here I would like to see this work like
similar commands that take the variable to place the value in to as an
argument, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200901/15d3ea6c/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-02  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 22:01 [PATCH] Expose active mmc boot partition to scripts Reuben Dowle
2020-09-02  0:40 ` Tom Rini

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.