Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-27 Thread Paweł Jarosz



W dniu 27.09.2017 o 09:46, Andy Yan pisze:

Hi Pawel:


On 2017年09月27日 14:55, Paweł Jarosz wrote:

Hi,


W dniu 27.09.2017 o 03:48, Andy Yan pisze:

Hi Pawel:


On 2017年09月26日 19:34, Paweł Jarosz wrote:

Hi,


W dniu 25.09.2017 o 12:29, Heiko Stübner pisze:

Hi Andy,

Am Montag, 25. September 2017, 17:45:03 CEST schrieb Andy Yan:

On 2017年09月22日 13:56, Heiko Stuebner wrote:

Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:

Hi Heiko:

On 2017年09月22日 08:24, Andy Yan wrote:

Hi Heiko:

On 2017年09月21日 22:55, Heiko Stübner wrote:

Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy 
Yan:

Hi Heiko:
I try to boot the upstream u-boot-rockchip branch on my 
rk3188 board

with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and
SARADC_ROCKCHIP
on supported SoCs") Do you ever meet something like this?

that is very strange. When testing Philipp's branch, I was also
testing the
commit you mention to see if anything broke since I last 
changed u-boot
on my radxa rock. And the above commit started just fine, 
when starting

from an sd-card.

Not sure from which medium you're starting though. But from 
what I
remember Pawel got nand working in his rk3066 series, but 
that is not

yet merged.


  I boot from emmc, I will go on hack on it.
   I finally can boot it with the rock_defconfig. But the 
way to


package the tpl spl u-boot a little different.

   cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
   truncate -s 1020 tplspl.bin
    sed -i "/^/{1s/^/RK31/}" tplspl.bin
  cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
  truncate -s %2048 spl.bin
  cat spl.bin >> tplspl.bin
    Then the tplspl.bin + u-boot.bin should package by

boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) 
from


rockchip downstream u-boot repo:
  ./tools/boot_merger 
./tools/rk_tools/RKBOOT/RK310BMINIALL.ini
    download to emmc by "upgrade_tool ul" command. 
According to our


bootrom code author, the rk31(maybe include rk30) bootrom has a
limitation that the idbblock
couldn't accessed by upgrade_tool wl command.
I do have a script handling that [0]. At least for the sd-card 
variant
a simple "openssl rc4" works just as well as the legacy 
boot_merger :-)


Heiko

[0]
https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082ccf 


556e818f46ad9df

 Is there a way to download the out that generated by[0] to
emmc/flash? It seems that the upgrate_tool can't access 0x40 of the
emmc/nand on rk3188.

you have the @rock-chips.com address, so I'd guess you might even 
have

the better resources to find out ;-)  .

In any case, as I said I haven't looked at all at the internal 
storage on

my radxarock so far.

But as the rk3066 and rk3188 are so similar I've added Paweł.

@Paweł: you had uboot starting from nand on your rk3066 board, 
maybe you
could describe how you wrote it to the board so maybe Andy can 
check if

he needs to adapt anything?
Almost all knowledge i had about rk3066 boot process was from Heiko 
and bootrom disassembly.


Andy, do you have any output on serial console ? (TPL, Uboot-spl or 
anything else)
Can you compile u-boot with #define DEBUG in rk3188_common and send 
the output?


    Here is my console output [1] that boot from a nand on rk3188 
board.
But I found that the board will reset again and again in spl stage 
if I defined DEBUG in rk3188_common [2]



