Firefly Open Source Community

   Login   |   Register   |
New_Topic
Print Previous Topic Next Topic

Build everything from scratch

16

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
16

Build everything from scratch

Posted at 3/14/2018 22:13:10      View:12142 | Replies:8        Print     [Copy Link] 1#
Last edited by markwylde In 3/14/2018 22:15 Editor

Hello

I have a RK3399 Firefly and have wiped the eMMC (from offset 0 to the end) using the rkflashtool. Therefore I believe the eMMC is completly empty.

My end goal is to build everything from source, but until then I'm simply trying to get the RK3399 binaries to work.

STEP 1: Wipe everything on the eMMC
  1. sudo rkflashtool e 0 1000000
Copy the code

STEP 2: Download the following files:
  1. wget https://rawgit.com/rockchip-linux/rkbin/master/rk33/rk3399_ddr_666MHz_v1.08.bin
  2. wget https://rawgit.com/rockchip-linux/rkbin/master/rk33/rk3399_miniloader_v1.06.bin
  3. wget https://rawgit.com/rockchip-linux/rkbin/blob/master/img/rk3399/uboot.img
  4. wget https://rawgit.com/rockchip-linux/rkbin/blob/master/img/rk3399/trust.img
Copy the code



STEP 3: Use mkimage tool and merge miniloader to generate idbloader.img
  1. tools/mkimage -n rk3399 -T rksd -d rk3399_ddr_666MHz_v1.08.bin idbloader.img
  2. cat rk3399_miniloader_v1.06.bin >> idbloader.img
Copy the code



STEP 4: Use flashtool to upload idbloader.img
  1. sudo rkflashtool w 0x40 2000 < idbloader.img
Copy the code



STEP 5: Use flashtool to upload uboot.img
  1. sudo rkflashtool w 0x4000 2000 < uboot.img
Copy the code



STEP 6: Use flashtool to upload trust.img
  1. sudo rkflashtool w 0x6000 2000 < trust.img
Copy the code



Unfortunatly when I start restart the board my serial outputs:

  1. DDR Version 1.07 20161103
  2. In
  3. Channel 0: DDR3, 666MHz
  4. Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
  5. Channel 1: DDR3, 666MHz
  6. Bus Width=32 Col=10 Bank=8 Row=15/15 CS=2 Die Bus-Width=16 Size=2048MB
  7. 256B stride
  8. ch 0 ddrconfig = 0x101, ddrsize = 0x2020
  9. ch 1 ddrconfig = 0x101, ddrsize = 0x2020
  10. pmugrf_os_reg[2] = 0x3AA17AA1, stride = 0xD
  11. OUT
  12. Boot1: 2016-07-29, version: 1.05
  13. CPUId = 0x0
  14. ChipType = 10 1836
  15. SdmmcInit=2 0
  16. BootCapSize=100000
  17. UserCapSize=119276MB
  18. FwPartOffset=2000 , 100000
  19. SdmmcInit=0 20
  20. StorageInit ok = 63256
  21. LoadTrustBL
  22. LoadTrustBL error:-1
  23. powerOn 476773
Copy the code



I don't understand what the LoadTrustBL error means. Could it not find the trust img or was it corrupt?

Thanks for any help you can provide.

Mark Wylde

Reply

Use props Report

16

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
16
Posted at 3/20/2018 07:02:15      2#
cb182d Posted at 3/15/2018 18:38
I personally recommend using rockchip u-boot instead of firefly u-boot.

First sync rockchip repos ...

@cb182d thank you so much for your help. It's now getting further and to uboot. Still not at the stage of getting linux to boot, but at least it's getting past the bootloader error to things I can manage.

I'll post my full steps from a blank eMMC to working linux when I have it recreatable.
Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list