All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eugen.Hristev at microchip.com <Eugen.Hristev@microchip.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] boot.bin on SD Card for SAMA5D3 Xplained
Date: Thu, 6 Dec 2018 08:02:19 +0000	[thread overview]
Message-ID: <5a5b2c58-41e5-3a21-071a-7f25d94d8096@microchip.com> (raw)
In-Reply-To: <CAOCHtYhVhh8PburgrkaJ9kHVpf1RxJEzP4hK56G7vn7TTbexgw@mail.gmail.com>



On 05.12.2018 22:38, Robert Nelson wrote:
> On Wed, Dec 5, 2018 at 8:37 AM <Eugen.Hristev@microchip.com> wrote:
>>
>>
>>
>> On 05.12.2018 02:15, Daniel Evans wrote:
>>> Trying to get uboot SPL boot.bin to run on an SD card for the sama5d3 xplained board.  All I get is RomBOOT and no other messages.  I have tried throwing in a couple test pins to toggle in board_early_init_f but still not getting any debug.  I can get at91bootstrap to produce a boot.bin that works on the sama5d3 xplained so I am assuming I don’t have a bad board.  My boot partition is FAT16.  To compile I just run the following on Debian Buster :
>>>
>>> make mrproper
>>> make sama5d3_xplained_mmc_defconfig
>>> make
>>>
>>> Cross Compiler is gcc-linaro-6.4.1-2018.05-x86_64_arm-linux-gnueabihf
>>>
>>> When finished compiling I just copy the boot.bin to my BOOT partition.
>>>
>>> Has to be something obvious that I am missing.  Any insight is appreciated…
>>
>> Hello,
>>
>> Check the datasheet for sama5d3 SoC section 11.4.3. - Valid code
>> detection (my datasheet is dated 2 Feb 2016 if it helps)
>>
>> Basically the vector 6 needs to have hardcoded the binary size. Are you
>> doing that ? Otherwise the RomBOOT code will consider your binary as faulty.
>>
>> PS. make sure endianess is right, use a good hexeditor...
>>
>> Hope this helps,
>> Eugen
> 
> Okay, just finished my git bisect, this turned out to be a miss-placed
> #endif when Wenyou did the "configs: at91: Remove
> CONFIG_SYS_EXTRA_OPTIONS assignment" patch:
> 
> https://github.com/u-boot/u-boot/commit/5541543f686b43210fb92181003ff7175d4ab036#diff-651b6ffe22be4df459343a0d6d25154e

Interesting find, is this wrongly done for all the boards in the commit 
or just sama5d3_xplained ?

Feel free to submit a patch if this fixes the issue, and we will review it.

Thanks !


> 
> => RomBOOT
> <debug_uart>
> U-Boot spl 2019.01-rc1-00021-g2e2a2a5d4f-dirty (Dec 05 2018 - 14:30:22 -0600)
> Trying to boot from MMC1
> <debug_uart>
> 
> U-Boot 2019.01-rc1-00021-g2e2a2a5d4f-dirty (Dec 05 2018 - 14:30:22 -0600)
> 
> <snip>
> 
> diff --git a/include/configs/sama5d3_xplained.h
> b/include/configs/sama5d3_xplained.h
> index d0d8087ca3..f87713319d 100644
> --- a/include/configs/sama5d3_xplained.h
> +++ b/include/configs/sama5d3_xplained.h
> @@ -80,7 +80,6 @@
>   #elif CONFIG_NAND_BOOT
>   #define CONFIG_SPL_NAND_DRIVERS
>   #define CONFIG_SPL_NAND_BASE
> -#endif
>   #define CONFIG_SYS_NAND_U_BOOT_OFFS    0x40000
>   #define CONFIG_SYS_NAND_5_ADDR_CYCLE
>   #define CONFIG_SYS_NAND_PAGE_SIZE      0x800
> @@ -91,3 +90,5 @@
>   #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
> 
>   #endif
> +
> +#endif
> 
> Before:
> #ifdef CONFIG_SYS_USE_MMC
> #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
> #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
> 
> #elif CONFIG_SYS_USE_NANDFLASH
> #define CONFIG_SPL_NAND_DRIVERS
> #define CONFIG_SPL_NAND_BASE
> #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000
> #define CONFIG_SYS_NAND_5_ADDR_CYCLE
> #define CONFIG_SYS_NAND_PAGE_SIZE 0x800
> #define CONFIG_SYS_NAND_PAGE_COUNT 64
> #define CONFIG_SYS_NAND_OOBSIZE 64
> #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000
> #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0
> #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
> 
> #endif
> 
> After:
> #ifdef CONFIG_SD_BOOT
> #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
> #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
> 
> #elif CONFIG_NAND_BOOT
> #define CONFIG_SPL_NAND_DRIVERS
> #define CONFIG_SPL_NAND_BASE
> #endif
> <------------------------------------------------- WHY HERE????
> #define CONFIG_SYS_NAND_U_BOOT_OFFS 0x40000
> #define CONFIG_SYS_NAND_5_ADDR_CYCLE
> #define CONFIG_SYS_NAND_PAGE_SIZE 0x800
> #define CONFIG_SYS_NAND_PAGE_COUNT 64
> #define CONFIG_SYS_NAND_OOBSIZE 64
> #define CONFIG_SYS_NAND_BLOCK_SIZE 0x20000
> #define CONFIG_SYS_NAND_BAD_BLOCK_POS 0x0
> #define CONFIG_SPL_GENERATE_ATMEL_PMECC_HEADER
> 
> #endif
> 
> Regards,
> 

  reply	other threads:[~2018-12-06  8:02 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05  0:15 [U-Boot] boot.bin on SD Card for SAMA5D3 Xplained Daniel Evans
2018-12-05 14:36 ` Eugen.Hristev at microchip.com
2018-12-05 18:08   ` Daniel Evans
2018-12-05 20:38   ` Robert Nelson
2018-12-06  8:02     ` Eugen.Hristev at microchip.com [this message]
2018-12-08  2:37       ` Derald D. Woods
2018-12-08 19:49 ` [U-Boot] [PATCH] ARM: at91: Fix 'boot.bin' generation when CONFIG_SD_BOOT is enabled Derald D. Woods
2018-12-10  8:32   ` Eugen.Hristev at microchip.com
2018-12-10 13:01     ` Derald D. Woods
2018-12-10 14:03       ` Eugen.Hristev at microchip.com
2018-12-10 14:54         ` Derald Woods
2018-12-10 15:14           ` Eugen.Hristev at microchip.com
2018-12-11  5:48             ` Derald D. Woods
2018-12-15  7:36               ` [U-Boot] [PATCH] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig Derald D. Woods
2018-12-28  0:04                 ` Derald Woods
2019-01-07  9:40                 ` Eugen.Hristev at microchip.com
2019-01-10  1:00                   ` Derald Woods
2019-01-11 11:27                     ` Eugen.Hristev at microchip.com
2019-01-11 16:51                       ` Derald Woods
2019-01-11 16:53                         ` Derald Woods
2019-01-18  8:37                           ` Eugen.Hristev at microchip.com
2019-01-19  3:26                             ` Derald D. Woods
2019-01-19 20:02                 ` [U-Boot] [PATCH 0/2] ARM: at91: NAND PMECC Kconfig conversion Derald D. Woods
2019-01-19 20:02                   ` [U-Boot] [PATCH 1/2] nand: atmel: Replace SYS_NAND_ECC_BASE with ATMEL_BASE_ECC Derald D. Woods
2019-01-19 20:02                   ` [U-Boot] [PATCH 2/2] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig Derald D. Woods
2019-01-19 23:29                   ` [U-Boot] [PATCH 0/2] ARM: at91: NAND PMECC Kconfig conversion Tom Rini
2019-01-20  0:50                     ` Derald Woods
2019-01-20  3:37                   ` [U-Boot] [PATCH v2 0/1] " Derald D. Woods
2019-01-20  3:37                     ` [U-Boot] [PATCH v3 1/1] ARM: at91: Convert SPL_GENERATE_ATMEL_PMECC_HEADER to Kconfig Derald D. Woods
2019-01-20 12:57                       ` Tom Rini
2019-01-20 14:25                         ` Derald Woods
2019-01-21 16:58                 ` [U-Boot] " Tom Rini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5a5b2c58-41e5-3a21-071a-7f25d94d8096@microchip.com \
    --to=eugen.hristev@microchip.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.