Also you can check size of u-boot tpl (less than 1kb), u-boot spl + 
tpl (less than sram size on rk3188, i think it's 32KB)? This is 
important as you wont get any output on serial console if you don't 
meet this conditions.
Also on rk3066 bootmerger FlashBoot size + FlashData size should be 
less than 256KB (32KB for FlashData, and the rest for FlashBoot, if 
it's more than 256KB, you get few lines of errors when flashing 
with upgrade_tool and might have no output on serial console)


Bellow is my binary blob size. And I got a knowledge that the safe 
size of  FlashBoot  + FlashData shoud be less than 128kb(some 
flashed can up to 256, but some may not).


-rwxrwxr-x 1 andy andy 788  u-boot-tpl.bin
-rwxrwxr-x 1 andy andy 15956 u-boot-spl.bin
-rw-rw-r-- 1 andy andy 98249 u-boot.bin



Size of binaries looks good.
You should flash u-boot-dtb.bin not u-boot.bin


   u-boot-dtb.bin has the same size as u-boot.bin, so I think they are 
the same.





One more thing ... to boot from usb with openssl rc4 method on 
rk3066 i think only one back to bootrom is needed, two if you are 
booting from nand.



[1]
tpl-1
Returning to boot ROM...
tpl-2
spl
first data training fail!

U-Boot SPL 2017.09-00107-g99c4c38-dirty (Sep 27 2017 - 08:46:48)
Returning to boot ROM...


U-Boot 2017.09-00107-g99c4c38-dirty (Sep 27 2017 - 08:46:48 +0800)

Model: Radxa Rock
DRAM:  2 GiB
MMC:
MMC Device 0 not found
*** Warning - 

Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-27 Thread Andy Yan

Hi Pawel:


On 2017年09月27日 14:55, Paweł Jarosz wrote:

Hi,


W dniu 27.09.2017 o 03:48, Andy Yan pisze:

Hi Pawel:


On 2017年09月26日 19:34, Paweł Jarosz wrote:

Hi,


W dniu 25.09.2017 o 12:29, Heiko Stübner pisze:

Hi Andy,

Am Montag, 25. September 2017, 17:45:03 CEST schrieb Andy Yan:

On 2017年09月22日 13:56, Heiko Stuebner wrote:

Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:

Hi Heiko:

On 2017年09月22日 08:24, Andy Yan wrote:

Hi Heiko:

On 2017年09月21日 22:55, Heiko Stübner wrote:

Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy 
Yan:

Hi Heiko:
I try to boot the upstream u-boot-rockchip branch on my 
rk3188 board

with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and
SARADC_ROCKCHIP
on supported SoCs") Do you ever meet something like this?

that is very strange. When testing Philipp's branch, I was also
testing the
commit you mention to see if anything broke since I last 
changed u-boot
on my radxa rock. And the above commit started just fine, when 
starting

from an sd-card.

Not sure from which medium you're starting though. But from 
what I
remember Pawel got nand working in his rk3066 series, but that 
is not

yet merged.


  I boot from emmc, I will go on hack on it.
   I finally can boot it with the rock_defconfig. But the 
way to


package the tpl spl u-boot a little different.

   cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
   truncate -s 1020 tplspl.bin
    sed -i "/^/{1s/^/RK31/}" tplspl.bin
  cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
  truncate -s %2048 spl.bin
  cat spl.bin >> tplspl.bin
    Then the tplspl.bin + u-boot.bin should package by

boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) 
from


rockchip downstream u-boot repo:
  ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini
    download to emmc by "upgrade_tool ul" command. 
According to our


bootrom code author, the rk31(maybe include rk30) bootrom has a
limitation that the idbblock
couldn't accessed by upgrade_tool wl command.
I do have a script handling that [0]. At least for the sd-card 
variant
a simple "openssl rc4" works just as well as the legacy 
boot_merger :-)


Heiko

[0]
https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082ccf 


556e818f46ad9df

 Is there a way to download the out that generated by[0] to
emmc/flash? It seems that the upgrate_tool can't access 0x40 of the
emmc/nand on rk3188.

you have the @rock-chips.com address, so I'd guess you might even 
have

the better resources to find out ;-)  .

In any case, as I said I haven't looked at all at the internal 
storage on

my radxarock so far.

But as the rk3066 and rk3188 are so similar I've added Paweł.

@Paweł: you had uboot starting from nand on your rk3066 board, 
maybe you
could describe how you wrote it to the board so maybe Andy can 
check if

he needs to adapt anything?
Almost all knowledge i had about rk3066 boot process was from Heiko 
and bootrom disassembly.


Andy, do you have any output on serial console ? (TPL, Uboot-spl or 
anything else)
Can you compile u-boot with #define DEBUG in rk3188_common and send 
the output?


    Here is my console output [1] that boot from a nand on rk3188 board.
But I found that the board will reset again and again in spl stage if 
I defined DEBUG in rk3188_common [2]



