public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] Mainline u-boot installation on Odroid-UX4
@ 2016-04-07  9:35 Shawn Guo
  2016-04-07 10:20 ` Przemyslaw Marczak
  0 siblings, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2016-04-07  9:35 UTC (permalink / raw)
  To: u-boot

Hi Przemyslaw, Anand,

I just got a Odroid-UX4 board to play.  I installed firmware (bl1, bl2,
tzsw, u-boot) from hardkernel using sd_fusing.sh, and the board boots
fine.  But when I install mainline u-boot v2016.03 by following
doc/README.odroid, the board refuses to boot with nothing appearing on
serial console.

Here is what I did:

 - make odroid-xu3_defconfig
 - make (using arm-linux-gnueabi-gcc 4.7.3)
 - copy u-boot.bin (which is same as u-boot-dtb.bin in v2016.03 release)
   to sd_fuse/hardkernel folder, and modify sd_fusing.sh to get it point
   to this new U-Boot
 - ./sd_fusing.sh /dev/sdX to flash the SD card

One thing I'm not sure is the offset that firmware should be installed
to SD card.  The doc/README.odroid and hardkernel sd_fusing.sh tells
different ones.

doc/README.odroid:

 -------------------------------------
|  Binary   | Block offset| part type |
|   name    | SD   | eMMC |(eMMC only)|
 -------------------------------------
| Bl1       | 1    | 0    |  1 (boot) |
| Bl2       | 31   | 30   |  1 (boot) |
| U-Boot    | 63   | 62   |  1 (boot) |
| Tzsw      | 2111 | 2110 |  1 (boot) |
| Uboot Env | 2560 | 2560 |  0 (user) |
 -------------------------------------

sd_fusing.sh:

signed_bl1_position=1
bl2_position=31
uboot_position=63
tzsw_position=719
env_position=1231

I tried both sets, and neither works for me.

I know Odroid-UX4 is supported by mainline U-Boot today, so there must
be something missing from my setup.  Could you please help me here?
Thanks.

Shawn

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Mainline u-boot installation on Odroid-UX4
  2016-04-07  9:35 [U-Boot] Mainline u-boot installation on Odroid-UX4 Shawn Guo
@ 2016-04-07 10:20 ` Przemyslaw Marczak
  2016-04-07 13:57   ` Anand Moon
  2016-04-07 13:59   ` Shawn Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Przemyslaw Marczak @ 2016-04-07 10:20 UTC (permalink / raw)
  To: u-boot

Hello Shawn.

On 04/07/2016 11:35 AM, Shawn Guo wrote:
> Hi Przemyslaw, Anand,
>
> I just got a Odroid-UX4 board to play.  I installed firmware (bl1, bl2,
> tzsw, u-boot) from hardkernel using sd_fusing.sh, and the board boots
> fine.  But when I install mainline u-boot v2016.03 by following
> doc/README.odroid, the board refuses to boot with nothing appearing on
> serial console.
>
> Here is what I did:
>
>   - make odroid-xu3_defconfig
>   - make (using arm-linux-gnueabi-gcc 4.7.3)
>   - copy u-boot.bin (which is same as u-boot-dtb.bin in v2016.03 release)
>     to sd_fuse/hardkernel folder, and modify sd_fusing.sh to get it point
>     to this new U-Boot
>   - ./sd_fusing.sh /dev/sdX to flash the SD card

We can assume, that the aboce steps are ok.

>
> One thing I'm not sure is the offset that firmware should be installed
> to SD card.  The doc/README.odroid and hardkernel sd_fusing.sh tells
> different ones.
>
> doc/README.odroid:
>
>   -------------------------------------
> |  Binary   | Block offset| part type |
> |   name    | SD   | eMMC |(eMMC only)|
>   -------------------------------------
> | Bl1       | 1    | 0    |  1 (boot) |
> | Bl2       | 31   | 30   |  1 (boot) |
> | U-Boot    | 63   | 62   |  1 (boot) |
> | Tzsw      | 2111 | 2110 |  1 (boot) |
> | Uboot Env | 2560 | 2560 |  0 (user) |
>   -------------------------------------
>
> sd_fusing.sh:
>
> signed_bl1_position=1
> bl2_position=31
> uboot_position=63
> tzsw_position=719
> env_position=1231
>
> I tried both sets, and neither works for me.
>
> I know Odroid-UX4 is supported by mainline U-Boot today, so there must
> be something missing from my setup.  Could you please help me here?
> Thanks.
>
> Shawn
>
>

There were two variants of boot chain with U-Boot for XU3/XU4, which 
differs in U-Boot size - originally U-Boot was 328K, but for the 
mainline we assume 1MB of size.

So for mainline, you need a prober version of BL2, which loads 1MB of 
U-Boot instead of 328K - in other way, the mainline U-Boot will be 
overwritten by tzsw and env.

Please use the resources from this site:
https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot

In sd_fuse.1M.sh, you can see, that for U-Boot area we have: 2111-63 == 
2048blk == 1MB.

And of course change the U-Boot to mainline.

Best regards,
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Mainline u-boot installation on Odroid-UX4
  2016-04-07 10:20 ` Przemyslaw Marczak
@ 2016-04-07 13:57   ` Anand Moon
  2016-04-07 13:59   ` Shawn Guo
  1 sibling, 0 replies; 5+ messages in thread
From: Anand Moon @ 2016-04-07 13:57 UTC (permalink / raw)
  To: u-boot

Hi Shwan,

On 7 April 2016 at 15:50, Przemyslaw Marczak <p.marczak@samsung.com> wrote:
> Hello Shawn.
>
> On 04/07/2016 11:35 AM, Shawn Guo wrote:
>>
>> Hi Przemyslaw, Anand,
>>
>> I just got a Odroid-UX4 board to play.  I installed firmware (bl1, bl2,
>> tzsw, u-boot) from hardkernel using sd_fusing.sh, and the board boots
>> fine.  But when I install mainline u-boot v2016.03 by following
>> doc/README.odroid, the board refuses to boot with nothing appearing on
>> serial console.
>>
>> Here is what I did:
>>
>>   - make odroid-xu3_defconfig
>>   - make (using arm-linux-gnueabi-gcc 4.7.3)
>>   - copy u-boot.bin (which is same as u-boot-dtb.bin in v2016.03 release)
>>     to sd_fuse/hardkernel folder, and modify sd_fusing.sh to get it point
>>     to this new U-Boot
>>   - ./sd_fusing.sh /dev/sdX to flash the SD card
>
>
> We can assume, that the aboce steps are ok.
>
>>
>> One thing I'm not sure is the offset that firmware should be installed
>> to SD card.  The doc/README.odroid and hardkernel sd_fusing.sh tells
>> different ones.
>>
>> doc/README.odroid:
>>
>>   -------------------------------------
>> |  Binary   | Block offset| part type |
>> |   name    | SD   | eMMC |(eMMC only)|
>>   -------------------------------------
>> | Bl1       | 1    | 0    |  1 (boot) |
>> | Bl2       | 31   | 30   |  1 (boot) |
>> | U-Boot    | 63   | 62   |  1 (boot) |
>> | Tzsw      | 2111 | 2110 |  1 (boot) |
>> | Uboot Env | 2560 | 2560 |  0 (user) |
>>   -------------------------------------
>>
>> sd_fusing.sh:
>>
>> signed_bl1_position=1
>> bl2_position=31
>> uboot_position=63
>> tzsw_position=719
>> env_position=1231
>>
>> I tried both sets, and neither works for me.
>>
>> I know Odroid-UX4 is supported by mainline U-Boot today, so there must
>> be something missing from my setup.  Could you please help me here?
>> Thanks.
>>
>> Shawn
>>
>>
>
> There were two variants of boot chain with U-Boot for XU3/XU4, which differs
> in U-Boot size - originally U-Boot was 328K, but for the mainline we assume
> 1MB of size.
>
> So for mainline, you need a prober version of BL2, which loads 1MB of U-Boot
> instead of 328K - in other way, the mainline U-Boot will be overwritten by
> tzsw and env.
>
> Please use the resources from this site:
> https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot
>
> In sd_fuse.1M.sh, you can see, that for U-Boot area we have: 2111-63 ==
> 2048blk == 1MB.
>
> And of course change the U-Boot to mainline.
>
> Best regards,
> --
> Przemyslaw Marczak
> Samsung R&D Institute Poland
> Samsung Electronics
> p.marczak at samsung.com

Adding to this you requires

mainline u-boot requires boot.scr file to boot.

$ mkimage -C none -A arm -T script -d
board/samsung/common/bootscripts/autoboot.cmd boot.scr
$ cp boot.scr /media/boot/

Because Przemyslaw Marczak has implemented card detection logic for
Odroid XU3/XU4 board.

You need to use following exynos5422-odroidxu4.dtb DTB file in /media/boot/

Best Regards
-Anand Moon

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [U-Boot] Mainline u-boot installation on Odroid-UX4
  2016-04-07 10:20 ` Przemyslaw Marczak
  2016-04-07 13:57   ` Anand Moon
@ 2016-04-07 13:59   ` Shawn Guo
  2016-04-07 14:23     ` Przemyslaw Marczak
  1 sibling, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2016-04-07 13:59 UTC (permalink / raw)
  To: u-boot

On Thu, Apr 07, 2016 at 12:20:06PM +0200, Przemyslaw Marczak wrote:
> There were two variants of boot chain with U-Boot for XU3/XU4, which
> differs in U-Boot size - originally U-Boot was 328K, but for the
> mainline we assume 1MB of size.
> 
> So for mainline, you need a prober version of BL2, which loads 1MB
> of U-Boot instead of 328K - in other way, the mainline U-Boot will
> be overwritten by tzsw and env.
> 
> Please use the resources from this site:
> https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot

Thanks much, Przemyslaw.  It works now.

I think we should update README.odroid a bit to ease future users.  Do
you prefer something like the patch below, or we simply replace the
existing link with hardkernel_1mb_uboot one, considering the default
U-Boot image today is already bigger than 328KB anyway?

Shawn

---8<----

diff --git a/doc/README.odroid b/doc/README.odroid
index ef243d1bde36..f0d1aa98542f 100644
--- a/doc/README.odroid
+++ b/doc/README.odroid
@@ -33,6 +33,10 @@ http://odroid.in/guides/ubuntu-lfs/boot.tar.gz
 It can be downloaded from:
 https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel
 
+If U-Boot image is bigger than 328KB, the following binaries should be
+used instead.
+https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot
+
 
 4. Boot media layout
 ====================

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [U-Boot] Mainline u-boot installation on Odroid-UX4
  2016-04-07 13:59   ` Shawn Guo
