Booting on RK3399

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Booting on RK3399

Simon Glass-3
Hi Kever,

I have a firefly-rk3399 and would like to boot it into U-Boot (as a start)
from an uSD card.

Are there instructions somewhere on how to do this? I gather that I need
OP-TEE but not how to build it or how to put the image together. I would
like to have instructions in README.rockchip if possible.

I'm planning to add U-Boot support for bob and maybe kevin (both
Chromebooks) but am not sure where to start. I thought the firefly might be
best since it is pretty common.

Thanks for any help you can provide.

Regards,
Simon
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Mark Kettenis-2
> From: Simon Glass <[hidden email]>
> Date: Wed, 2 Jan 2019 18:15:31 -0700
>
> Hi Kever,
>
> I have a firefly-rk3399 and would like to boot it into U-Boot (as a start)
> from an uSD card.
>
> Are there instructions somewhere on how to do this? I gather that I need
> OP-TEE but not how to build it or how to put the image together. I would
> like to have instructions in README.rockchip if possible.
>
> I'm planning to add U-Boot support for bob and maybe kevin (both
> Chromebooks) but am not sure where to start. I thought the firefly might be
> best since it is pretty common.

Hi Simon,

The instructions in board/u-boot/rockchip/evb_rk3399/README apply to
the firefly-rk3399 as well.  I've successfully built working firmware
for my board using the TF-A (ATF) 2.0 release and U-Boot SPL in the
past that way.

One complication with the firefly board is that by default it boots
from eMMC, so you can't easily test new firmware by putting it on uSD
card unless you make the eMMC unbootable somehow (e.g. by overwriting
the start of the eMMC storage with zeroes).  In that case you can boot
from uSD card if you write U-Boot SPL and U-Boot proper at the right
offsets:

# dd if=idbspl.img of=/dev/sd1c seek=64
# dd if=u-boot.itb of=/dev/sd1c seek=16384

