All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] omap34xx: SPL: enable MMC raw boot with u-boot.img
@ 2019-11-10  0:48 Denis 'GNUtoo' Carikli
  2020-01-07 16:56 ` Denis 'GNUtoo' Carikli
  2020-01-20  7:47 ` [U-Boot] " Lokesh Vutla
  0 siblings, 2 replies; 3+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2019-11-10  0:48 UTC (permalink / raw)
  To: u-boot

The following commit enabled raw SPL booting:
  22d90d560a omap3: Use raw SPL by default for mmc1
but it was reverted by the following commit:
  821c89d38c Revert "omap3: Use raw SPL by default for mmc1"
because SPL is unable to distinguish between RAW images and
garbage.

However if CONFIG_SPL_RAW_IMAGE_SUPPORT is disabled, SPL does
identify if there is a valid image with spl_parse_image_header.

With this change, and CONFIG_SPL_RAW_IMAGE_SUPPORT disabled,
raw MMC boot will be tried first, and if it fails, it FS will
be tried.

The two scenarios have been tested on a BeagleBoard XM Revision C1.

Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
 arch/arm/mach-omap2/boot-common.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
index 734fa9d9e6..a48244e1c5 100644
--- a/arch/arm/mach-omap2/boot-common.c
+++ b/arch/arm/mach-omap2/boot-common.c
@@ -132,8 +132,10 @@ void save_omap_boot_params(void)
 	    (boot_device <= MMC_BOOT_DEVICES_END)) {
 		switch (boot_device) {
 		case BOOT_DEVICE_MMC1:
+#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT
 			boot_mode = MMCSD_MODE_FS;
 			break;
+#endif
 		case BOOT_DEVICE_MMC2:
 			boot_mode = MMCSD_MODE_RAW;
 			break;
-- 
2.24.0

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

* [PATCH] omap34xx: SPL: enable MMC raw boot with u-boot.img
  2019-11-10  0:48 [U-Boot] [PATCH] omap34xx: SPL: enable MMC raw boot with u-boot.img Denis 'GNUtoo' Carikli
@ 2020-01-07 16:56 ` Denis 'GNUtoo' Carikli
  2020-01-20  7:47 ` [U-Boot] " Lokesh Vutla
  1 sibling, 0 replies; 3+ messages in thread
From: Denis 'GNUtoo' Carikli @ 2020-01-07 16:56 UTC (permalink / raw)
  To: u-boot

On Sun, 10 Nov 2019 01:48:17 +0100
Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> wrote:

> The following commit enabled raw SPL booting:
>   22d90d560a omap3: Use raw SPL by default for mmc1
> but it was reverted by the following commit:
>   821c89d38c Revert "omap3: Use raw SPL by default for mmc1"
> because SPL is unable to distinguish between RAW images and
> garbage.
> 
> However if CONFIG_SPL_RAW_IMAGE_SUPPORT is disabled, SPL does
> identify if there is a valid image with spl_parse_image_header.
> 
> With this change, and CONFIG_SPL_RAW_IMAGE_SUPPORT disabled,
> raw MMC boot will be tried first, and if it fails, it FS will
> be tried.
> 
> The two scenarios have been tested on a BeagleBoard XM Revision C1.
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> ---
>  arch/arm/mach-omap2/boot-common.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/boot-common.c
> b/arch/arm/mach-omap2/boot-common.c index 734fa9d9e6..a48244e1c5
> 100644 --- a/arch/arm/mach-omap2/boot-common.c
> +++ b/arch/arm/mach-omap2/boot-common.c
> @@ -132,8 +132,10 @@ void save_omap_boot_params(void)
>  	    (boot_device <= MMC_BOOT_DEVICES_END)) {
>  		switch (boot_device) {
>  		case BOOT_DEVICE_MMC1:
> +#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT
>  			boot_mode = MMCSD_MODE_FS;
>  			break;
> +#endif
>  		case BOOT_DEVICE_MMC2:
>  			boot_mode = MMCSD_MODE_RAW;
>  			break;
Ping.

Denis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200107/85c77086/attachment.sig>

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

* [U-Boot] [PATCH] omap34xx: SPL: enable MMC raw boot with u-boot.img
  2019-11-10  0:48 [U-Boot] [PATCH] omap34xx: SPL: enable MMC raw boot with u-boot.img Denis 'GNUtoo' Carikli
  2020-01-07 16:56 ` Denis 'GNUtoo' Carikli
@ 2020-01-20  7:47 ` Lokesh Vutla
  1 sibling, 0 replies; 3+ messages in thread
From: Lokesh Vutla @ 2020-01-20  7:47 UTC (permalink / raw)
  To: u-boot



On 10/11/19 6:18 AM, Denis 'GNUtoo' Carikli wrote:
> The following commit enabled raw SPL booting:
>   22d90d560a omap3: Use raw SPL by default for mmc1
> but it was reverted by the following commit:
>   821c89d38c Revert "omap3: Use raw SPL by default for mmc1"
> because SPL is unable to distinguish between RAW images and
> garbage.
> 
> However if CONFIG_SPL_RAW_IMAGE_SUPPORT is disabled, SPL does
> identify if there is a valid image with spl_parse_image_header.
> 
> With this change, and CONFIG_SPL_RAW_IMAGE_SUPPORT disabled,
> raw MMC boot will be tried first, and if it fails, it FS will
> be tried.

This means that if FS boot is required then SPL_RAW_IMAGE_SUPPORT should be
disabled. So with this patch applied, the default omap3_defconfig will fail to
boot with FS mode. It is difficult to support this unless ROM passes some
information on the bootmode.

Thanks and regards,
Lokesh

> 
> The two scenarios have been tested on a BeagleBoard XM Revision C1.
> 
> Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
> ---
>  arch/arm/mach-omap2/boot-common.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/arch/arm/mach-omap2/boot-common.c b/arch/arm/mach-omap2/boot-common.c
> index 734fa9d9e6..a48244e1c5 100644
> --- a/arch/arm/mach-omap2/boot-common.c
> +++ b/arch/arm/mach-omap2/boot-common.c
> @@ -132,8 +132,10 @@ void save_omap_boot_params(void)
>  	    (boot_device <= MMC_BOOT_DEVICES_END)) {
>  		switch (boot_device) {
>  		case BOOT_DEVICE_MMC1:
> +#ifdef CONFIG_SPL_RAW_IMAGE_SUPPORT
>  			boot_mode = MMCSD_MODE_FS;
>  			break;
> +#endif
>  		case BOOT_DEVICE_MMC2:
>  			boot_mode = MMCSD_MODE_RAW;
>  			break;
> 

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

end of thread, other threads:[~2020-01-20  7:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-10  0:48 [U-Boot] [PATCH] omap34xx: SPL: enable MMC raw boot with u-boot.img Denis 'GNUtoo' Carikli
2020-01-07 16:56 ` Denis 'GNUtoo' Carikli
2020-01-20  7:47 ` [U-Boot] " Lokesh Vutla

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.