Also you can check size of u-boot tpl (less than 1kb), u-boot spl + 
tpl (less than sram size on rk3188, i think it's 32KB)? This is 
important as you wont get any output on serial console if you don't 
meet this conditions.
Also on rk3066 bootmerger FlashBoot size + FlashData size should be 
less than 256KB (32KB for FlashData, and the rest for FlashBoot, if 
it's more than 256KB, you get few lines of errors when flashing with 
upgrade_tool and might have no output on serial console)


Bellow is my binary blob size. And I got a knowledge that the safe 
size of  FlashBoot  + FlashData shoud be less than 128kb(some flashed 
can up to 256, but some may not).


-rwxrwxr-x 1 andy andy 788  u-boot-tpl.bin
-rwxrwxr-x 1 andy andy 15956 u-boot-spl.bin
-rw-rw-r-- 1 andy andy 98249 u-boot.bin



Size of binaries looks good.
You should flash u-boot-dtb.bin not u-boot.bin


   u-boot-dtb.bin has the same size as u-boot.bin, so I think they are 
the same.





One more thing ... to boot from usb with openssl rc4 method on 
rk3066 i think only one back to bootrom is needed, two if you are 
booting from nand.



[1]
tpl-1
Returning to boot ROM...
tpl-2
spl
first data training fail!

U-Boot SPL 2017.09-00107-g99c4c38-dirty (Sep 27 2017 - 08:46:48)
Returning to boot ROM...


U-Boot 2017.09-00107-g99c4c38-dirty (Sep 27 2017 - 08:46:48 +0800)

Model: Radxa Rock
DRAM:  2 GiB
MMC:
MMC Device 0 not found
*** Warning - No MMC card found, using default environment

In: 

Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-27 Thread Paweł Jarosz

Hi,


W dniu 27.09.2017 o 03:48, Andy Yan pisze:

Hi Pawel:


On 2017年09月26日 19:34, Paweł Jarosz wrote:

Hi,


W dniu 25.09.2017 o 12:29, Heiko Stübner pisze:

Hi Andy,

Am Montag, 25. September 2017, 17:45:03 CEST schrieb Andy Yan:

On 2017年09月22日 13:56, Heiko Stuebner wrote:

Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:

Hi Heiko:

On 2017年09月22日 08:24, Andy Yan wrote:

Hi Heiko:

On 2017年09月21日 22:55, Heiko Stübner wrote:

Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:

Hi Heiko:
I try to boot the upstream u-boot-rockchip branch on my rk3188 
board

with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and
SARADC_ROCKCHIP
on supported SoCs") Do you ever meet something like this?

that is very strange. When testing Philipp's branch, I was also
testing the
commit you mention to see if anything broke since I last 
changed u-boot
on my radxa rock. And the above commit started just fine, when 
starting

from an sd-card.

Not sure from which medium you're starting though. But from what I
remember Pawel got nand working in his rk3066 series, but that 
is not

yet merged.


  I boot from emmc, I will go on hack on it.

   I finally can boot it with the rock_defconfig. But the way to

package the tpl spl u-boot a little different.

   cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
   truncate -s 1020 tplspl.bin
    sed -i "/^/{1s/^/RK31/}" tplspl.bin
  cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
  truncate -s %2048 spl.bin
  cat spl.bin >> tplspl.bin
    Then the tplspl.bin + u-boot.bin should package by

boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) from

rockchip downstream u-boot repo:
  ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini
    download to emmc by "upgrade_tool ul" command. 
According to our


bootrom code author, the rk31(maybe include rk30) bootrom has a
limitation that the idbblock
couldn't accessed by upgrade_tool wl command.
I do have a script handling that [0]. At least for the sd-card 
variant
a simple "openssl rc4" works just as well as the legacy 
boot_merger :-)


Heiko

[0]
https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082ccf 


556e818f46ad9df

 Is there a way to download the out that generated by[0] to
emmc/flash? It seems that the upgrate_tool can't access 0x40 of the
emmc/nand on rk3188.

you have the @rock-chips.com address, so I'd guess you might even have
the better resources to find out ;-)  .

In any case, as I said I haven't looked at all at the internal 
storage on

my radxarock so far.

But as the rk3066 and rk3188 are so similar I've added Paweł.

@Paweł: you had uboot starting from nand on your rk3066 board, 
maybe you
could describe how you wrote it to the board so maybe Andy can 
check if

he needs to adapt anything?
Almost all knowledge i had about rk3066 boot process was from Heiko 
and bootrom disassembly.


Andy, do you have any output on serial console ? (TPL, Uboot-spl or 
anything else)
Can you compile u-boot with #define DEBUG in rk3188_common and send 
the output?


    Here is my console output [1] that boot from a nand on rk3188 board.
But I found that the board will reset again and again in spl stage if 
I defined DEBUG in rk3188_common [2]