(that's on OpenBSD, on Linux the device names will be different)

Haven't tested flashing eMMC with rkdeveloptool myself, but that
should work on the firefly as well.

Another complication as that the serial console speed defaults to
1500000 which isn't supported by all serial-to-USB chips and frankly
too sensitive to wire noise.  Also be aware that TF-A built from the
official ARM sources at

  https://github.com/ARM-software/arm-trusted-firmware.git

defaults to 115200 (which is more reasonable IMHO).  So I have the
following diff in my U-Boot tree.  The device tree change comes in
handy if you want to boot from uSD card, otherwise U-Boot SPL will
attempt to load the full U-Boot from eMMC.  Perhaps that bit should be
committed at some point.

Having support for bob would be great.  I have one, and would like to
make OpenBSD run on it.

Cheers,

Mark


diff --git a/arch/arm/dts/rk3399-firefly.dts b/arch/arm/dts/rk3399-firefly.dts
index be350866a7..f90e7e88db 100644
--- a/arch/arm/dts/rk3399-firefly.dts
+++ b/arch/arm/dts/rk3399-firefly.dts
@@ -15,7 +15,7 @@
 
  chosen {
  stdout-path = &uart2;
- u-boot,spl-boot-order = &sdhci, &sdmmc;
+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
  };
 
  backlight: backlight {
diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
index 7ac4064a8b..01b3a0771f 100644
--- a/configs/firefly-rk3399_defconfig
+++ b/configs/firefly-rk3399_defconfig
@@ -58,7 +58,7 @@ CONFIG_REGULATOR_RK8XX=y
 CONFIG_PWM_ROCKCHIP=y
 CONFIG_RAM=y
 CONFIG_SPL_RAM=y
-CONFIG_BAUDRATE=1500000
+CONFIG_BAUDRATE=115200
 CONFIG_DEBUG_UART_SHIFT=2
 CONFIG_SYSRESET=y
 CONFIG_USB=y
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Simon Glass-3
HI Mark,

On Wed, 2 Jan 2019 at 18:50, Mark Kettenis <[hidden email]> wrote:

>
> > From: Simon Glass <[hidden email]>
> > Date: Wed, 2 Jan 2019 18:15:31 -0700
> >
> > Hi Kever,
> >
> > I have a firefly-rk3399 and would like to boot it into U-Boot (as a start)
> > from an uSD card.
> >
> > Are there instructions somewhere on how to do this? I gather that I need
> > OP-TEE but not how to build it or how to put the image together. I would
> > like to have instructions in README.rockchip if possible.
> >
> > I'm planning to add U-Boot support for bob and maybe kevin (both
> > Chromebooks) but am not sure where to start. I thought the firefly might be
> > best since it is pretty common.
>
> Hi Simon,
>
> The instructions in board/u-boot/rockchip/evb_rk3399/README apply to
> the firefly-rk3399 as well.  I've successfully built working firmware
> for my board using the TF-A (ATF) 2.0 release and U-Boot SPL in the
> past that way.

Thanks for the pointer. That was the file I was looking for and I
didn't think to look at the evb.

>
> One complication with the firefly board is that by default it boots
> from eMMC, so you can't easily test new firmware by putting it on uSD
> card unless you make the eMMC unbootable somehow (e.g. by overwriting
> the start of the eMMC storage with zeroes).  In that case you can boot
> from uSD card if you write U-Boot SPL and U-Boot proper at the right
> offsets:
>
> # dd if=idbspl.img of=/dev/sd1c seek=64
> # dd if=u-boot.itb of=/dev/sd1c seek=16384
>
> (that's on OpenBSD, on Linux the device names will be different)

Yes I did that with my board, so it already boots from uSD.

>
> Haven't tested flashing eMMC with rkdeveloptool myself, but that
> should work on the firefly as well.
>
> Another complication as that the serial console speed defaults to
> 1500000 which isn't supported by all serial-to-USB chips and frankly

Yes I seem to have one that supports this, so this is fine.

> too sensitive to wire noise.  Also be aware that TF-A built from the
> official ARM sources at
>
>   https://github.com/ARM-software/arm-trusted-firmware.git
>
> defaults to 115200 (which is more reasonable IMHO).  So I have the
> following diff in my U-Boot tree.  The device tree change comes in
> handy if you want to boot from uSD card, otherwise U-Boot SPL will
> attempt to load the full U-Boot from eMMC.  Perhaps that bit should be
> committed at some point.
>
> Having support for bob would be great.  I have one, and would like to
> make OpenBSD run on it.

OK well I think I'll start with an existing board and then see what is needed.

Regards,
Simon

>
> Cheers,
>
> Mark
>
>
> diff --git a/arch/arm/dts/rk3399-firefly.dts b/arch/arm/dts/rk3399-firefly.dts
> index be350866a7..f90e7e88db 100644
> --- a/arch/arm/dts/rk3399-firefly.dts
> +++ b/arch/arm/dts/rk3399-firefly.dts
> @@ -15,7 +15,7 @@
>
>         chosen {
>                 stdout-path = &uart2;
> -               u-boot,spl-boot-order = &sdhci, &sdmmc;
> +               u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
>         };
>
>         backlight: backlight {
> diff --git a/configs/firefly-rk3399_defconfig b/configs/firefly-rk3399_defconfig
> index 7ac4064a8b..01b3a0771f 100644
> --- a/configs/firefly-rk3399_defconfig
> +++ b/configs/firefly-rk3399_defconfig
> @@ -58,7 +58,7 @@ CONFIG_REGULATOR_RK8XX=y
>  CONFIG_PWM_ROCKCHIP=y
>  CONFIG_RAM=y
>  CONFIG_SPL_RAM=y
> -CONFIG_BAUDRATE=1500000
> +CONFIG_BAUDRATE=115200
>  CONFIG_DEBUG_UART_SHIFT=2
>  CONFIG_SYSRESET=y
>  CONFIG_USB=y
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399[Please note, mail behalf by sjg@google.com]

Kever Yang
In reply to this post by Simon Glass-3
Hi Simon,

    It's great to know you would like to support kevin.

What we need is ATF instead of OP-TEE, which should be the same one used
by Chrome OS support by coreboot,

The guide is here and firefly-rk3399 re-use most of evb-rk3399 follow
with defconfig use firefly-rk3399_defconfig:

board/rockchip/evb_rk3399/README


BTW: I would like to enable TPL for RK3399, and also for other SoCs like
rk3288, so that we can have a common boot flow, I have done in my local
branch.


Thanks,
- Kever
On 01/03/2019 09:15 AM, Simon Glass wrote:

> Hi Kever,
>
> I have a firefly-rk3399 and would like to boot it into U-Boot (as a
> start) from an uSD card.
>
> Are there instructions somewhere on how to do this? I gather that I
> need OP-TEE but not how to build it or how to put the image together.
> I would like to have instructions in README.rockchip if possible.
>
> I'm planning to add U-Boot support for bob and maybe kevin (both
> Chromebooks) but am not sure where to start. I thought the firefly
> might be best since it is pretty common.
>
> Thanks for any help you can provide.
>
> Regards,
> Simon
>



_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Mark Kettenis-2
In reply to this post by Simon Glass-3
> From: Simon Glass <[hidden email]>
> Date: Wed, 2 Jan 2019 20:37:45 -0700
>
> > Haven't tested flashing eMMC with rkdeveloptool myself, but that
> > should work on the firefly as well.
> >
> > Another complication as that the serial console speed defaults to
> > 1500000 which isn't supported by all serial-to-USB chips and frankly
>
> Yes I seem to have one that supports this, so this is fine.

Just be aware that you'll need to patch TF-A to configure the serial
port to 1500000 as well.  Probably just a matter of changing
RK3399_BAUDRATE in plat/rockchip/rk3399/rk3399_def.h.

Cheers,

Mark
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Jagan Teki-3
In reply to this post by Mark Kettenis-2
On Thu, Jan 3, 2019 at 7:20 AM Mark Kettenis <[hidden email]> wrote:

>
> > From: Simon Glass <[hidden email]>
> > Date: Wed, 2 Jan 2019 18:15:31 -0700
> >
> > Hi Kever,
> >
> > I have a firefly-rk3399 and would like to boot it into U-Boot (as a start)
> > from an uSD card.
> >
> > Are there instructions somewhere on how to do this? I gather that I need
> > OP-TEE but not how to build it or how to put the image together. I would
> > like to have instructions in README.rockchip if possible.
> >
> > I'm planning to add U-Boot support for bob and maybe kevin (both
> > Chromebooks) but am not sure where to start. I thought the firefly might be
> > best since it is pretty common.
>
> Hi Simon,
>
> The instructions in board/u-boot/rockchip/evb_rk3399/README apply to
> the firefly-rk3399 as well.  I've successfully built working firmware
> for my board using the TF-A (ATF) 2.0 release and U-Boot SPL in the
> past that way.

What is TF-A here, I'm trying to build master, but it's failed to build

$ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
make -C plat/rockchip/rk3399/drivers/m0
BUILD=/root/arm-trusted-firmware/build/rk3399/release/m0
make[1]: Entering directory
'/root/arm-trusted-firmware/plat/rockchip/rk3399/drivers/m0'
  CC      src/dram.c
arm-none-eabi-gcc -g -mcpu=cortex-m0 -mthumb -Wall -O3 -nostdlib
-mfloat-abi=soft -ffunction-sections -fdata-sections
-fomit-frame-pointer -fno-common -Iinclude/ -I../../include/shared/
-MMD -MT /root/arm-trusted-firmware/build/rk3399/release/m0/dram.o -c
src/dram.c -o /root/arm-trusted-firmware/build/rk3399/release/m0/dram.o
make[1]: arm-none-eabi-gcc: Command not found
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Mark Kettenis-2
> From: Jagan Teki <[hidden email]>
> Date: Thu, 3 Jan 2019 20:53:43 +0530
>
> On Thu, Jan 3, 2019 at 7:20 AM Mark Kettenis <[hidden email]> wrote:
> >
> > > From: Simon Glass <[hidden email]>
> > > Date: Wed, 2 Jan 2019 18:15:31 -0700
> > >
> > > Hi Kever,
> > >
> > > I have a firefly-rk3399 and would like to boot it into U-Boot (as a start)
> > > from an uSD card.
> > >
> > > Are there instructions somewhere on how to do this? I gather that I need
> > > OP-TEE but not how to build it or how to put the image together. I would
> > > like to have instructions in README.rockchip if possible.
> > >
> > > I'm planning to add U-Boot support for bob and maybe kevin (both
> > > Chromebooks) but am not sure where to start. I thought the firefly might be
> > > best since it is pretty common.
> >
> > Hi Simon,
> >
> > The instructions in board/u-boot/rockchip/evb_rk3399/README apply to
> > the firefly-rk3399 as well.  I've successfully built working firmware
> > for my board using the TF-A (ATF) 2.0 release and U-Boot SPL in the
> > past that way.
>
> What is TF-A here, I'm trying to build master, but it's failed to build

