Flash dhivael's SPI uboot (risky)
#1
Exclamation 
Exclamation Warning: As far as I am aware, so far, this flash process has had about a 16% failure rate. It is difficult to restore your machine with a bad SPI flash. Please proceed at your own risk, and probably best not to try at all if you don't have experience or the time it takes to recover your machineExclamation

Necessary Items:
 - a screwdriver
 - USB Type-A to USB-C cable
 - Another Computer with a USB-A 3.0 port (I used a Macbook Pro with a type-c dongle, if you use something else, idk.)
Not a requirement but if you want to boot from nvme you need:
 - bootable NVME (i.e., with /boot/boot.txt having root=/dev/whatever_your_nvme_is plus some operating system. I use Manjaro. if you are unsure how to do this or want to sync your emmc with your nvme before hand, as400 has a great guide) preferably an intel 660p since it is what I have. 


Build and install rkdeveloptool on your other computer, find out all the info to do that on their Github
    
sanity test that you have installed it correctly
Code:
rkdeveloptool --version
should output: rkdeveloptool ver 1.3

On this other computer, make a directory to hold all of your files in.
Code:
mkdir ~/PBPBoot

You will need to have two files in this directory get them from: SPI_Flash
  1. the db flash helper(https://www.ironrobin.net/clover/droppy/$/i1mNQ). This prepares the SPI for a binary, in this case, u-boot.
  2. the uboot binary (https://www.ironrobin.net/clover/droppy/$/H3yzt), built from dhivael's version of u-boot. 
Note: This uboot binary was built for SPI environment only. It will not work if you try putting it on your eMMC. It also probably will not work when trying to boot a kernel that is not mainline.

Code:
mv rk3399_loader_spinor_v1.15.114.bin ~/PBPBoot
mv dhiv_SPI_uboot.bin ~/PBPBoot
cd ~/PBPBoot


Now that is all set up, we need to get our Pinebook Pro into maskrom mode.

Plug the Type-A end into your non-Pinebook Pro device. Plug the Type-C end into your Pinebook Pro.

Remove all bootable devices from your pinebook pro.


Extra steps to clear SPI 
(Only necessary if you have flashed your SPI before, skip to end if you have never flashed anything to your SPI. If you are not sure and want to make sure it is empty, feel free to follow these steps.)
- on other computer: 
Code:
fallocate -l 16M zerospi
dd if=/dev/zero of=zerospi bs=1M count=16

- Plug your usb-a end into your other computer and usb-c end into your pinebook pro

- On pinebook, get into maksrom mode. If you can't maskrom easily because SPI is bootable (only should be the case if you have flashed uboot or some other boot software to your SPI already) follow as400's guide

- Verify you are in maskrom. On other computer: 
Code:
rkdeveloptool ld
look for maksrom output (e.g., DevNo=1 Vid=0x2207,Pid=0x330c,LocationID=1401 Maskrom)

- flash zerospi 
Code:
rkdeveloptool db rk3399_loader_spinor_v1.15.114.bin
rkdeveloptool wl 0 zerospi
rkdeveloptool td
rkdeveloptool rd

(thanks as400 for this part)


Back to the regular tutorial...

Reboot your computer, it will look like nothing is happening, no LEDs or anything.

to verify you are in maskrom mode, with your computers connected
Code:
rkdeveloptool ld
you should get an output like this 
DevNo=1 Vid=0x2207,Pid=0x330c,LocationID=1401 Maskrom

if that is looking good, lets move forward. if you get something like no devices found, either your pinebook is off or you have some bootable device still in your pinebook, or your cable is bad, or your computer doesn't put enough power through its usb. (tried this with two pinebooks and it didn't work)

Now we will flash the flash helper db file.
Code:
rkdeveloptool db rk3399_loader_spinor_v1.15.114.bin

if that works you will get output
Downloading bootloader succeeded.

Now for the exciting part
time to flash the new uboot to your SPI
Code:
rkdeveloptool wl 0 dhiv_SPI_uboot.bin

your output should end up being
Write LBA from file (100%)

good work, now you can run a test to make sure it's healthy.
Code:
rkdeveloptool td

hopefully you get Reset Device OK.

Now run
Code:
rkdeveloptool rd

which essentially reboots your pinebook pro.

You should see the red dot almost immediately. if you do see it, congrats! you now have an upstream SPI uboot (don't need to have uboot on emmc anymore. its very cool.)
boot order:
sd -> nvme -> usb -> emmc


Messages In This Thread
Flash dhivael's SPI uboot (risky) - by clover - 02-06-2020, 10:42 PM
RE: Flash dhivael's SPI uboot - by Wizzard - 02-07-2020, 12:40 AM
RE: Flash dhivael's SPI uboot - by clover - 02-07-2020, 12:52 AM
RE: Flash dhivael's SPI uboot - by as400 - 02-07-2020, 01:18 AM
RE: Flash dhivael's SPI uboot - by amiraeva - 02-07-2020, 09:42 AM
RE: Flash dhivael's SPI uboot - by Wizzard - 02-07-2020, 02:04 PM
RE: Flash dhivael's SPI uboot - by clover - 02-07-2020, 02:42 PM
RE: Flash dhivael's SPI uboot - by User 15997 - 02-07-2020, 02:34 PM
RE: Flash dhivael's SPI uboot - by Wizzard - 02-07-2020, 02:40 PM
RE: Flash dhivael's SPI uboot - by as400 - 02-07-2020, 02:53 PM
RE: Flash dhivael's SPI uboot - by Wizzard - 02-07-2020, 03:05 PM
RE: Flash dhivael's SPI uboot - by as400 - 02-07-2020, 03:39 PM
RE: Flash dhivael's SPI uboot - by Wizzard - 02-07-2020, 03:57 PM
RE: Flash dhivael's SPI uboot - by as400 - 02-07-2020, 04:11 PM
RE: Flash dhivael's SPI uboot - by clover - 02-07-2020, 04:12 PM
RE: Flash dhivael's SPI uboot - by Wizzard - 02-07-2020, 04:23 PM
RE: Flash dhivael's SPI uboot - by as400 - 02-08-2020, 06:36 AM
RE: Flash dhivael's SPI uboot - by pinebro - 02-07-2020, 05:08 PM
RE: Flash dhivael's SPI uboot - by clover - 02-07-2020, 05:42 PM
RE: Flash dhivael's SPI uboot - by pinebro - 02-07-2020, 06:27 PM
RE: Flash dhivael's SPI uboot - by clover - 02-08-2020, 01:37 PM
RE: Flash dhivael's SPI uboot (risky) - by clover - 02-08-2020, 12:07 PM
RE: Flash dhivael's SPI uboot (risky) - by as400 - 02-08-2020, 12:36 PM
RE: Flash dhivael's SPI uboot (risky) - by clover - 02-08-2020, 12:25 PM
RE: Flash dhivael's SPI uboot (risky) - by clover - 02-08-2020, 01:46 PM
Flash dhivael's SPI uboot (risky) - by Wizzard - 02-08-2020, 02:02 PM
RE: Flash dhivael's SPI uboot (risky) - by clover - 02-08-2020, 02:13 PM
RE: Flash dhivael's SPI uboot (risky) - by as400 - 02-08-2020, 02:07 PM
RE: Flash dhivael's SPI uboot (risky) - by as400 - 02-08-2020, 03:35 PM
RE: Flash dhivael's SPI uboot (risky) - by as400 - 02-09-2020, 01:55 PM
RE: Flash dhivael's SPI uboot (risky) - by as400 - 02-09-2020, 02:27 PM
RE: Flash dhivael's SPI uboot (risky) - by as400 - 02-09-2020, 02:46 PM
RE: Flash dhivael's SPI uboot (risky) - by as400 - 03-12-2020, 11:16 AM
RE: Flash dhivael's SPI uboot (risky) - by vrabac - 03-13-2020, 12:12 AM
RE: Flash dhivael's SPI uboot (risky) - by as400 - 03-14-2020, 08:04 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to rewrite uboot to emmc pineitup 5 8,801 12-27-2020, 10:35 AM
Last Post: nightranger73
  Extracting a copy of SPI NOR flash contents using micro SD card and u-boot hmuller 0 2,704 09-21-2020, 11:24 AM
Last Post: hmuller
  Program SPI NOR Flash on Pinebook Pro with u-boot on micro SD Card hmuller 0 3,424 09-21-2020, 10:02 AM
Last Post: hmuller
  In-Circuit Programming of SPI NOR Flash hmuller 13 18,168 09-13-2020, 01:20 PM
Last Post: hmuller
  Installing Ubuntu 20.04 (Focal) with BSP uBoot with deep sleep and sound Syonyk 43 53,413 07-28-2020, 03:18 PM
Last Post: SamWilts
  How to boot Manjaro from NVME with uboot on eMMC as400 47 56,477 06-07-2020, 02:37 AM
Last Post: as400
  (almost) upstream uboot/atf User 15997 27 30,934 02-08-2020, 10:18 PM
Last Post: Natrox
  Widevine-flash on Chromium-SD Card mamboman777 3 6,424 01-20-2020, 04:00 PM
Last Post: tophneal

Forum Jump:


Users browsing this thread: 1 Guest(s)