Also you can check size of u-boot tpl (less than 1kb), u-boot spl + 
tpl (less than sram size on rk3188, i think it's 32KB)? This is 
important as you wont get any output on serial console if you don't 
meet this conditions.
Also on rk3066 bootmerger FlashBoot size + FlashData size should be 
less than 256KB (32KB for FlashData, and the rest for FlashBoot, if 
it's more than 256KB, you get few lines of errors when flashing with 
upgrade_tool and might have no output on serial console)


Bellow is my binary blob size. And I got a knowledge that the safe 
size of  FlashBoot  + FlashData shoud be less than 128kb(some flashed 
can up to 256, but some may not).


-rwxrwxr-x 1 andy andy 788  u-boot-tpl.bin
-rwxrwxr-x 1 andy andy 15956 u-boot-spl.bin
-rw-rw-r-- 1 andy andy 98249 u-boot.bin



Size of binaries looks good.
You should flash u-boot-dtb.bin not u-boot.bin




One more thing ... to boot from usb with openssl rc4 method on rk3066 
i think only one back to bootrom is needed, two if you are booting 
from nand.



[1]
tpl-1
Returning to boot ROM...
tpl-2
spl
first data training fail!

U-Boot SPL 2017.09-00107-g99c4c38-dirty (Sep 27 2017 - 08:46:48)
Returning to boot ROM...


U-Boot 2017.09-00107-g99c4c38-dirty (Sep 27 2017 - 08:46:48 +0800)

Model: Radxa Rock
DRAM:  2 GiB
MMC:
MMC Device 0 not found
*** Warning - No MMC card found, using default environment

In:    serial@20064000
Out:   serial@20064000
Err:   serial@20064000
Model: Radxa Rock
=>




This console output looks good ... board tries to boot 

Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-26 Thread Andy Yan

Hi Pawel:


On 2017年09月26日 19:34, Paweł Jarosz wrote:

Hi,


W dniu 25.09.2017 o 12:29, Heiko Stübner pisze:

Hi Andy,

Am Montag, 25. September 2017, 17:45:03 CEST schrieb Andy Yan:

On 2017年09月22日 13:56, Heiko Stuebner wrote:

Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:

Hi Heiko:

On 2017年09月22日 08:24, Andy Yan wrote:

Hi Heiko:

On 2017年09月21日 22:55, Heiko Stübner wrote:

Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:

Hi Heiko:
I try to boot the upstream u-boot-rockchip branch on my rk3188 
board

with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and
SARADC_ROCKCHIP
on supported SoCs") Do you ever meet something like this?

that is very strange. When testing Philipp's branch, I was also
testing the
commit you mention to see if anything broke since I last changed 
u-boot
on my radxa rock. And the above commit started just fine, when 
starting

from an sd-card.

Not sure from which medium you're starting though. But from what I
remember Pawel got nand working in his rk3066 series, but that 
is not

yet merged.


  I boot from emmc, I will go on hack on it.

   I finally can boot it with the rock_defconfig. But the way to

package the tpl spl u-boot a little different.

   cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
   truncate -s 1020 tplspl.bin
    sed -i "/^/{1s/^/RK31/}" tplspl.bin
  cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
  truncate -s %2048 spl.bin
  cat spl.bin >> tplspl.bin
    Then the tplspl.bin + u-boot.bin should package by

boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) from

rockchip downstream u-boot repo:
  ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini
    download to emmc by "upgrade_tool ul" command. 
According to our


bootrom code author, the rk31(maybe include rk30) bootrom has a
limitation that the idbblock
couldn't accessed by upgrade_tool wl command.

I do have a script handling that [0]. At least for the sd-card variant
a simple "openssl rc4" works just as well as the legacy boot_merger 
:-)


Heiko

[0]
https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082ccf 


556e818f46ad9df

 Is there a way to download the out that generated by[0] to
emmc/flash? It seems that the upgrate_tool can't access 0x40 of the
emmc/nand on rk3188.

you have the @rock-chips.com address, so I'd guess you might even have
the better resources to find out ;-)  .

In any case, as I said I haven't looked at all at the internal 
storage on

my radxarock so far.

But as the rk3066 and rk3188 are so similar I've added Paweł.

@Paweł: you had uboot starting from nand on your rk3066 board, maybe 
you

could describe how you wrote it to the board so maybe Andy can check if
he needs to adapt anything?
Almost all knowledge i had about rk3066 boot process was from Heiko 
and bootrom disassembly.


Andy, do you have any output on serial console ? (TPL, Uboot-spl or 
anything else)
Can you compile u-boot with #define DEBUG in rk3188_common and send 
the output?


    Here is my console output [1] that boot from a nand on rk3188 board.
But I found that the board will reset again and again in spl stage if I 
defined DEBUG in rk3188_common [2]



