[U-Boot] [PATCH] exynos5: allow bigger BL2 (u-boot.bin)

This patch allows SPL to load a bigger BL2 (u-boot.bin). This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than 512K with GCC8.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com --- include/configs/exynos5-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/configs/exynos5-common.h b/include/configs/exynos5-common.h index cd2a9046af..7da4be5ca8 100644 --- a/include/configs/exynos5-common.h +++ b/include/configs/exynos5-common.h @@ -89,7 +89,7 @@ /* Configuration of BL1, BL2, ENV Blocks on mmc */ #define CONFIG_RES_BLOCK_SIZE (512) #define CONFIG_BL1_SIZE (16 << 10) /*16 K reserved for BL1*/ -#define CONFIG_BL2_SIZE (512UL << 10UL) /* 512 KB */ +#define CONFIG_BL2_SIZE (512UL << 11UL) /* 1 MB */ #define CONFIG_ENV_SIZE (16 << 10) /* 16 KB */
#define CONFIG_BL1_OFFSET (CONFIG_RES_BLOCK_SIZE + CONFIG_SEC_FW_SIZE)

On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
This patch allows SPL to load a bigger BL2 (u-boot.bin). This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than 512K with GCC8.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
include/configs/exynos5-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Are these platforms using thumb2 to build? Were it not for some early Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a global switch to making that option default.

----- Tom Rini trini@konsulko.com a écrit :
On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
This patch allows SPL to load a bigger BL2 (u-boot.bin). This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than 512K with GCC8.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
include/configs/exynos5-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Are these platforms using thumb2 to build? Were it not for some early Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a global switch to making that option default.
No, they are not using thumb2: # CONFIG_SYS_THUMB_BUILD is not set # CONFIG_SPL_SYS_THUMB_BUILD is not set
Guillaume
-- Tom

On Mon, Nov 19, 2018 at 05:56:37PM +0100, Guillaume GARDET wrote:
----- Tom Rini trini@konsulko.com a écrit :
On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
This patch allows SPL to load a bigger BL2 (u-boot.bin). This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than 512K with GCC8.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
include/configs/exynos5-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Are these platforms using thumb2 to build? Were it not for some early Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a global switch to making that option default.
No, they are not using thumb2: # CONFIG_SYS_THUMB_BUILD is not set # CONFIG_SPL_SYS_THUMB_BUILD is not set
I would suggest switching that on instead then. I'm always wary of changing stuff on the flash layout.

----- Tom Rini trini@konsulko.com a écrit :
On Mon, Nov 19, 2018 at 05:56:37PM +0100, Guillaume GARDET wrote:
----- Tom Rini trini@konsulko.com a écrit :
On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
This patch allows SPL to load a bigger BL2 (u-boot.bin). This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than 512K with GCC8.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
include/configs/exynos5-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Are these platforms using thumb2 to build? Were it not for some early Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a global switch to making that option default.
No, they are not using thumb2: # CONFIG_SYS_THUMB_BUILD is not set # CONFIG_SPL_SYS_THUMB_BUILD is not set
I would suggest switching that on instead then. I'm always wary of changing stuff on the flash layout.
I tested thumb2 for SPL and u-boot.bin on arndale and it does boot properly. u-boot.bin is 397KB with thumb2, which is OK.
Should I make the switch for Arndale board only, or on a bigger range?
Guillaume
-- Tom

On Mon, Nov 19, 2018 at 06:03:45PM +0100, Guillaume GARDET wrote:
----- Tom Rini trini@konsulko.com a écrit :
On Mon, Nov 19, 2018 at 05:56:37PM +0100, Guillaume GARDET wrote:
----- Tom Rini trini@konsulko.com a écrit :
On Mon, Nov 19, 2018 at 05:45:03PM +0100, Guillaume GARDET wrote:
This patch allows SPL to load a bigger BL2 (u-boot.bin). This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than 512K with GCC8.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
include/configs/exynos5-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Are these platforms using thumb2 to build? Were it not for some early Cortex-A platforms with thumb2 errata I'd be strongly inclined to do a global switch to making that option default.
No, they are not using thumb2: # CONFIG_SYS_THUMB_BUILD is not set # CONFIG_SPL_SYS_THUMB_BUILD is not set
I would suggest switching that on instead then. I'm always wary of changing stuff on the flash layout.
I tested thumb2 for SPL and u-boot.bin on arndale and it does boot properly. u-boot.bin is 397KB with thumb2, which is OK.
Should I make the switch for Arndale board only, or on a bigger range?
I'd go ahead and switch all exynos platforms. My recollection is it's really only very old / early Cortex-A platforms with issues and I'm pretty sure we either have the appropriate errata enabled or they've all been discarded at this point in time.

This patch allows smaller binaries. This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than the 512K load limit, with GCC8, without thumb mode.
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Albert Aribaud albert.u.boot@aribaud.net Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f5d4d39683..1ccd53fd0b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -607,6 +607,7 @@ config ARCH_EXYNOS select DM_SPI select DM_SPI_FLASH select SPI + imply SYS_THUMB_BUILD imply CMD_DM imply FAT_WRITE

Hi Guillaume,
This patch allows smaller binaries. This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than the 512K load limit, with GCC8, without thumb mode.
Acked-by: Lukasz Majewski lukma@denx.de
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Albert Aribaud albert.u.boot@aribaud.net Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f5d4d39683..1ccd53fd0b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -607,6 +607,7 @@ config ARCH_EXYNOS select DM_SPI select DM_SPI_FLASH select SPI
- imply SYS_THUMB_BUILD imply CMD_DM imply FAT_WRITE
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

