[U-Boot] U-Boot 2016.03 on Altera Cyclone 5 SOCKIT
Nathan Barrett
nathan.barrett at ndc.com
Fri May 13 16:12:25 CEST 2016
Hey Anatolij,
Thanks for getting back to me.
I actually just solved this a few minutes ago. Here's the relevant patch:
--- git.old/include/configs/socfpga_common.h
+++ git/include/configs/socfpga_common.h
@@ -365,9 +365,12 @@
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot-dtb.img"
#define CONFIG_SPL_LIBDISK_SUPPORT
#else
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 3
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0xa00 /* offset 2560 sect (1M+256k) */
-#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */
+#define CONFIG_SPL_LIBGENERIC_SUPPORT
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_LIBDISK_SUPPORT
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION 3
+#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 /* offset 512 sectors (256k) */
+#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 800 /* 400 KB */
#endif
#endif
Sincerely,
Nathan Barrett
-----Original Message-----
From: Anatolij Gustschin [mailto:agust at denx.de]
Sent: Friday, May 13, 2016 9:44 AM
To: Nathan Barrett <nathan.barrett at ndc.com>
Cc: u-boot at lists.denx.de
Subject: Re: [U-Boot] U-Boot 2016.03 on Altera Cyclone 5 SOCKIT
Hi Nathan,
On Thu, 12 May 2016 20:11:00 +0000
Nathan Barrett nathan.barrett at ndc.com wrote:
> Hello All,
>
> I'm trying to run U-Boot 2016 on a Terasic Cyclone 5 SoC Kit. I've got everything running up to this point:
>
> U-Boot SPL 2016.03 (May 12 2016 - 14:56:58)
> ../drivers/ddr/altera/sequencer.c: Preparing to start memory
> calibration
> ../drivers/ddr/altera/sequencer.c: CALIBRATION PASSED
> ../drivers/ddr/altera/sequencer.c: Calibration complete Trying to boot
> from MMC bad magic
> SPL: failed to boot from all boot devices ### ERROR ### Please RESET
> the board ###
>
> If I look at my generated u-boot-with-spl.sfp, at address 0x3FFF0, I can see that U-Boot is sitting there and starts with the proper magic number header (0x27051956).
>
> This file is being placed onto my SD card via
>
> #sudo dd if=u-boot-with-spl.sfp of=/dev/sdb3
I think you do not have CONFIG_SPL_FAT_SUPPORT or CONFIG_SPL_EXT_SUPPORT defined in the board config file and SPL uses MMCSD_MODE_RAW and just reads at offset CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR of the card and not from the partition 3.
> I went ahead and added some debugging breadcrumbs as well:
>
> U-Boot SPL 2016.03 (May 12 2016 - 15:27:36)
> ../drivers/ddr/altera/sequencer.c: Preparing to start memory
> calibration
> ../drivers/ddr/altera/sequencer.c: CALIBRATION PASSED
> ../drivers/ddr/altera/sequencer.c: Calibration complete Trying to boot
> from MMC
>
> ---At line 37 of common/spl/spl_mmc.c --- read sector a00, count=1
SPL reads at byte offset 0x140000 of the device it seems.
> CONFIG_SYS_TEXT_BASE = 1000040
> sizeof(struct image_header) = 40
> magic = dba5b8aa
> ---------------------------------------------------
>
> bad magic
> SPL: failed to boot from all boot devices ### ERROR ### Please RESET
> the board ###
>
> Can anyone assist?
Does SPL detect the image if you write it to the sd-card as below?
dd if=u-boot-with-spl.sfp of=/dev/sdb bs=1M seek=1
But please only write it this way if there is no partition with important data at the beginning of your sd-card.
HTH,
Anatolij
confidentiality: This e-mail and its attachments are intended
for the above named only and may be confidential. If they have
come to you in error you must take no action based on them, nor
must you copy or show them to anyone; please reply to this e-
mail and highlight the error.
Security Warning: Please note that this e-mail has been created
in the knowledge that Internet e-mail is not a 100% secure
communications medium. We advise that you understand and observe
this lack of security when e-mailing us. Viruses: Although we
have taken steps to ensure that this e-mail and attachments are
free from any virus, we advise that in keeping with good
computing practice the recipient should ensure they are actually
virus free.
More information about the U-Boot
mailing list