Also you can check size of u-boot tpl (less than 1kb), u-boot spl + 
tpl (less than sram size on rk3188, i think it's 32KB)? This is 
important as you wont get any output on serial console if you don't 
meet this conditions.
Also on rk3066 bootmerger FlashBoot size + FlashData size should be 
less than 256KB (32KB for FlashData, and the rest for FlashBoot, if 
it's more than 256KB, you get few lines of errors when flashing with 
upgrade_tool and might have no output on serial console)


Bellow is my binary blob size. And I got a knowledge that the safe size 
of  FlashBoot  + FlashData shoud be less than 128kb(some flashed can up 
to 256, but some may not).


-rwxrwxr-x 1 andy andy 788  u-boot-tpl.bin
-rwxrwxr-x 1 andy andy 15956 u-boot-spl.bin
-rw-rw-r-- 1 andy andy 98249 u-boot.bin



One more thing ... to boot from usb with openssl rc4 method on rk3066 
i think only one back to bootrom is needed, two if you are booting 
from nand.



[1]
tpl-1
Returning to boot ROM...
tpl-2
spl
first data training fail!

U-Boot SPL 2017.09-00107-g99c4c38-dirty (Sep 27 2017 - 08:46:48)
Returning to boot ROM...


U-Boot 2017.09-00107-g99c4c38-dirty (Sep 27 2017 - 08:46:48 +0800)

Model: Radxa Rock
DRAM:  2 GiB
MMC:
MMC Device 0 not found
*** Warning - No MMC card found, using default environment

In:    serial@20064000
Out:   serial@20064000
Err:   serial@20064000
Model: Radxa Rock
=>



[2]
tpl-1
Returning to boot ROM...
tpl-2
spl
spl_early_init()
malloc_simple: size=18, ptr=18, limit=2000: 10085ff0
malloc_simple: size=54, ptr=6c, limit=2000: 10086008
malloc_simple: 

Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-26 Thread Paweł Jarosz

Hi,


W dniu 25.09.2017 o 12:29, Heiko Stübner pisze:

Hi Andy,

Am Montag, 25. September 2017, 17:45:03 CEST schrieb Andy Yan:

On 2017年09月22日 13:56, Heiko Stuebner wrote:

Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:

Hi Heiko:

On 2017年09月22日 08:24, Andy Yan wrote:

Hi Heiko:

On 2017年09月21日 22:55, Heiko Stübner wrote:

Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:

Hi Heiko:
I try to boot the upstream u-boot-rockchip branch  on my rk3188 board
with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and
SARADC_ROCKCHIP
on supported SoCs") Do you ever meet something like this?

that is very strange. When testing Philipp's branch, I was also
testing the
commit you mention to see if anything broke since I last changed u-boot
on my radxa rock. And the above commit started just fine, when starting
from an sd-card.

Not sure from which medium you're starting though. But from what I
remember Pawel got nand working in his rk3066 series, but that is not
yet merged.


  I boot from emmc, I will go on hack on it.
  

   I finally can boot it with the rock_defconfig. But the way to

package the tpl spl u-boot a little different.

   cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
   truncate -s 1020 tplspl.bin
  
  sed -i "/^/{1s/^/RK31/}" tplspl.bin

  cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
  truncate -s %2048 spl.bin
  cat spl.bin >> tplspl.bin
  
  Then the tplspl.bin + u-boot.bin should package by


boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) from

rockchip downstream u-boot repo:
  ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini
  
  download to emmc by "upgrade_tool ul" command. According to our


bootrom code author, the rk31(maybe include rk30) bootrom has a
limitation that the idbblock
couldn't accessed by upgrade_tool wl command.

I do have a script handling that [0]. At least for the sd-card variant
a simple "openssl rc4" works just as well as the legacy boot_merger :-)

Heiko

[0]
https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082ccf
556e818f46ad9df

 Is there a way to download the out that generated by[0] to
emmc/flash? It seems that the upgrate_tool can't access 0x40 of the
emmc/nand on rk3188.

you have the @rock-chips.com address, so I'd guess you might even have
the better resources to find out ;-)  .

In any case, as I said I haven't looked at all at the internal storage on
my radxarock so far.

But as the rk3066 and rk3188 are so similar I've added Paweł.

@Paweł: you had uboot starting from nand on your rk3066 board, maybe you
could describe how you wrote it to the board so maybe Andy can check if
he needs to adapt anything?
Almost all knowledge i had about rk3066 boot process was from Heiko and 
bootrom disassembly.


Andy, do you have any output on serial console ? (TPL, Uboot-spl or 
anything else)
Can you compile u-boot with #define DEBUG in rk3188_common and send the 
output?
Also you can check size of u-boot tpl (less than 1kb), u-boot spl + tpl 
(less than sram size on rk3188, i think it's 32KB)? This is important as 
you wont get any output on serial console if you don't meet this conditions.
Also on rk3066 bootmerger FlashBoot size + FlashData size should be less 
than 256KB (32KB for FlashData, and the rest for FlashBoot, if it's more 
than 256KB, you get few lines of errors when flashing with upgrade_tool 
and might have no output on serial console)


One more thing ... to boot from usb with openssl rc4 method on rk3066 i 
think only one back to bootrom is needed, two if you are booting from nand.


Cheers
Paweł

Thanks
Heiko


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-25 Thread Heiko Stübner
Am Montag, 25. September 2017, 19:49:01 CEST schrieb Andy Yan:
> Hi Heiko:
> 
> On 2017年09月25日 18:29, Heiko Stübner wrote:
> > Hi Andy,
> > 
> > Am Montag, 25. September 2017, 17:45:03 CEST schrieb Andy Yan:
> >> On 2017年09月22日 13:56, Heiko Stuebner wrote:
> >>> Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:
>  Hi Heiko:
>  
>  On 2017年09月22日 08:24, Andy Yan wrote:
> > Hi Heiko:
> > 
> > On 2017年09月21日 22:55, Heiko Stübner wrote:
> >> Hi Andy,
> >> 
> >> Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:
> >>> Hi Heiko:
> >>> I try to boot the upstream u-boot-rockchip branch  on my rk3188
> >>> board
> >>> with(rock_defconfig)
> >>> 
> >>> But I got this error:
> >>> early_init()
> >>> nit_and_scan() returned error -22
> >>> early_init() failed: -22
> >>> ERROR ### Please RESET the board ###
> >>> 
> >>> the current commit head is: 782088d("rockchip: imply ADC and
> >>> SARADC_ROCKCHIP
> >>> on supported SoCs") Do you ever meet something like this?
> >> 
> >> that is very strange. When testing Philipp's branch, I was also
> >> testing the
> >> commit you mention to see if anything broke since I last changed
> >> u-boot
> >> on my radxa rock. And the above commit started just fine, when
> >> starting
> >> from an sd-card.
> >> 
> >> Not sure from which medium you're starting though. But from what I
> >> remember Pawel got nand working in his rk3066 series, but that is not
> >> yet merged.
> >> 
> >   I boot from emmc, I will go on hack on it.
> >   
> I finally can boot it with the rock_defconfig. But the way to
>  
>  package the tpl spl u-boot a little different.
>  
> cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
> truncate -s 1020 tplspl.bin
>    
>    sed -i "/^/{1s/^/RK31/}" tplspl.bin
>    cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
>    truncate -s %2048 spl.bin
>    cat spl.bin >> tplspl.bin
>    
>    Then the tplspl.bin + u-boot.bin should package by
>  
>  boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) from
>  
>  rockchip downstream u-boot repo:
>    ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini
>    
>    download to emmc by "upgrade_tool ul" command. According to our
>  
>  bootrom code author, the rk31(maybe include rk30) bootrom has a
>  limitation that the idbblock
>  couldn't accessed by upgrade_tool wl command.
> >>> 
> >>> I do have a script handling that [0]. At least for the sd-card variant
> >>> a simple "openssl rc4" works just as well as the legacy boot_merger :-)
> >>> 
> >>> Heiko
> >>> 
> >>> [0]
> >>> https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082cc
> >>> f
> >>> 556e818f46ad9df
> >>> 
> >>  Is there a way to download the out that generated by[0] to
> >> 
> >> emmc/flash? It seems that the upgrate_tool can't access 0x40 of the
> >> emmc/nand on rk3188.
> > 
> > you have the @rock-chips.com address, so I'd guess you might even have
> > the better resources to find out ;-)  .
> 
> Actually, as I mail last week, I can download  the image packaged by
> boot_merge (with ddr bin from rockchip as 471 and rk30usbplug as 472,
> tplspl as Flashdata u-boot.bing as Flashboot) to nand/emmc.
> 
> When you mentioned your scripts, I though you have a better way.

Sadly not really, as I'm just using a sd-card in rk3188, I normally just dd 
the image to the card and everything works then.


> > In any case, as I said I haven't looked at all at the internal storage on
> > my radxarock so far.
> > 
> > But as the rk3066 and rk3188 are so similar I've added Paweł.
> > 
> > @Paweł: you had uboot starting from nand on your rk3066 board, maybe you
> > could describe how you wrote it to the board so maybe Andy can check if
> > he needs to adapt anything?
> > 
> > 
> > Thanks
> > Heiko


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-25 Thread Andy Yan

Hi Heiko:


On 2017年09月25日 18:29, Heiko Stübner wrote:

Hi Andy,

Am Montag, 25. September 2017, 17:45:03 CEST schrieb Andy Yan:

On 2017年09月22日 13:56, Heiko Stuebner wrote:

Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:

Hi Heiko:

On 2017年09月22日 08:24, Andy Yan wrote:

Hi Heiko:

On 2017年09月21日 22:55, Heiko Stübner wrote:

Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:

Hi Heiko:
I try to boot the upstream u-boot-rockchip branch  on my rk3188 board
with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and
SARADC_ROCKCHIP
on supported SoCs") Do you ever meet something like this?

that is very strange. When testing Philipp's branch, I was also
testing the
commit you mention to see if anything broke since I last changed u-boot
on my radxa rock. And the above commit started just fine, when starting
from an sd-card.

Not sure from which medium you're starting though. But from what I
remember Pawel got nand working in his rk3066 series, but that is not
yet merged.


  I boot from emmc, I will go on hack on it.
  

   I finally can boot it with the rock_defconfig. But the way to

package the tpl spl u-boot a little different.

   cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
   truncate -s 1020 tplspl.bin
  
  sed -i "/^/{1s/^/RK31/}" tplspl.bin

  cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
  truncate -s %2048 spl.bin
  cat spl.bin >> tplspl.bin
  
  Then the tplspl.bin + u-boot.bin should package by


boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) from

rockchip downstream u-boot repo:
  ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini
  
  download to emmc by "upgrade_tool ul" command. According to our


bootrom code author, the rk31(maybe include rk30) bootrom has a
limitation that the idbblock
couldn't accessed by upgrade_tool wl command.

I do have a script handling that [0]. At least for the sd-card variant
a simple "openssl rc4" works just as well as the legacy boot_merger :-)

Heiko

[0]
https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082ccf
556e818f46ad9df

 Is there a way to download the out that generated by[0] to
emmc/flash? It seems that the upgrate_tool can't access 0x40 of the
emmc/nand on rk3188.

you have the @rock-chips.com address, so I'd guess you might even have
the better resources to find out ;-)  .


   Actually, as I mail last week, I can download  the image packaged by 
boot_merge (with ddr bin from rockchip as 471 and rk30usbplug as 472, 
tplspl as Flashdata u-boot.bing as Flashboot) to nand/emmc.


When you mentioned your scripts, I though you have a better way.


In any case, as I said I haven't looked at all at the internal storage on
my radxarock so far.

But as the rk3066 and rk3188 are so similar I've added Paweł.

@Paweł: you had uboot starting from nand on your rk3066 board, maybe you
could describe how you wrote it to the board so maybe Andy can check if
he needs to adapt anything?


Thanks
Heiko






___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-25 Thread Andy Yan

Hi Heiko:


On 2017年09月22日 13:56, Heiko Stuebner wrote:

Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:

Hi Heiko:


On 2017年09月22日 08:24, Andy Yan wrote:

Hi Heiko:


On 2017年09月21日 22:55, Heiko Stübner wrote:

Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:

Hi Heiko:
I try to boot the upstream u-boot-rockchip branch  on my rk3188 board
with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and
SARADC_ROCKCHIP
on supported SoCs") Do you ever meet something like this?

that is very strange. When testing Philipp's branch, I was also
testing the
commit you mention to see if anything broke since I last changed u-boot
on my radxa rock. And the above commit started just fine, when starting
from an sd-card.

Not sure from which medium you're starting though. But from what I
remember Pawel got nand working in his rk3066 series, but that is not
yet merged.

 I boot from emmc, I will go on hack on it.

  I finally can boot it with the rock_defconfig. But the way to
package the tpl spl u-boot a little different.

  cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
  truncate -s 1020 tplspl.bin
 sed -i "/^/{1s/^/RK31/}" tplspl.bin
 cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
 truncate -s %2048 spl.bin
 cat spl.bin >> tplspl.bin

 Then the tplspl.bin + u-boot.bin should package by
boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) from
rockchip downstream u-boot repo:
 ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini

 download to emmc by "upgrade_tool ul" command. According to our
bootrom code author, the rk31(maybe include rk30) bootrom has a
limitation that the idbblock
couldn't accessed by upgrade_tool wl command.

I do have a script handling that [0]. At least for the sd-card variant
a simple "openssl rc4" works just as well as the legacy boot_merger :-)

Heiko

[0] 
https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082ccf556e818f46ad9df


   Is there a way to download the out that generated by[0] to 
emmc/flash? It seems that the upgrate_tool can't access 0x40 of the 
emmc/nand on rk3188.






___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-21 Thread Heiko Stuebner
Am Freitag, 22. September 2017, 08:50:49 CEST schrieb Andy Yan:
> Hi Heiko:
> 
> 
> On 2017年09月22日 08:24, Andy Yan wrote:
> > Hi Heiko:
> >
> >
> > On 2017年09月21日 22:55, Heiko Stübner wrote:
> >> Hi Andy,
> >>
> >> Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:
> >>> Hi Heiko:
> >>> I try to boot the upstream u-boot-rockchip branch  on my rk3188 board
> >>> with(rock_defconfig)
> >>>
> >>> But I got this error:
> >>> early_init()
> >>> nit_and_scan() returned error -22
> >>> early_init() failed: -22
> >>> ERROR ### Please RESET the board ###
> >>>
> >>> the current commit head is: 782088d("rockchip: imply ADC and 
> >>> SARADC_ROCKCHIP
> >>> on supported SoCs") Do you ever meet something like this?
> >> that is very strange. When testing Philipp's branch, I was also 
> >> testing the
> >> commit you mention to see if anything broke since I last changed u-boot
> >> on my radxa rock. And the above commit started just fine, when starting
> >> from an sd-card.
> >>
> >> Not sure from which medium you're starting though. But from what I
> >> remember Pawel got nand working in his rk3066 series, but that is not
> >> yet merged.
> >
> > I boot from emmc, I will go on hack on it.
> >>
> 
>  I finally can boot it with the rock_defconfig. But the way to 
> package the tpl spl u-boot a little different.
> 
>  cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
>  truncate -s 1020 tplspl.bin
> sed -i "/^/{1s/^/RK31/}" tplspl.bin
> cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
> truncate -s %2048 spl.bin
> cat spl.bin >> tplspl.bin
> 
> Then the tplspl.bin + u-boot.bin should package by 
> boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) from 
> rockchip downstream u-boot repo:
> ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini
> 
> download to emmc by "upgrade_tool ul" command. According to our 
> bootrom code author, the rk31(maybe include rk30) bootrom has a 
> limitation that the idbblock
> couldn't accessed by upgrade_tool wl command.

I do have a script handling that [0]. At least for the sd-card variant
a simple "openssl rc4" works just as well as the legacy boot_merger :-)

Heiko

[0] 
https://github.com/mmind/u-boot-rockchip/commit/81458bde873d6cf588e082ccf556e818f46ad9df
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-21 Thread Andy Yan

Hi Heiko:


On 2017年09月22日 08:24, Andy Yan wrote:

Hi Heiko:


On 2017年09月21日 22:55, Heiko Stübner wrote:

Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:

Hi Heiko:
I try to boot the upstream u-boot-rockchip branch  on my rk3188 board
with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and 
SARADC_ROCKCHIP

on supported SoCs") Do you ever meet something like this?
that is very strange. When testing Philipp's branch, I was also 
testing the

commit you mention to see if anything broke since I last changed u-boot
on my radxa rock. And the above commit started just fine, when starting
from an sd-card.

Not sure from which medium you're starting though. But from what I
remember Pawel got nand working in his rk3066 series, but that is not
yet merged.


    I boot from emmc, I will go on hack on it.




    I finally can boot it with the rock_defconfig. But the way to 
package the tpl spl u-boot a little different.


    cat ${DIR}/out/tpl/u-boot-tpl.bin > tplspl.bin
    truncate -s 1020 tplspl.bin
   sed -i "/^/{1s/^/RK31/}" tplspl.bin
   cat ${DIR}/out/spl/u-boot-spl.bin > spl.bin
   truncate -s %2048 spl.bin
   cat spl.bin >> tplspl.bin

   Then the tplspl.bin + u-boot.bin should package by 
boot_merger(tplsplb.in for FLashData, u-boot.bin for FlashBoot) from 
rockchip downstream u-boot repo:

   ./tools/boot_merger ./tools/rk_tools/RKBOOT/RK310BMINIALL.ini

   download to emmc by "upgrade_tool ul" command. According to our 
bootrom code author, the rk31(maybe include rk30) bootrom has a 
limitation that the idbblock

couldn't accessed by upgrade_tool wl command.



Heiko








___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] u-boot Boot issue about rk3188

2017-09-21 Thread Heiko Stübner
Hi Andy,

Am Donnerstag, 21. September 2017, 22:03:32 CEST schrieb Andy Yan:
> Hi Heiko:
> I try to boot the upstream u-boot-rockchip branch  on my rk3188 board
> with(rock_defconfig)
> 
> But I got this error:
> early_init()
> nit_and_scan() returned error -22
> early_init() failed: -22
> ERROR ### Please RESET the board ###
> 
> the current commit head is: 782088d("rockchip: imply ADC and SARADC_ROCKCHIP
> on supported SoCs") Do you ever meet something like this?

that is very strange. When testing Philipp's branch, I was also testing the 
commit you mention to see if anything broke since I last changed u-boot
on my radxa rock. And the above commit started just fine, when starting
from an sd-card.

Not sure from which medium you're starting though. But from what I
remember Pawel got nand working in his rk3066 series, but that is not
yet merged.


Heiko
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] u-boot Boot issue about rk3188

2017-09-21 Thread Andy Yan
Hi Heiko:
I try to boot the upstream u-boot-rockchip branch  on my rk3188 board 
with(rock_defconfig)

But I got this error:
early_init()
nit_and_scan() returned error -22
early_init() failed: -22
ERROR ### Please RESET the board ###

the current commit head is: 782088d("rockchip: imply ADC and SARADC_ROCKCHIP on 
supported SoCs")
Do you ever meet something like this?



-- 
2.7.4


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot