Flash dhivael's SPI uboot (risky) - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: Pinebook Pro Tutorials (https://forum.pine64.org/forumdisplay.php?fid=117) +--- Thread: Flash dhivael's SPI uboot (risky) (/showthread.php?tid=9053) |
Flash dhivael's SPI uboot (risky) - clover - 02-06-2020 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 machine. 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 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
Code: mv rk3399_loader_spinor_v1.15.114.bin ~/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 - 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 - flash zerospi Code: rkdeveloptool db rk3399_loader_spinor_v1.15.114.bin (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 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 RE: Flash dhivael's SPI uboot - Wizzard - 02-07-2020 Hi, what it the difference between your SPI flash and the one from pcm720? RE: Flash dhivael's SPI uboot - clover - 02-07-2020 This is dhivael's flash from his forum post (https://forum.pine64.org/showthread.php?tid=8752), only now it has nvme support and can be flashed to the SPI so it doesnt need to live in the emmc. This uboot should also have USB support, but I haven't personally tested it. Also you get a red light when uboot starts and green light when kernel starts. Seems at least 2 seconds faster as well. RE: Flash dhivael's SPI uboot - as400 - 02-07-2020 And also no binary blobs from Rockchip and no slow boot because of big cores not initializing correctly. Confirmed working booting from NVME and SD. People who have written SPI before might have problems getting into maskrom mode but that will be covered in another post. Code: U-Boot TPL 2020.01-00482-g3d3dbebfe8 (Feb 07 2020 - 00:49:56) RE: Flash dhivael's SPI uboot - amiraeva - 02-07-2020 Thanks everyone - worked like a charm! Now I'm booting off NVMe without that pesky eMMC chip. RE: Flash dhivael's SPI uboot - Wizzard - 02-07-2020 I flashed that, but it does not boot from NVMe neither SD card. I reflashed SD card with Armbian but still does not boot. What can be wrong? The screen is just blank with backlight and green LED is on. RE: Flash dhivael's SPI uboot - User 15997 - 02-07-2020 green led would mean that the kernel is running but hasn't loaded display drivers yet. do you have uart output? RE: Flash dhivael's SPI uboot - Wizzard - 02-07-2020 No, I dont. BTW, do you know that is the boot device priority? Maybe I should remove eMMC? There is no OS on it. RE: Flash dhivael's SPI uboot - clover - 02-07-2020 (02-07-2020, 02:04 PM)Wizzard Wrote: I flashed that, but it does not boot from NVMe neither SD card. I reflashed SD card with Armbian but still does not boot. What can be wrong? The screen is just blank with backlight and green LED is on. I'm sorry that it didnt work for you. It is important to note this process is kinda risky since there are only 3 confirmed successful flashes this way. Can you tell me exactly what you did? are you getting red then green dot or just green dot? Worst case scenario you need to get back into maskrom then reflash pcm's uboot which you know works on your device. look at as400's guide in Pinebook Pro tutorials on how to do that. (https://forum.pine64.org/showthread.php?tid=9059) or simply erase the SPI completely and have uboot on emmc again or sd. RE: Flash dhivael's SPI uboot - as400 - 02-07-2020 @Wizzard are you sure that there is uboot on your sdcard ? As far as i remember with pcm720 uboot on spi to boot from sdcard you'd have to destroy uboot on sd... Make a new sdcard of whatever OS you want and try again. |