TF-A (Trusted Firmware-A) == ATF (Arm Trusted Firmware)

For seam reasom ARM, eh I mean arm, decided to rebrand it.


> $ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
> make -C plat/rockchip/rk3399/drivers/m0
> BUILD=/root/arm-trusted-firmware/build/rk3399/release/m0
> make[1]: Entering directory
> '/root/arm-trusted-firmware/plat/rockchip/rk3399/drivers/m0'
>   CC      src/dram.c
> arm-none-eabi-gcc -g -mcpu=cortex-m0 -mthumb -Wall -O3 -nostdlib
> -mfloat-abi=soft -ffunction-sections -fdata-sections
> -fomit-frame-pointer -fno-common -Iinclude/ -I../../include/shared/
> -MMD -MT /root/arm-trusted-firmware/build/rk3399/release/m0/dram.o -c
> src/dram.c -o /root/arm-trusted-firmware/build/rk3399/release/m0/dram.o
> make[1]: arm-none-eabi-gcc: Command not found

The RK3399 has a Cortex-M0 MCU built into it, and TF-A includes a
firmware for that.  I think it is supposed to assist the SoC with
suspend/resume.

You'll need to install an arm-none-eabi- cross compiler as well to
build it.

Cheers,

Mark
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Philipp Tomsich


> On 03.01.2019, at 16:40, Mark Kettenis <[hidden email]> wrote:
>
>> From: Jagan Teki <[hidden email]>
>> Date: Thu, 3 Jan 2019 20:53:43 +0530
>>
>> On Thu, Jan 3, 2019 at 7:20 AM Mark Kettenis <[hidden email]> wrote:
>>>
>>>> From: Simon Glass <[hidden email]>
>>>> Date: Wed, 2 Jan 2019 18:15:31 -0700
>>>>
>>>> Hi Kever,
>>>>
>>>> I have a firefly-rk3399 and would like to boot it into U-Boot (as a start)
>>>> from an uSD card.
>>>>
>>>> Are there instructions somewhere on how to do this? I gather that I need
>>>> OP-TEE but not how to build it or how to put the image together. I would
>>>> like to have instructions in README.rockchip if possible.
>>>>
>>>> I'm planning to add U-Boot support for bob and maybe kevin (both
>>>> Chromebooks) but am not sure where to start. I thought the firefly might be
>>>> best since it is pretty common.
>>>
>>> Hi Simon,
>>>
>>> The instructions in board/u-boot/rockchip/evb_rk3399/README apply to
>>> the firefly-rk3399 as well.  I've successfully built working firmware
>>> for my board using the TF-A (ATF) 2.0 release and U-Boot SPL in the
>>> past that way.
>>
>> What is TF-A here, I'm trying to build master, but it's failed to build
>
> TF-A (Trusted Firmware-A) == ATF (Arm Trusted Firmware)
>
> For seam reasom ARM, eh I mean arm, decided to rebrand it.
>
>
>> $ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
>> make -C plat/rockchip/rk3399/drivers/m0
>> BUILD=/root/arm-trusted-firmware/build/rk3399/release/m0
>> make[1]: Entering directory
>> '/root/arm-trusted-firmware/plat/rockchip/rk3399/drivers/m0'
>>  CC      src/dram.c
>> arm-none-eabi-gcc -g -mcpu=cortex-m0 -mthumb -Wall -O3 -nostdlib
>> -mfloat-abi=soft -ffunction-sections -fdata-sections
>> -fomit-frame-pointer -fno-common -Iinclude/ -I../../include/shared/
>> -MMD -MT /root/arm-trusted-firmware/build/rk3399/release/m0/dram.o -c
>> src/dram.c -o /root/arm-trusted-firmware/build/rk3399/release/m0/dram.o
>> make[1]: arm-none-eabi-gcc: Command not found
>
> The RK3399 has a Cortex-M0 MCU built into it, and TF-A includes a
> firmware for that.  I think it is supposed to assist the SoC with
> suspend/resume.

In fact there’s two M0s: one in the PMU power domain and the other in
the PERI power domain. The ATF uses the one in the PMU domain for
suspend/resume and during DFS on DRAM.

I am working (it’s not my highest priority, though) on getting these booted
before entering ATF from SPL, so the PMU M0 is no longer being started
from ATF but actually running on ATF entry.

> You'll need to install an arm-none-eabi- cross compiler as well to
> build it.
>
> Cheers,
>
> Mark
> _______________________________________________
> U-Boot mailing list
> [hidden email] <mailto:[hidden email]>
> https://lists.denx.de/listinfo/u-boot <https://lists.denx.de/listinfo/u-boot>
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Jagan Teki-3
In reply to this post by Mark Kettenis-2
On Thu, Jan 3, 2019 at 9:10 PM Mark Kettenis <[hidden email]> wrote:

>
> > From: Jagan Teki <[hidden email]>
> > Date: Thu, 3 Jan 2019 20:53:43 +0530
> >
> > On Thu, Jan 3, 2019 at 7:20 AM Mark Kettenis <[hidden email]> wrote:
> > >
> > > > From: Simon Glass <[hidden email]>
> > > > Date: Wed, 2 Jan 2019 18:15:31 -0700
> > > >
> > > > Hi Kever,
> > > >
> > > > I have a firefly-rk3399 and would like to boot it into U-Boot (as a start)
> > > > from an uSD card.
> > > >
> > > > Are there instructions somewhere on how to do this? I gather that I need
> > > > OP-TEE but not how to build it or how to put the image together. I would
> > > > like to have instructions in README.rockchip if possible.
> > > >
> > > > I'm planning to add U-Boot support for bob and maybe kevin (both
> > > > Chromebooks) but am not sure where to start. I thought the firefly might be
> > > > best since it is pretty common.
> > >
> > > Hi Simon,
> > >
> > > The instructions in board/u-boot/rockchip/evb_rk3399/README apply to
> > > the firefly-rk3399 as well.  I've successfully built working firmware
> > > for my board using the TF-A (ATF) 2.0 release and U-Boot SPL in the
> > > past that way.
> >
> > What is TF-A here, I'm trying to build master, but it's failed to build
>
> TF-A (Trusted Firmware-A) == ATF (Arm Trusted Firmware)
>
> For seam reasom ARM, eh I mean arm, decided to rebrand it.
>
>
> > $ make CROSS_COMPILE=aarch64-linux-gnu- PLAT=rk3399 bl31
> > make -C plat/rockchip/rk3399/drivers/m0
> > BUILD=/root/arm-trusted-firmware/build/rk3399/release/m0
> > make[1]: Entering directory
> > '/root/arm-trusted-firmware/plat/rockchip/rk3399/drivers/m0'
> >   CC      src/dram.c
> > arm-none-eabi-gcc -g -mcpu=cortex-m0 -mthumb -Wall -O3 -nostdlib
> > -mfloat-abi=soft -ffunction-sections -fdata-sections
> > -fomit-frame-pointer -fno-common -Iinclude/ -I../../include/shared/
> > -MMD -MT /root/arm-trusted-firmware/build/rk3399/release/m0/dram.o -c
> > src/dram.c -o /root/arm-trusted-firmware/build/rk3399/release/m0/dram.o
> > make[1]: arm-none-eabi-gcc: Command not found
>
> The RK3399 has a Cortex-M0 MCU built into it, and TF-A includes a
> firmware for that.  I think it is supposed to assist the SoC with
> suspend/resume.
>
> You'll need to install an arm-none-eabi- cross compiler as well to
> build it.