Hi,
not sure through which tree it should go and who should take care of it?
Guillaume
----- Lukasz Majewski lukma@denx.de a écrit :
Hi Guillaume,
This patch allows smaller binaries. This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than the 512K load limit, with GCC8, without thumb mode.
Acked-by: Lukasz Majewski lukma@denx.de
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Albert Aribaud albert.u.boot@aribaud.net Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f5d4d39683..1ccd53fd0b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -607,6 +607,7 @@ config ARCH_EXYNOS select DM_SPI select DM_SPI_FLASH select SPI
- imply SYS_THUMB_BUILD imply CMD_DM imply FAT_WRITE
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

On Mon, Dec 03, 2018 at 08:57:21PM +0100, Guillaume GARDET wrote:
Hi,
not sure through which tree it should go and who should take care of it?
I will likely pick this up "soon" if I don't seen an overall Samsung PR, thanks!
Guillaume
----- Lukasz Majewski lukma@denx.de a écrit :
Hi Guillaume,
This patch allows smaller binaries. This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than the 512K load limit, with GCC8, without thumb mode.
Acked-by: Lukasz Majewski lukma@denx.de
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Albert Aribaud albert.u.boot@aribaud.net Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f5d4d39683..1ccd53fd0b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -607,6 +607,7 @@ config ARCH_EXYNOS select DM_SPI select DM_SPI_FLASH select SPI
- imply SYS_THUMB_BUILD imply CMD_DM imply FAT_WRITE
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

Dear Tom,
On 04/12/18 05:23, Tom Rini wrote:
On Mon, Dec 03, 2018 at 08:57:21PM +0100, Guillaume GARDET wrote:
Hi,
not sure through which tree it should go and who should take care of it?
I will likely pick this up "soon" if I don't seen an overall Samsung PR, thanks!
It's OK to take this patch by you.
Acked-by: Minkyu Kang mk7.kang@samsung.com
Thanks, Minkyu Kang.

Hi Tom,
Le 04/12/2018 à 05:47, Minkyu Kang a écrit :
Dear Tom,
On 04/12/18 05:23, Tom Rini wrote:
On Mon, Dec 03, 2018 at 08:57:21PM +0100, Guillaume GARDET wrote:
Hi,
not sure through which tree it should go and who should take care of it?
I will likely pick this up "soon" if I don't seen an overall Samsung PR, thanks!
It's OK to take this patch by you.
Acked-by: Minkyu Kang mk7.kang@samsung.com
It seems you missed it for -rc2. Could you take it before the release, please?
Thanks,
Guillaume
Thanks, Minkyu Kang.

Hi,
On 21/12/18 22:57, Guillaume Gardet wrote:
Hi Tom,
Le 04/12/2018 à 05:47, Minkyu Kang a écrit :
Dear Tom,
On 04/12/18 05:23, Tom Rini wrote:
On Mon, Dec 03, 2018 at 08:57:21PM +0100, Guillaume GARDET wrote:
Hi,
not sure through which tree it should go and who should take care of it?
I will likely pick this up "soon" if I don't seen an overall Samsung PR, thanks!
It's OK to take this patch by you.
Acked-by: Minkyu Kang mk7.kang@samsung.com
It seems you missed it for -rc2. Could you take it before the release, please?
applied to u-boot-samsung.
Thanks, Minkyu Kang.

Hi Guillaume,
Hi,
not sure through which tree it should go and who should take care of it?
Please rebase on top of u-boot/master branch.
Then Minkyu will take the patch to his tree.
Guillaume
----- Lukasz Majewski lukma@denx.de a écrit :
Hi Guillaume,
This patch allows smaller binaries. This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than the 512K load limit, with GCC8, without thumb mode.
Acked-by: Lukasz Majewski lukma@denx.de
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Albert Aribaud albert.u.boot@aribaud.net Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f5d4d39683..1ccd53fd0b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -607,6 +607,7 @@ config ARCH_EXYNOS select DM_SPI select DM_SPI_FLASH select SPI
- imply SYS_THUMB_BUILD imply CMD_DM imply FAT_WRITE
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de

----- Lukasz Majewski lukma@denx.de a écrit :
Hi Guillaume,
Hi,
not sure through which tree it should go and who should take care of it?
Please rebase on top of u-boot/master branch.
No need, it applies just fine.
Then Minkyu will take the patch to his tree.
Tom should take it (see Minkyu e-mail).
Thanks, Guillaume
Guillaume
----- Lukasz Majewski lukma@denx.de a écrit :
Hi Guillaume,
This patch allows smaller binaries. This is needed for and has been tested on Arndale board, as u-boot.bin is now bigger than the 512K load limit, with GCC8, without thumb mode.
Acked-by: Lukasz Majewski lukma@denx.de
Signed-off-by: Guillaume GARDET guillaume.gardet@free.fr
Cc: Albert Aribaud albert.u.boot@aribaud.net Cc: Minkyu Kang mk7.kang@samsung.com Cc: Tom Rini trini@konsulko.com
arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index f5d4d39683..1ccd53fd0b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -607,6 +607,7 @@ config ARCH_EXYNOS select DM_SPI select DM_SPI_FLASH select SPI
- imply SYS_THUMB_BUILD imply CMD_DM imply FAT_WRITE
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
participants (5)
-
Guillaume GARDET
-
Guillaume Gardet
-
Lukasz Majewski
-
Minkyu Kang
-
Tom Rini