@ 2016-04-07 14:23     ` Przemyslaw Marczak
  0 siblings, 0 replies; 5+ messages in thread
From: Przemyslaw Marczak @ 2016-04-07 14:23 UTC (permalink / raw)
  To: u-boot

Hello Shawn,

On 04/07/2016 03:59 PM, Shawn Guo wrote:
> On Thu, Apr 07, 2016 at 12:20:06PM +0200, Przemyslaw Marczak wrote:
>> There were two variants of boot chain with U-Boot for XU3/XU4, which
>> differs in U-Boot size - originally U-Boot was 328K, but for the
>> mainline we assume 1MB of size.
>>
>> So for mainline, you need a prober version of BL2, which loads 1MB
>> of U-Boot instead of 328K - in other way, the mainline U-Boot will
>> be overwritten by tzsw and env.
>>
>> Please use the resources from this site:
>> https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot
>
> Thanks much, Przemyslaw.  It works now.
>
> I think we should update README.odroid a bit to ease future users.  Do
> you prefer something like the patch below, or we simply replace the
> existing link with hardkernel_1mb_uboot one, considering the default
> U-Boot image today is already bigger than 328KB anyway?
>
> Shawn
>

Good point, it wasn't updated for a long time. Yes, useful U-Boot's size 
is much bigger than 328k, so you can just, replace the link.

> ---8<----
>
> diff --git a/doc/README.odroid b/doc/README.odroid
> index ef243d1bde36..f0d1aa98542f 100644
> --- a/doc/README.odroid
> +++ b/doc/README.odroid
> @@ -33,6 +33,10 @@ http://odroid.in/guides/ubuntu-lfs/boot.tar.gz
>   It can be downloaded from:
>   https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel
>
> +If U-Boot image is bigger than 328KB, the following binaries should be
> +used instead.
> +https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07/sd_fuse/hardkernel_1mb_uboot
> +
>
>   4. Boot media layout
>   ====================
>
>
>

It would be nice if you could update the supported fdt files list at 
line 25 of doc/README.odroid - with file: exynos5422-odroidxu4.dtb, 
mentioned by Anand Moon.

Best regards,
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-04-07 14:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-07  9:35 [U-Boot] Mainline u-boot installation on Odroid-UX4 Shawn Guo
2016-04-07 10:20 ` Przemyslaw Marczak
2016-04-07 13:57   ` Anand Moon
2016-04-07 13:59   ` Shawn Guo
2016-04-07 14:23     ` Przemyslaw Marczak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox