[U-Boot] [PATCH 1/3] davinci: omapl138_lcdk: use correct AIS config

The AIS image built for the OMAPL138-LCDK board is not booting because the AIS configuration is not correct. This commit adds a AIS configuration file that allow the SPL to boot correctly.
Signed-off-by: Fabien Parent fparent@baylibre.com --- board/davinci/da8xxevm/omapl138_lcdk_ais.cfg | 4 ++++ include/configs/omapl138_lcdk.h | 3 +++ scripts/config_whitelist.txt | 1 + 3 files changed, 8 insertions(+) create mode 100644 board/davinci/da8xxevm/omapl138_lcdk_ais.cfg
diff --git a/board/davinci/da8xxevm/omapl138_lcdk_ais.cfg b/board/davinci/da8xxevm/omapl138_lcdk_ais.cfg new file mode 100644 index 0000000..afce286 --- /dev/null +++ b/board/davinci/da8xxevm/omapl138_lcdk_ais.cfg @@ -0,0 +1,4 @@ +PLL0 180001 40b +DDR2 18010001 2 c5 134832 264a3209 3c14c722 492 0 +EMIFA_ASYNC 0 3ffffffd 0 0 2 +PSC 10d0003 diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 854fc47..91ddbb1 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -272,6 +272,9 @@ #define CONFIG_SPL_PAD_TO 32768 #endif
+/* AIS Image */ +#define CONFIG_AIS_CONFIG_FILE "board/davinci/da8xxevm/omapl138_lcdk_ais.cfg" + /* additions for new relocation code, must added to all boards */ #define CONFIG_SYS_SDRAM_BASE 0xc0000000 #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x1000 - /* Fix this */ \ diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index d476367..c694f90 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -73,6 +73,7 @@ CONFIG_ADP_AG101P CONFIG_AEABI CONFIG_AEMIF_CNTRL_BASE CONFIG_AES +CONFIG_AIS_CONFIG_FILE CONFIG_ALTERA_SDRAM CONFIG_ALTERA_SPI_IDLE_VAL CONFIG_ALTIVEC

The list of available boot method is not part of the binary which prevent the SPL from booting u-boot or Linux.
Add the missing .u_boot_list* sections to the binary to fix it.
Signed-off-by: Fabien Parent fparent@baylibre.com --- board/davinci/da8xxevm/u-boot-spl-da850evm.lds | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds index ab4f50c..85a6be9 100644 --- a/board/davinci/da8xxevm/u-boot-spl-da850evm.lds +++ b/board/davinci/da8xxevm/u-boot-spl-da850evm.lds @@ -34,6 +34,9 @@ SECTIONS .data : { *(SORT_BY_ALIGNMENT(.data*)) } >.sram
. = ALIGN(4); + .u_boot_list : { KEEP(*(SORT(.u_boot_list*))); } >.sram + + . = ALIGN(4); .rel.dyn : { __rel_dyn_start = .; *(.rel*)

On Wed, Nov 16, 2016 at 05:33:34PM +0100, Fabien Parent wrote:
The list of available boot method is not part of the binary which prevent the SPL from booting u-boot or Linux.
Add the missing .u_boot_list* sections to the binary to fix it.
Signed-off-by: Fabien Parent fparent@baylibre.com
Reviewed-by: Tom Rini trini@konsulko.com

Define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR in order to be able to boot from MMC/SD.
The SPL is stored at sector 0x75, while u-boot will follow at sector 0xb5.
Signed-off-by: Fabien Parent fparent@baylibre.com --- include/configs/omapl138_lcdk.h | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 91ddbb1..0964176 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -272,6 +272,14 @@ #define CONFIG_SPL_PAD_TO 32768 #endif
+/* Load U-Boot Image From MMC */ +#ifdef CONFIG_SPL_MMC_LOAD +#define SPL_SECTOR 0x75 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (SPL_SECTOR + \ + CONFIG_SPL_PAD_TO / 512) +#undef CONFIG_SPL_SPI_LOAD +#endif + /* AIS Image */ #define CONFIG_AIS_CONFIG_FILE "board/davinci/da8xxevm/omapl138_lcdk_ais.cfg"

On Wed, Nov 16, 2016 at 05:33:35PM +0100, Fabien Parent wrote:
Define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR in order to be able to boot from MMC/SD.
The SPL is stored at sector 0x75, while u-boot will follow at sector 0xb5.
Signed-off-by: Fabien Parent fparent@baylibre.com
include/configs/omapl138_lcdk.h | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 91ddbb1..0964176 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -272,6 +272,14 @@ #define CONFIG_SPL_PAD_TO 32768 #endif
+/* Load U-Boot Image From MMC */ +#ifdef CONFIG_SPL_MMC_LOAD +#define SPL_SECTOR 0x75 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (SPL_SECTOR + \
CONFIG_SPL_PAD_TO / 512)
+#undef CONFIG_SPL_SPI_LOAD +#endif
/* AIS Image */ #define CONFIG_AIS_CONFIG_FILE "board/davinci/da8xxevm/omapl138_lcdk_ais.cfg"
We need to do this on top of Sam's series, and we need to do this in Kconfig and not adding more stuff to the config header.

On Fri, Nov 18, 2016 at 12:23 AM, Tom Rini trini@konsulko.com wrote:
On Wed, Nov 16, 2016 at 05:33:35PM +0100, Fabien Parent wrote:
Define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR in order to be able to boot from MMC/SD.
The SPL is stored at sector 0x75, while u-boot will follow at sector 0xb5.
Signed-off-by: Fabien Parent fparent@baylibre.com
include/configs/omapl138_lcdk.h | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h index 91ddbb1..0964176 100644 --- a/include/configs/omapl138_lcdk.h +++ b/include/configs/omapl138_lcdk.h @@ -272,6 +272,14 @@ #define CONFIG_SPL_PAD_TO 32768 #endif
+/* Load U-Boot Image From MMC */ +#ifdef CONFIG_SPL_MMC_LOAD +#define SPL_SECTOR 0x75 +#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR (SPL_SECTOR + \
CONFIG_SPL_PAD_TO / 512)
+#undef CONFIG_SPL_SPI_LOAD +#endif
/* AIS Image */ #define CONFIG_AIS_CONFIG_FILE "board/davinci/da8xxevm/omapl138_lcdk_ais.cfg"
We need to do this on top of Sam's series, and we need to do this in Kconfig and not adding more stuff to the config header.
Just FYI: mentioned patch is [1]. For the Kconfig option itself see diif at [2].
[1] http://git.denx.de/?p=u-boot.git;a=commit;h=38fed8abe7d2e7ba90deb352d0e7aed4... [2] http://git.denx.de/?p=u-boot.git;a=blobdiff;f=common/spl/Kconfig;h=df9e0ce68...
-- Tom

On Wed, Nov 16, 2016 at 05:33:33PM +0100, Fabien Parent wrote:
The AIS image built for the OMAPL138-LCDK board is not booting because the AIS configuration is not correct. This commit adds a AIS configuration file that allow the SPL to boot correctly.
Signed-off-by: Fabien Parent fparent@baylibre.com
Reviewed-by: Tom Rini trini@konsulko.com

On Thu, 2016-11-17 at 17:19 -0500, Tom Rini wrote:
Error verifying signature: gpg: Fatal: can't create directory '/home/phoward/.gnupg': File exists On Wed, Nov 16, 2016 at 05:33:33PM +0100, Fabien Parent wrote:
The AIS image built for the OMAPL138-LCDK board is not booting because the AIS configuration is not correct. This commit adds a AIS configuration file that allow the SPL to boot correctly.
Signed-off-by: Fabien Parent fparent@baylibre.com
Reviewed-by: Tom Rini trini@konsulko.com
Given these changes, can you modify/remove board/davinci/da8xxevm/README.omapl138-lcdk please?
participants (4)
-
Fabien Parent
-
Peter Howard
-
Sam Protsenko
-
Tom Rini