All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v3] ARM: ti: Update layout for MMC and eMMC (env and dfu)
@ 2017-05-24 10:08 Jean-Jacques Hiblot
  2017-05-26 18:18 ` Tom Rini
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jean-Jacques Hiblot @ 2017-05-24 10:08 UTC (permalink / raw)
  To: u-boot

The problems with the current DFU layout are:
MMC: The space allocated for u-boot is too small for the latest u-boot
     (>750KB). We need to increase it. eMMC uses a much bigger area (2MB).
eMMC: region "u-boot.img.raw" overlaps the environment area and the region
      "spl-os-image.raw".
both: region "spl-os-image.raw" is quite small and can't handle android
      kernels

Fixing this requires growing some regions and moving others.
Care has been taken to leave some room for further growth of
"spl-os-args.raw".
Also the "env" now appears in the dfu so that it's apparent that the
region is not free space that can be used to grow "u-boot.img.raw".
The MLO region is 0x100 sectors wide but the 0x100 are unused in case the
MLO comes too overflow this areas.
The total space allocated for those raw binaries is 16MB, of which 13+MB
are reserved for the kernel image.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
---

Changed since v2:
* reduced the size of the MLO area exposed by the DFU to 0x100 (128kB)

changes since v1: 
* increased u-boot size to 2MB
* updated CONFIG_ENV_OFFSET in omap5_uevm.h

 include/configs/dra7xx_evm.h      |  2 +-
 include/configs/omap5_uevm.h      |  2 +-
 include/configs/ti_armv7_common.h |  7 ++++---
 include/environment/ti/dfu.h      | 12 +++++++-----
 4 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 17608a5..71c9d82 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -27,7 +27,7 @@
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */
 #define CONFIG_ENV_SIZE			(128 << 10)
-#define CONFIG_ENV_OFFSET		0xE0000
+#define CONFIG_ENV_OFFSET		0x260000
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 #endif
diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
index d8b0c02..e7fac6d 100644
--- a/include/configs/omap5_uevm.h
+++ b/include/configs/omap5_uevm.h
@@ -37,7 +37,7 @@
 #define CONFIG_ENV_IS_IN_MMC
 #define CONFIG_SYS_MMC_ENV_DEV		1	/* SLOT2: eMMC(1) */
 #define CONFIG_ENV_SIZE			(128 << 10)
-#define CONFIG_ENV_OFFSET		0xE0000
+#define CONFIG_ENV_OFFSET		0x260000
 #define CONFIG_ENV_OFFSET_REDUND	(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 0bd3c9f..6f87b6d 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -207,9 +207,10 @@
 #define CONFIG_SPL_FS_LOAD_ARGS_NAME		"args"
 
 /* RAW SD card / eMMC */
-#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR	0x900	/* address 0x120000 */
-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR	0x80	/* address 0x10000 */
-#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS	0x80	/* 64KiB */
+#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR	0x1700  /* address 0x2E0000 */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR	0x1500  /* address 0x2A0000 */
+#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS	0x200   /* 256KiB */
+
 
 /* spl export command */
 #define CONFIG_CMD_SPL
diff --git a/include/environment/ti/dfu.h b/include/environment/ti/dfu.h
index caf71a3..c9f61a5 100644
--- a/include/environment/ti/dfu.h
+++ b/include/environment/ti/dfu.h
@@ -12,9 +12,10 @@
 	"rootfs part 0 2;" \
 	"MLO fat 0 1;" \
 	"MLO.raw raw 0x100 0x100;" \
-	"u-boot.img.raw raw 0x300 0x400;" \
-	"spl-os-args.raw raw 0x80 0x80;" \
-	"spl-os-image.raw raw 0x900 0x2000;" \
+	"u-boot.img.raw raw 0x300 0x1000;" \
+	"u-env.raw raw 0x1300 0x200;" \
+	"spl-os-args.raw raw 0x1500 0x200;" \
+	"spl-os-image.raw raw 0x1700 0x6900;" \
 	"spl-os-args fat 0 1;" \
 	"spl-os-image fat 0 1;" \
 	"u-boot.img fat 0 1;" \
@@ -28,8 +29,9 @@
 	"MLO fat 1 1;" \
 	"MLO.raw raw 0x100 0x100;" \
 	"u-boot.img.raw raw 0x300 0x1000;" \
-	"spl-os-args.raw raw 0x80 0x80;" \
-	"spl-os-image.raw raw 0x900 0x2000;" \
+	"u-env.raw raw 0x1300 0x200;" \
+	"spl-os-args.raw raw 0x1500 0x200;" \
+	"spl-os-image.raw raw 0x1700 0x6900;" \
 	"spl-os-args fat 1 1;" \
 	"spl-os-image fat 1 1;" \
 	"u-boot.img fat 1 1;" \
-- 
1.9.1

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

* [U-Boot] [PATCH v3] ARM: ti: Update layout for MMC and eMMC (env and dfu)
  2017-05-24 10:08 [U-Boot] [PATCH v3] ARM: ti: Update layout for MMC and eMMC (env and dfu) Jean-Jacques Hiblot
@ 2017-05-26 18:18 ` Tom Rini
  2017-05-29 13:38 ` Sam Protsenko
  2017-06-06  0:22 ` [U-Boot] [U-Boot, " Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-05-26 18:18 UTC (permalink / raw)
  To: u-boot

On Wed, May 24, 2017 at 12:08:27PM +0200, Jean-Jacques Hiblot wrote:

> The problems with the current DFU layout are:
> MMC: The space allocated for u-boot is too small for the latest u-boot
>      (>750KB). We need to increase it. eMMC uses a much bigger area (2MB).
> eMMC: region "u-boot.img.raw" overlaps the environment area and the region
>       "spl-os-image.raw".
> both: region "spl-os-image.raw" is quite small and can't handle android
>       kernels
> 
> Fixing this requires growing some regions and moving others.
> Care has been taken to leave some room for further growth of
> "spl-os-args.raw".
> Also the "env" now appears in the dfu so that it's apparent that the
> region is not free space that can be used to grow "u-boot.img.raw".
> The MLO region is 0x100 sectors wide but the 0x100 are unused in case the
> MLO comes too overflow this areas.
> The total space allocated for those raw binaries is 16MB, of which 13+MB
> are reserved for the kernel image.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170526/815a47de/attachment.sig>

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

* [U-Boot] [PATCH v3] ARM: ti: Update layout for MMC and eMMC (env and dfu)
  2017-05-24 10:08 [U-Boot] [PATCH v3] ARM: ti: Update layout for MMC and eMMC (env and dfu) Jean-Jacques Hiblot
  2017-05-26 18:18 ` Tom Rini
@ 2017-05-29 13:38 ` Sam Protsenko
  2017-06-06  0:22 ` [U-Boot] [U-Boot, " Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Sam Protsenko @ 2017-05-29 13:38 UTC (permalink / raw)
  To: u-boot

On 24 May 2017 at 13:08, Jean-Jacques Hiblot <jjhiblot@ti.com> wrote:
> The problems with the current DFU layout are:
> MMC: The space allocated for u-boot is too small for the latest u-boot
>      (>750KB). We need to increase it. eMMC uses a much bigger area (2MB).
> eMMC: region "u-boot.img.raw" overlaps the environment area and the region
>       "spl-os-image.raw".
> both: region "spl-os-image.raw" is quite small and can't handle android
>       kernels
>
> Fixing this requires growing some regions and moving others.
> Care has been taken to leave some room for further growth of
> "spl-os-args.raw".
> Also the "env" now appears in the dfu so that it's apparent that the
> region is not free space that can be used to grow "u-boot.img.raw".
> The MLO region is 0x100 sectors wide but the 0x100 are unused in case the
> MLO comes too overflow this areas.
> The total space allocated for those raw binaries is 16MB, of which 13+MB
> are reserved for the kernel image.
>
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> ---
>
> Changed since v2:
> * reduced the size of the MLO area exposed by the DFU to 0x100 (128kB)
>
> changes since v1:
> * increased u-boot size to 2MB
> * updated CONFIG_ENV_OFFSET in omap5_uevm.h
>
>  include/configs/dra7xx_evm.h      |  2 +-
>  include/configs/omap5_uevm.h      |  2 +-
>  include/configs/ti_armv7_common.h |  7 ++++---
>  include/environment/ti/dfu.h      | 12 +++++++-----
>  4 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
> index 17608a5..71c9d82 100644
> --- a/include/configs/dra7xx_evm.h
> +++ b/include/configs/dra7xx_evm.h
> @@ -27,7 +27,7 @@
>  #define CONFIG_ENV_IS_IN_MMC
>  #define CONFIG_SYS_MMC_ENV_DEV         1       /* SLOT2: eMMC(1) */
>  #define CONFIG_ENV_SIZE                        (128 << 10)
> -#define CONFIG_ENV_OFFSET              0xE0000
> +#define CONFIG_ENV_OFFSET              0x260000
>  #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
>  #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
>  #endif
> diff --git a/include/configs/omap5_uevm.h b/include/configs/omap5_uevm.h
> index d8b0c02..e7fac6d 100644
> --- a/include/configs/omap5_uevm.h
> +++ b/include/configs/omap5_uevm.h
> @@ -37,7 +37,7 @@
>  #define CONFIG_ENV_IS_IN_MMC
>  #define CONFIG_SYS_MMC_ENV_DEV         1       /* SLOT2: eMMC(1) */
>  #define CONFIG_ENV_SIZE                        (128 << 10)
> -#define CONFIG_ENV_OFFSET              0xE0000
> +#define CONFIG_ENV_OFFSET              0x260000
>  #define CONFIG_ENV_OFFSET_REDUND       (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
>  #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
>
> diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
> index 0bd3c9f..6f87b6d 100644
> --- a/include/configs/ti_armv7_common.h
> +++ b/include/configs/ti_armv7_common.h
> @@ -207,9 +207,10 @@
>  #define CONFIG_SPL_FS_LOAD_ARGS_NAME           "args"
>
>  /* RAW SD card / eMMC */
> -#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR        0x900   /* address 0x120000 */
> -#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR  0x80    /* address 0x10000 */
> -#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x80    /* 64KiB */
> +#define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR        0x1700  /* address 0x2E0000 */
> +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR  0x1500  /* address 0x2A0000 */
> +#define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x200   /* 256KiB */
> +
>
>  /* spl export command */
>  #define CONFIG_CMD_SPL
> diff --git a/include/environment/ti/dfu.h b/include/environment/ti/dfu.h
> index caf71a3..c9f61a5 100644
> --- a/include/environment/ti/dfu.h
> +++ b/include/environment/ti/dfu.h
> @@ -12,9 +12,10 @@
>         "rootfs part 0 2;" \
>         "MLO fat 0 1;" \
>         "MLO.raw raw 0x100 0x100;" \
> -       "u-boot.img.raw raw 0x300 0x400;" \
> -       "spl-os-args.raw raw 0x80 0x80;" \
> -       "spl-os-image.raw raw 0x900 0x2000;" \
> +       "u-boot.img.raw raw 0x300 0x1000;" \
> +       "u-env.raw raw 0x1300 0x200;" \
> +       "spl-os-args.raw raw 0x1500 0x200;" \
> +       "spl-os-image.raw raw 0x1700 0x6900;" \
>         "spl-os-args fat 0 1;" \
>         "spl-os-image fat 0 1;" \
>         "u-boot.img fat 0 1;" \
> @@ -28,8 +29,9 @@
>         "MLO fat 1 1;" \
>         "MLO.raw raw 0x100 0x100;" \
>         "u-boot.img.raw raw 0x300 0x1000;" \
> -       "spl-os-args.raw raw 0x80 0x80;" \
> -       "spl-os-image.raw raw 0x900 0x2000;" \
> +       "u-env.raw raw 0x1300 0x200;" \
> +       "spl-os-args.raw raw 0x1500 0x200;" \
> +       "spl-os-image.raw raw 0x1700 0x6900;" \
>         "spl-os-args fat 1 1;" \
>         "spl-os-image fat 1 1;" \
>         "u-boot.img fat 1 1;" \
> --
> 1.9.1
>

Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>

Guys, please let me know when this patch got merged. I'll need to
update Android partitions accordingly.

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

* [U-Boot] [U-Boot, v3] ARM: ti: Update layout for MMC and eMMC (env and dfu)
  2017-05-24 10:08 [U-Boot] [PATCH v3] ARM: ti: Update layout for MMC and eMMC (env and dfu) Jean-Jacques Hiblot
  2017-05-26 18:18 ` Tom Rini
  2017-05-29 13:38 ` Sam Protsenko
@ 2017-06-06  0:22 ` Tom Rini
  2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2017-06-06  0:22 UTC (permalink / raw)
  To: u-boot

On Wed, May 24, 2017 at 12:08:27PM +0200, Jean-Jacques Hiblot wrote:

> The problems with the current DFU layout are:
> MMC: The space allocated for u-boot is too small for the latest u-boot
>      (>750KB). We need to increase it. eMMC uses a much bigger area (2MB).
> eMMC: region "u-boot.img.raw" overlaps the environment area and the region
>       "spl-os-image.raw".
> both: region "spl-os-image.raw" is quite small and can't handle android
>       kernels
> 
> Fixing this requires growing some regions and moving others.
> Care has been taken to leave some room for further growth of
> "spl-os-args.raw".
> Also the "env" now appears in the dfu so that it's apparent that the
> region is not free space that can be used to grow "u-boot.img.raw".
> The MLO region is 0x100 sectors wide but the 0x100 are unused in case the
> MLO comes too overflow this areas.
> The total space allocated for those raw binaries is 16MB, of which 13+MB
> are reserved for the kernel image.
> 
> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
> Reviewed-by: Tom Rini <trini@konsulko.com>
> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170605/b90a527f/attachment.sig>

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

end of thread, other threads:[~2017-06-06  0:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 10:08 [U-Boot] [PATCH v3] ARM: ti: Update layout for MMC and eMMC (env and dfu) Jean-Jacques Hiblot
2017-05-26 18:18 ` Tom Rini
2017-05-29 13:38 ` Sam Protsenko
2017-06-06  0:22 ` [U-Boot] [U-Boot, " 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.