Thanks.

Burn the images on SD as below, but the board boot from eMMC.  So it
will boot from SD only eMMC has bad image or any jumper to make SD
boot?
$ ./tools/mkimage -n rk3399 -T rksd -d spl/u-boot-spl.bin idbspl.img
$ sudo dd if=idbspl.img of=/dev/sda seek=64
$ sudo dd if=u-boot.itb of=/dev/sda seek=16384
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Simon Glass-3
In reply to this post by Mark Kettenis-2
Hi Mark,

On Thu, 3 Jan 2019 at 04:23, Mark Kettenis <[hidden email]> wrote:

>
> > From: Simon Glass <[hidden email]>
> > Date: Wed, 2 Jan 2019 20:37:45 -0700
> >
> > > Haven't tested flashing eMMC with rkdeveloptool myself, but that
> > > should work on the firefly as well.
> > >
> > > Another complication as that the serial console speed defaults to
> > > 1500000 which isn't supported by all serial-to-USB chips and frankly
> >
> > Yes I seem to have one that supports this, so this is fine.
>
> Just be aware that you'll need to patch TF-A to configure the serial
> port to 1500000 as well.  Probably just a matter of changing
> RK3399_BAUDRATE in plat/rockchip/rk3399/rk3399_def.h.

OK, did that.
Here are the results:

v2018.01
U-Boot SPL board init"Synchronous Abort" handler, esr 0x00070000
ELR:     e2030000a891a6e4
"Synchronous Abort" handler, esr 0x

v2018.03
U-Boot SPL board init"Synchronous Abort" handler, esr 0xffff0000
elr: 00000000ff8ca6fc lr : ffff0000ffffa7bc
"Synchronous Abort" handler, esr 0x

v2018.05
U-Boot SPL board init"Synchronous Abort" handler, esr 0x00070000
elr: 00000000ff8ca7a4 lr : 00000000ff8ca864
"Synchronous Abort" handler, esr 0x

v2018.07
U-Boot SPL board init"Synchronous Abort" handler, esr 0xff000000
elr: 00000000ff8ca8f0 lr : 00000000ff8ca9b0
"Synchronous Abort" handler, esr 0x

v2018.09
U-Boot SPL board init
(no more output)

mainline:
U-Boot SPL board init
(no more output)


It died when I call printf() at the start of board_init_r(). If I put
printf() anywhere inside spl_relocate_stack_gd() it is happy. Also
putc() works OK. So perhaps the code that calls that function is doing
something wrong? Some sort of stack problem?

Regards,
Simon
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Mark Kettenis-2
> From: Simon Glass <[hidden email]>
> Date: Thu, 3 Jan 2019 16:25:36 -0700
>
> Hi Mark,
>
> On Thu, 3 Jan 2019 at 04:23, Mark Kettenis <[hidden email]> wrote:
> >
> > > From: Simon Glass <[hidden email]>
> > > Date: Wed, 2 Jan 2019 20:37:45 -0700
> > >
> > > > Haven't tested flashing eMMC with rkdeveloptool myself, but that
> > > > should work on the firefly as well.
> > > >
> > > > Another complication as that the serial console speed defaults to
> > > > 1500000 which isn't supported by all serial-to-USB chips and frankly
> > >
> > > Yes I seem to have one that supports this, so this is fine.
> >
> > Just be aware that you'll need to patch TF-A to configure the serial
> > port to 1500000 as well.  Probably just a matter of changing
> > RK3399_BAUDRATE in plat/rockchip/rk3399/rk3399_def.h.
>
> OK, did that.
> Here are the results:
>
> v2018.01
> U-Boot SPL board init"Synchronous Abort" handler, esr 0x00070000
> ELR:     e2030000a891a6e4
> "Synchronous Abort" handler, esr 0x
>
> v2018.03
> U-Boot SPL board init"Synchronous Abort" handler, esr 0xffff0000
> elr: 00000000ff8ca6fc lr : ffff0000ffffa7bc
> "Synchronous Abort" handler, esr 0x
>
> v2018.05
> U-Boot SPL board init"Synchronous Abort" handler, esr 0x00070000
> elr: 00000000ff8ca7a4 lr : 00000000ff8ca864
> "Synchronous Abort" handler, esr 0x
>
> v2018.07
> U-Boot SPL board init"Synchronous Abort" handler, esr 0xff000000
> elr: 00000000ff8ca8f0 lr : 00000000ff8ca9b0
> "Synchronous Abort" handler, esr 0x
>
> v2018.09
> U-Boot SPL board init
> (no more output)
>
> mainline:
> U-Boot SPL board init
> (no more output)
>
>
> It died when I call printf() at the start of board_init_r(). If I put
> printf() anywhere inside spl_relocate_stack_gd() it is happy. Also
> putc() works OK. So perhaps the code that calls that function is doing
> something wrong? Some sort of stack problem?

Strange.  This is what I get

