All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Haslam <ahaslam@baylibre.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] omapl138_lcdk: Set uboot raw mmc sector to 0x41
Date: Mon, 13 Feb 2017 15:14:28 +0100	[thread overview]
Message-ID: <CAKXjFTNJhfpTVPtpW3AdD_Zaj_i-i9dQhKuA+eavpMtAS89pCA@mail.gmail.com> (raw)
In-Reply-To: <20170213132359.GW26129@bill-the-cat>

Hi Tom

On Mon, Feb 13, 2017 at 2:23 PM, Tom Rini <trini@konsulko.com> wrote:
> On Mon, Feb 13, 2017 at 11:44:57AM +0100, Axel Haslam wrote:
>> The uboot binary on the AIS file starts at offset 0x8000.
>> This would be sector 0x40 on a mmc card with 512 bytes per
>> sector: 0x8000/0x200 = 0x40.
>>
>> But because we usually skip the first mmc sector to preserve
>> the partition table, the ais image is written starting
>> on sector 0x1, and the u-boot binary ends up at sector 0x41.
>>
>> Set the address of the u-boot binary to 0x41 so that spl
>> can correctly jump to it.
>>
>> Signed-off-by: Axel Haslam <ahaslam@baylibre.com>
>> ---
>>  configs/omapl138_lcdk_defconfig | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/configs/omapl138_lcdk_defconfig b/configs/omapl138_lcdk_defconfig
>> index d20af19..a249ebd 100644
>> --- a/configs/omapl138_lcdk_defconfig
>> +++ b/configs/omapl138_lcdk_defconfig
>> @@ -12,7 +12,7 @@ CONFIG_VERSION_VARIABLE=y
>>  # CONFIG_DISPLAY_BOARDINFO is not set
>>  CONFIG_BOARD_EARLY_INIT_F=y
>>  CONFIG_SPL=y
>> -CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0xb5
>> +CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x41
>
> Since we're changing a default here, and one that will lead to
> non-booting boards if you don't notice, where did the old value come
> from, and is it actually in use anywhere?  Thanks!
>

I think the "old offset" would be correct when you copy the AIS image
to the sd card using the uflash tool from TI. This tool adds some extra
space at the start of the mmc for UBL configuration settings, which does
not seem to be needed for the lcdk. The generated AIS image with SPL
can boot the board directly and we can just copy the resulting AIS
to the sdcard with the "dd" command.

-Axel.

> --
> Tom

  reply	other threads:[~2017-02-13 14:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-13 10:44 [U-Boot] [PATCH 0/2] omapl: mmc boot help Axel Haslam
2017-02-13 10:44 ` [U-Boot] [PATCH 1/2] da850: Add instructions to copy AIS image to an MMC card Axel Haslam
2017-02-13 10:44 ` [U-Boot] [PATCH 2/2] omapl138_lcdk: Set uboot raw mmc sector to 0x41 Axel Haslam
2017-02-13 13:23   ` Tom Rini
2017-02-13 14:14     ` Axel Haslam [this message]
2017-02-13 14:17       ` Tom Rini
2017-02-13 14:23         ` Axel Haslam
2017-02-13 16:11           ` Axel Haslam
2017-02-13 17:07             ` 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=CAKXjFTNJhfpTVPtpW3AdD_Zaj_i-i9dQhKuA+eavpMtAS89pCA@mail.gmail.com \
    --to=ahaslam@baylibre.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.