[PATCH 1/2] mx53-loco: provide the right header for serial downloader

Eric Bénard eric at eukrea.com
Wed Apr 10 10:10:57 EDT 2013


this patch allows barebox to run when loaded on the iMX53QSB
using the serial downloader.

Signed-off-by: Eric Bénard <eric at eukrea.com>
---
 arch/arm/boards/freescale-mx53-loco/flash_header.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm/boards/freescale-mx53-loco/flash_header.c b/arch/arm/boards/freescale-mx53-loco/flash_header.c
index dc1162b..5358f0b 100644
--- a/arch/arm/boards/freescale-mx53-loco/flash_header.c
+++ b/arch/arm/boards/freescale-mx53-loco/flash_header.c
@@ -34,10 +34,17 @@ struct imx_flash_header_v2 __flash_header_section flash_header = {
 	.header.length		= cpu_to_be16(32),
 	.header.version		= IVT_VERSION,
 
+#ifdef CONFIG_ARCH_IMX_INTERNAL_BOOT_SERIAL
+	.entry			= APP_DEST + 0x400,
+	.dcd_ptr		= APP_DEST + offsetof(struct imx_flash_header_v2, dcd),
+	.boot_data_ptr		= APP_DEST + offsetof(struct imx_flash_header_v2, boot_data),
+	.self			= APP_DEST,
+#else
 	.entry			= APP_DEST + 0x1000,
 	.dcd_ptr		= APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, dcd),
 	.boot_data_ptr		= APP_DEST + 0x400 + offsetof(struct imx_flash_header_v2, boot_data),
 	.self			= APP_DEST + 0x400,
+#endif
 
 	.boot_data.start	= APP_DEST,
 	.boot_data.size		= DCD_BAREBOX_SIZE,
-- 
1.7.11.7




More information about the barebox mailing list