U-Boot SPL board init
Trying to boot from MMC1
NOTICE:  BL31: v2.0(debug):2.0
NOTICE:  BL31: Built : 12:46:24, Oct 21 2018
INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
INFO:    plat_rockchip_pmu_init(1593): pd status 3e
INFO:    BL31: Initializing runtime services
INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
INFO:    BL31: Preparing for EL3 exit to normal world
INFO:    Entry point address = 0x200000
INFO:    SPSR = 0x3c9


U-Boot 2019.01-rc2-00127-g08337cd648-dirty (Jan 04 2019 - 19:31:14 +0100)

Model: Firefly-RK3399 Board
...


That is *with* the dts diff (see below) though.  Without that diff, it
hangs after:

U-Boot SPL board init
Trying to boot from MMC2


So obviously that diff is needed to boot properly from uSD.  I'll send
out a git patch with a proper commit messages in a bit.

Cheers,

Mark


diff --git a/arch/arm/dts/rk3399-firefly.dts b/arch/arm/dts/rk3399-firefly.dts
index be350866a7..f90e7e88db 100644
--- a/arch/arm/dts/rk3399-firefly.dts
+++ b/arch/arm/dts/rk3399-firefly.dts
@@ -15,7 +15,7 @@
 
  chosen {
  stdout-path = &uart2;
- u-boot,spl-boot-order = &sdhci, &sdmmc;
+ u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
  };
 
  backlight: backlight {
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Simon Glass-3
Hi Mark,

On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:

>
> > From: Simon Glass <[hidden email]>
> > Date: Thu, 3 Jan 2019 16:25:36 -0700
> >
> > Hi Mark,
> >
> > On Thu, 3 Jan 2019 at 04:23, Mark Kettenis <[hidden email]> wrote:
> > >
> > > > From: Simon Glass <[hidden email]>
> > > > Date: Wed, 2 Jan 2019 20:37:45 -0700
> > > >
> > > > > Haven't tested flashing eMMC with rkdeveloptool myself, but that
> > > > > should work on the firefly as well.
> > > > >
> > > > > Another complication as that the serial console speed defaults to
> > > > > 1500000 which isn't supported by all serial-to-USB chips and frankly
> > > >
> > > > Yes I seem to have one that supports this, so this is fine.
> > >
> > > Just be aware that you'll need to patch TF-A to configure the serial
> > > port to 1500000 as well.  Probably just a matter of changing
> > > RK3399_BAUDRATE in plat/rockchip/rk3399/rk3399_def.h.
> >
> > OK, did that.
> > Here are the results:
> >
> > v2018.01
> > U-Boot SPL board init"Synchronous Abort" handler, esr 0x00070000
> > ELR:     e2030000a891a6e4
> > "Synchronous Abort" handler, esr 0x
> >
> > v2018.03
> > U-Boot SPL board init"Synchronous Abort" handler, esr 0xffff0000
> > elr: 00000000ff8ca6fc lr : ffff0000ffffa7bc
> > "Synchronous Abort" handler, esr 0x
> >
> > v2018.05
> > U-Boot SPL board init"Synchronous Abort" handler, esr 0x00070000
> > elr: 00000000ff8ca7a4 lr : 00000000ff8ca864
> > "Synchronous Abort" handler, esr 0x
> >
> > v2018.07
> > U-Boot SPL board init"Synchronous Abort" handler, esr 0xff000000
> > elr: 00000000ff8ca8f0 lr : 00000000ff8ca9b0
> > "Synchronous Abort" handler, esr 0x
> >
> > v2018.09
> > U-Boot SPL board init
> > (no more output)
> >
> > mainline:
> > U-Boot SPL board init
> > (no more output)
> >
> >
> > It died when I call printf() at the start of board_init_r(). If I put
> > printf() anywhere inside spl_relocate_stack_gd() it is happy. Also
> > putc() works OK. So perhaps the code that calls that function is doing
> > something wrong? Some sort of stack problem?
>
> Strange.  This is what I get
>
> U-Boot SPL board init
> Trying to boot from MMC1
> NOTICE:  BL31: v2.0(debug):2.0
> NOTICE:  BL31: Built : 12:46:24, Oct 21 2018
> INFO:    GICv3 with legacy support detected. ARM GICV3 driver initialized in EL3
> INFO:    plat_rockchip_pmu_init(1593): pd status 3e
> INFO:    BL31: Initializing runtime services
> INFO:    BL31: cortex_a53: CPU workaround for 855873 was applied
> INFO:    BL31: Preparing for EL3 exit to normal world
> INFO:    Entry point address = 0x200000
> INFO:    SPSR = 0x3c9
>
>
> U-Boot 2019.01-rc2-00127-g08337cd648-dirty (Jan 04 2019 - 19:31:14 +0100)
>
> Model: Firefly-RK3399 Board
> ...
>
>
> That is *with* the dts diff (see below) though.  Without that diff, it
> hangs after:
>
> U-Boot SPL board init
> Trying to boot from MMC2
>
>
> So obviously that diff is needed to boot properly from uSD.  I'll send
> out a git patch with a proper commit messages in a bit.

Yes I have the diff. What toolchain version are you using?

Regards,
Simon

>
> Cheers,
>
> Mark
>
>
> diff --git a/arch/arm/dts/rk3399-firefly.dts b/arch/arm/dts/rk3399-firefly.dts
> index be350866a7..f90e7e88db 100644
> --- a/arch/arm/dts/rk3399-firefly.dts
> +++ b/arch/arm/dts/rk3399-firefly.dts
> @@ -15,7 +15,7 @@
>
>         chosen {
>                 stdout-path = &uart2;
> -               u-boot,spl-boot-order = &sdhci, &sdmmc;
> +               u-boot,spl-boot-order = "same-as-spl", &sdhci, &sdmmc;
>         };
>
>         backlight: backlight {
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Mark Kettenis-2
> From: Simon Glass <[hidden email]>
> Date: Fri, 4 Jan 2019 13:12:58 -0700
>
> Hi Mark,
>
> On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:
> > So obviously that diff is needed to boot properly from uSD.  I'll send
> > out a git patch with a proper commit messages in a bit.
>
> Yes I have the diff. What toolchain version are you using?

I'm using the following OpenBSD packages:

aarch64-none-elf-binutils-2.27p0
aarch64-none-elf-gcc-linaro-6.3.2017.02p3

which is binutils 2.27 and the Linaro GCC 6.3.2017.02 with minimal
patches to get them to build on OpenBSD.

Cheers,

Mark
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Simon Glass-3
Hi Mark,

On Fri, 4 Jan 2019 at 13:29, Mark Kettenis <[hidden email]> wrote:

>
> > From: Simon Glass <[hidden email]>
> > Date: Fri, 4 Jan 2019 13:12:58 -0700
> >
> > Hi Mark,
> >
> > On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:
> > > So obviously that diff is needed to boot properly from uSD.  I'll send
> > > out a git patch with a proper commit messages in a bit.
> >
> > Yes I have the diff. What toolchain version are you using?
>
> I'm using the following OpenBSD packages:
>
> aarch64-none-elf-binutils-2.27p0
> aarch64-none-elf-gcc-linaro-6.3.2017.02p3
>
> which is binutils 2.27 and the Linaro GCC 6.3.2017.02 with minimal
> patches to get them to build on OpenBSD.

OK thank you. I'll try again when I get back. Something funny is going on.

Regards,
Simon
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Simon Glass-3
Hi Mark,

On Fri, 4 Jan 2019 at 13:43, Simon Glass <[hidden email]> wrote:

>
> Hi Mark,
>
> On Fri, 4 Jan 2019 at 13:29, Mark Kettenis <[hidden email]> wrote:
> >
> > > From: Simon Glass <[hidden email]>
> > > Date: Fri, 4 Jan 2019 13:12:58 -0700
> > >
> > > Hi Mark,
> > >
> > > On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:
> > > > So obviously that diff is needed to boot properly from uSD.  I'll send
> > > > out a git patch with a proper commit messages in a bit.
> > >
> > > Yes I have the diff. What toolchain version are you using?
> >
> > I'm using the following OpenBSD packages:
> >
> > aarch64-none-elf-binutils-2.27p0
> > aarch64-none-elf-gcc-linaro-6.3.2017.02p3
> >
> > which is binutils 2.27 and the Linaro GCC 6.3.2017.02 with minimal
> > patches to get them to build on OpenBSD.
>
> OK thank you. I'll try again when I get back. Something funny is going on.

I pushed my tree to u-boot-dm/rk-working

export ARCH=arm
CROSS_COMPILE=/opt/linaro/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
O=/tmp/b/firefly-rk3399

/tmp/b/firefly-rk3399> ln -s
~/cosarm/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf

make -s firefly-rk3399_defconfig && make -s -j16 && make -s u-boot.itb
&& /tmp/b/firefly-rk3399/tools/mkimage -n rk3399 -T rksd -d
/tmp/b/firefly-rk3399/spl/u-boot-spl.bin idbspl.img && sudo dd
if=idbspl.img of=/dev/sdb seek=64 && sudo dd
if=/tmp/b/firefly-rk3399/u-boot.itb of=/dev/sdb seek=16384 && sync

Output is

U-Boot SPL board init
abc.d123456 7fe90

at which point it hangs.

Hopefully I've done something silly in the setup. Any chance you could
share your image?

Thanks for your help. I am sure I had the board running at one point.

Regards,
Simon
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Simon Glass-3
Hi Mark,

On Fri, 4 Jan 2019 at 20:35, Simon Glass <[hidden email]> wrote:

>
> Hi Mark,
>
> On Fri, 4 Jan 2019 at 13:43, Simon Glass <[hidden email]> wrote:
> >
> > Hi Mark,
> >
> > On Fri, 4 Jan 2019 at 13:29, Mark Kettenis <[hidden email]> wrote:
> > >
> > > > From: Simon Glass <[hidden email]>
> > > > Date: Fri, 4 Jan 2019 13:12:58 -0700
> > > >
> > > > Hi Mark,
> > > >
> > > > On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:
> > > > > So obviously that diff is needed to boot properly from uSD.  I'll send
> > > > > out a git patch with a proper commit messages in a bit.
> > > >
> > > > Yes I have the diff. What toolchain version are you using?
> > >
> > > I'm using the following OpenBSD packages:
> > >
> > > aarch64-none-elf-binutils-2.27p0
> > > aarch64-none-elf-gcc-linaro-6.3.2017.02p3
> > >
> > > which is binutils 2.27 and the Linaro GCC 6.3.2017.02 with minimal
> > > patches to get them to build on OpenBSD.
> >
> > OK thank you. I'll try again when I get back. Something funny is going on.
>
> I pushed my tree to u-boot-dm/rk-working
>
> export ARCH=arm
> CROSS_COMPILE=/opt/linaro/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
> O=/tmp/b/firefly-rk3399
>
> /tmp/b/firefly-rk3399> ln -s
> ~/cosarm/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
>
> make -s firefly-rk3399_defconfig && make -s -j16 && make -s u-boot.itb
> && /tmp/b/firefly-rk3399/tools/mkimage -n rk3399 -T rksd -d
> /tmp/b/firefly-rk3399/spl/u-boot-spl.bin idbspl.img && sudo dd
> if=idbspl.img of=/dev/sdb seek=64 && sudo dd
> if=/tmp/b/firefly-rk3399/u-boot.itb of=/dev/sdb seek=16384 && sync
>
> Output is
>
> U-Boot SPL board init
> abc.d123456 7fe90
>
> at which point it hangs.
>
> Hopefully I've done something silly in the setup. Any chance you could
> share your image?
>
> Thanks for your help. I am sure I had the board running at one point.

Thanks for the image - I tried it with the same result. I think my
board is 4GB - perhaps there is a memory init problem still?

Regards,
Simon
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Mark Kettenis-2
> From: Simon Glass <[hidden email]>
> Date: Sat, 5 Jan 2019 08:56:07 -0700
>
> Hi Mark,
>
> On Fri, 4 Jan 2019 at 20:35, Simon Glass <[hidden email]> wrote:
> >
> > Hi Mark,
> >
> > On Fri, 4 Jan 2019 at 13:43, Simon Glass <[hidden email]> wrote:
> > >
> > > Hi Mark,
> > >
> > > On Fri, 4 Jan 2019 at 13:29, Mark Kettenis <[hidden email]> wrote:
> > > >
> > > > > From: Simon Glass <[hidden email]>
> > > > > Date: Fri, 4 Jan 2019 13:12:58 -0700
> > > > >
> > > > > Hi Mark,
> > > > >
> > > > > On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:
> > > > > > So obviously that diff is needed to boot properly from uSD.  I'll send
> > > > > > out a git patch with a proper commit messages in a bit.
> > > > >
> > > > > Yes I have the diff. What toolchain version are you using?
> > > >
> > > > I'm using the following OpenBSD packages:
> > > >
> > > > aarch64-none-elf-binutils-2.27p0
> > > > aarch64-none-elf-gcc-linaro-6.3.2017.02p3
> > > >
> > > > which is binutils 2.27 and the Linaro GCC 6.3.2017.02 with minimal
> > > > patches to get them to build on OpenBSD.
> > >
> > > OK thank you. I'll try again when I get back. Something funny is going on.
> >
> > I pushed my tree to u-boot-dm/rk-working
> >
> > export ARCH=arm
> > CROSS_COMPILE=/opt/linaro/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
> > O=/tmp/b/firefly-rk3399
> >
> > /tmp/b/firefly-rk3399> ln -s
> > ~/cosarm/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
> >
> > make -s firefly-rk3399_defconfig && make -s -j16 && make -s u-boot.itb
> > && /tmp/b/firefly-rk3399/tools/mkimage -n rk3399 -T rksd -d
> > /tmp/b/firefly-rk3399/spl/u-boot-spl.bin idbspl.img && sudo dd
> > if=idbspl.img of=/dev/sdb seek=64 && sudo dd
> > if=/tmp/b/firefly-rk3399/u-boot.itb of=/dev/sdb seek=16384 && sync
> >
> > Output is
> >
> > U-Boot SPL board init
> > abc.d123456 7fe90
> >
> > at which point it hangs.
> >
> > Hopefully I've done something silly in the setup. Any chance you could
> > share your image?
> >
> > Thanks for your help. I am sure I had the board running at one point.
>
> Thanks for the image - I tried it with the same result. I think my
> board is 4GB - perhaps there is a memory init problem still?

Not inconceivable.  My board indeed only has 2GB.
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399

Simon Glass-3
Hi Mark,

On Sat, 5 Jan 2019 at 09:05, Mark Kettenis <[hidden email]> wrote:

>
> > From: Simon Glass <[hidden email]>
> > Date: Sat, 5 Jan 2019 08:56:07 -0700
> >
> > Hi Mark,
> >
> > On Fri, 4 Jan 2019 at 20:35, Simon Glass <[hidden email]> wrote:
> > >
> > > Hi Mark,
> > >
> > > On Fri, 4 Jan 2019 at 13:43, Simon Glass <[hidden email]> wrote:
> > > >
> > > > Hi Mark,
> > > >
> > > > On Fri, 4 Jan 2019 at 13:29, Mark Kettenis <[hidden email]> wrote:
> > > > >
> > > > > > From: Simon Glass <[hidden email]>
> > > > > > Date: Fri, 4 Jan 2019 13:12:58 -0700
> > > > > >
> > > > > > Hi Mark,
> > > > > >
> > > > > > On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:
> > > > > > > So obviously that diff is needed to boot properly from uSD.  I'll send
> > > > > > > out a git patch with a proper commit messages in a bit.
> > > > > >
> > > > > > Yes I have the diff. What toolchain version are you using?
> > > > >
> > > > > I'm using the following OpenBSD packages:
> > > > >
> > > > > aarch64-none-elf-binutils-2.27p0
> > > > > aarch64-none-elf-gcc-linaro-6.3.2017.02p3
> > > > >
> > > > > which is binutils 2.27 and the Linaro GCC 6.3.2017.02 with minimal
> > > > > patches to get them to build on OpenBSD.
> > > >
> > > > OK thank you. I'll try again when I get back. Something funny is going on.
> > >
> > > I pushed my tree to u-boot-dm/rk-working
> > >
> > > export ARCH=arm
> > > CROSS_COMPILE=/opt/linaro/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
> > > O=/tmp/b/firefly-rk3399
> > >
> > > /tmp/b/firefly-rk3399> ln -s
> > > ~/cosarm/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
> > >
> > > make -s firefly-rk3399_defconfig && make -s -j16 && make -s u-boot.itb
> > > && /tmp/b/firefly-rk3399/tools/mkimage -n rk3399 -T rksd -d
> > > /tmp/b/firefly-rk3399/spl/u-boot-spl.bin idbspl.img && sudo dd
> > > if=idbspl.img of=/dev/sdb seek=64 && sudo dd
> > > if=/tmp/b/firefly-rk3399/u-boot.itb of=/dev/sdb seek=16384 && sync
> > >
> > > Output is
> > >
> > > U-Boot SPL board init
> > > abc.d123456 7fe90
> > >
> > > at which point it hangs.
> > >
> > > Hopefully I've done something silly in the setup. Any chance you could
> > > share your image?
> > >
> > > Thanks for your help. I am sure I had the board running at one point.
> >
> > Thanks for the image - I tried it with the same result. I think my
> > board is 4GB - perhaps there is a memory init problem still?
>
> Not inconceivable.  My board indeed only has 2GB.

OK thanks. Oddly I got this running on Bob which also has 4GB and did
not have this problem.

Regards,
Simon
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399[Please note, mail behalf by sjg@google.com]

Kever Yang
Hi Simon,


On 01/08/2019 08:38 AM, Simon Glass wrote:

> Hi Mark,
>
> On Sat, 5 Jan 2019 at 09:05, Mark Kettenis <[hidden email]> wrote:
>>> From: Simon Glass <[hidden email]>
>>> Date: Sat, 5 Jan 2019 08:56:07 -0700
>>>
>>> Hi Mark,
>>>
>>> On Fri, 4 Jan 2019 at 20:35, Simon Glass <[hidden email]> wrote:
>>>> Hi Mark,
>>>>
>>>> On Fri, 4 Jan 2019 at 13:43, Simon Glass <[hidden email]> wrote:
>>>>> Hi Mark,
>>>>>
>>>>> On Fri, 4 Jan 2019 at 13:29, Mark Kettenis <[hidden email]> wrote:
>>>>>>> From: Simon Glass <[hidden email]>
>>>>>>> Date: Fri, 4 Jan 2019 13:12:58 -0700
>>>>>>>
>>>>>>> Hi Mark,
>>>>>>>
>>>>>>> On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:
>>>>>>>> So obviously that diff is needed to boot properly from uSD.  I'll send
>>>>>>>> out a git patch with a proper commit messages in a bit.
>>>>>>> Yes I have the diff. What toolchain version are you using?
>>>>>> I'm using the following OpenBSD packages:
>>>>>>
>>>>>> aarch64-none-elf-binutils-2.27p0
>>>>>> aarch64-none-elf-gcc-linaro-6.3.2017.02p3
>>>>>>
>>>>>> which is binutils 2.27 and the Linaro GCC 6.3.2017.02 with minimal
>>>>>> patches to get them to build on OpenBSD.
>>>>> OK thank you. I'll try again when I get back. Something funny is going on.
>>>> I pushed my tree to u-boot-dm/rk-working
>>>>
>>>> export ARCH=arm
>>>> CROSS_COMPILE=/opt/linaro/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
>>>> O=/tmp/b/firefly-rk3399
>>>>
>>>> /tmp/b/firefly-rk3399> ln -s
>>>> ~/cosarm/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
>>>>
>>>> make -s firefly-rk3399_defconfig && make -s -j16 && make -s u-boot.itb
>>>> && /tmp/b/firefly-rk3399/tools/mkimage -n rk3399 -T rksd -d
>>>> /tmp/b/firefly-rk3399/spl/u-boot-spl.bin idbspl.img && sudo dd
>>>> if=idbspl.img of=/dev/sdb seek=64 && sudo dd
>>>> if=/tmp/b/firefly-rk3399/u-boot.itb of=/dev/sdb seek=16384 && sync
>>>>
>>>> Output is
>>>>
>>>> U-Boot SPL board init
>>>> abc.d123456 7fe90
>>>>
>>>> at which point it hangs.
>>>>
>>>> Hopefully I've done something silly in the setup. Any chance you could
>>>> share your image?
>>>>
>>>> Thanks for your help. I am sure I had the board running at one point.
>>> Thanks for the image - I tried it with the same result. I think my
>>> board is 4GB - perhaps there is a memory init problem still?
>> Not inconceivable.  My board indeed only has 2GB.
> OK thanks. Oddly I got this running on Bob which also has 4GB and did
> not have this problem.

For 4GB ddr3, maybe you need to use
arch/arm/dts/rk3399-sdram-ddr3-4G-1600.dtsi,
and you can turn on DEBUG so that we can confirm if hang in dram init
driver.

Thanks,
- Kever
> Regards,
> Simon
>



_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: Booting on RK3399[Please note, mail behalf by sjg@google.com]

Simon Glass-3
Hi Kever,

On Mon, 7 Jan 2019 at 23:38, Kever Yang <[hidden email]> wrote:

>
> Hi Simon,
>
>
> On 01/08/2019 08:38 AM, Simon Glass wrote:
> > Hi Mark,
> >
> > On Sat, 5 Jan 2019 at 09:05, Mark Kettenis <[hidden email]> wrote:
> >>> From: Simon Glass <[hidden email]>
> >>> Date: Sat, 5 Jan 2019 08:56:07 -0700
> >>>
> >>> Hi Mark,
> >>>
> >>> On Fri, 4 Jan 2019 at 20:35, Simon Glass <[hidden email]> wrote:
> >>>> Hi Mark,
> >>>>
> >>>> On Fri, 4 Jan 2019 at 13:43, Simon Glass <[hidden email]> wrote:
> >>>>> Hi Mark,
> >>>>>
> >>>>> On Fri, 4 Jan 2019 at 13:29, Mark Kettenis <[hidden email]> wrote:
> >>>>>>> From: Simon Glass <[hidden email]>
> >>>>>>> Date: Fri, 4 Jan 2019 13:12:58 -0700
> >>>>>>>
> >>>>>>> Hi Mark,
> >>>>>>>
> >>>>>>> On Fri, 4 Jan 2019 at 12:43, Mark Kettenis <[hidden email]> wrote:
> >>>>>>>> So obviously that diff is needed to boot properly from uSD.  I'll send
> >>>>>>>> out a git patch with a proper commit messages in a bit.
> >>>>>>> Yes I have the diff. What toolchain version are you using?
> >>>>>> I'm using the following OpenBSD packages:
> >>>>>>
> >>>>>> aarch64-none-elf-binutils-2.27p0
> >>>>>> aarch64-none-elf-gcc-linaro-6.3.2017.02p3
> >>>>>>
> >>>>>> which is binutils 2.27 and the Linaro GCC 6.3.2017.02 with minimal
> >>>>>> patches to get them to build on OpenBSD.
> >>>>> OK thank you. I'll try again when I get back. Something funny is going on.
> >>>> I pushed my tree to u-boot-dm/rk-working
> >>>>
> >>>> export ARCH=arm
> >>>> CROSS_COMPILE=/opt/linaro/gcc-linaro-6.3.1-2017.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
> >>>> O=/tmp/b/firefly-rk3399
> >>>>
> >>>> /tmp/b/firefly-rk3399> ln -s
> >>>> ~/cosarm/arm-trusted-firmware/build/rk3399/release/bl31/bl31.elf
> >>>>
> >>>> make -s firefly-rk3399_defconfig && make -s -j16 && make -s u-boot.itb
> >>>> && /tmp/b/firefly-rk3399/tools/mkimage -n rk3399 -T rksd -d
> >>>> /tmp/b/firefly-rk3399/spl/u-boot-spl.bin idbspl.img && sudo dd
> >>>> if=idbspl.img of=/dev/sdb seek=64 && sudo dd
> >>>> if=/tmp/b/firefly-rk3399/u-boot.itb of=/dev/sdb seek=16384 && sync
> >>>>
> >>>> Output is
> >>>>
> >>>> U-Boot SPL board init
> >>>> abc.d123456 7fe90
> >>>>
> >>>> at which point it hangs.
> >>>>
> >>>> Hopefully I've done something silly in the setup. Any chance you could
> >>>> share your image?
> >>>>
> >>>> Thanks for your help. I am sure I had the board running at one point.
> >>> Thanks for the image - I tried it with the same result. I think my
> >>> board is 4GB - perhaps there is a memory init problem still?
> >> Not inconceivable.  My board indeed only has 2GB.
> > OK thanks. Oddly I got this running on Bob which also has 4GB and did
> > not have this problem.
>
> For 4GB ddr3, maybe you need to use
> arch/arm/dts/rk3399-sdram-ddr3-4G-1600.dtsi,
> and you can turn on DEBUG so that we can confirm if hang in dram init
> driver.

OK thank you, will try. It really should select the correct one automatically.

BTW your email came through as a new one, not a reply to the original.
Is there something wrong with you config?

Regards,
Simon
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
12