12-02-2019, 02:01 PM
U-Boot on SPI flash - discussion
|
12-02-2019, 02:17 PM
(12-02-2019, 02:01 PM)zaius Wrote:(12-02-2019, 11:09 AM)xalius Wrote: You can write SPI flash from u-boot or from Linux, for emergency recovery even in the PBP, two IC test clips are probably the easiest solution... Yes
Come have a chat in the Pine IRC channel >>
While it's not something you're really after, after a lot of frustration and head-scratching I was able to build a working SPI flash image for my fork of U-Boot:
I ended up using Rockchip's firmwareMerger with the following config to build the image: Code: [System] For some reason, firmwareMerger from Rockchip repository doesn't work properly, so I had to use the version from Radxa's repository to get proper image. It should also be possible to use U-Boot TPL and SPL instead of Rockchip blobs, but haven't found any concrete answer on how to build the image using these. Documentation just isn't clear enough, and recovery process is too cumbersome and annoying. dd is good enough for flashing the image to the SPI. Just make sure to use flash_erase beforehand. In case something goes wrong and PBP gets stuck somewhere in early boot, the easiest recovery method I found is taking off the metal shield and shorting SPI clock to ground until ARM Trusted Firmware (BL31) initialization. After Linux boots, you can just use dd or flash_erase to reflash/erase the chip. Overall, it works fine on my device, so there's no more eMMC in my Pinebook Pro You can find the image here. The build scripts for everything are here.
So if I just flash that SPI image, it will boot directly from SD, then NMVe and then eMMC? No other uboot flash for eMMC is needed?
12-03-2019, 06:11 AM
(This post was last modified: 12-03-2019, 06:16 AM by Arwen.
Edit Reason: Found the answer in another thread
)
@pcm720, Thank you for both trying and making your results available to all.
Does your SPI version support booting off SD card if one is installed? Edit: Never mind, just read your latest post in the "U-Boot with direct NVMe boot support", it answers yes, we can boot SD cards with your SPI image.
--
Arwen Evenstar Princess of Rivendale
Yes. However, pre-made SD images do not work:
For some reason Rockchip's SPL tries (and fails) to initialize trust mode with the microSD, so it must not contain any of the bootcode. In other words, SD has to be partitioned just like any block device. The same most likely goes for the eMMC. (12-03-2019, 06:18 AM)pcm720 Wrote: Yes. However, pre-made SD images do not work: So, it will not boot SD cards like Ubuntu or Debian or any of other PBP images? How to fix that? edit: answer: here: https://forum.pine64.org/showthread.php?tid=8439
01-05-2020, 11:19 PM
Maybe a silly question, but is the SPI flash not clippable? I haven't seen the hardware itself so I don't know. If one can use a pomona clip and flashrom or s/t then it's a fairly easy recovery.
01-06-2020, 08:53 PM
(01-05-2020, 11:19 PM)aaspectre Wrote: Maybe a silly question, but is the SPI flash not clippable? I haven't seen the hardware itself so I don't know. If one can use a pomona clip and flashrom or s/t then it's a fairly easy recovery. The Pomona 5250 clip works well. There are cheap knockoffs but the reviews of them are not favorable. The authentic version runs about $15.50 USD before shipping. If you are in the US, you can pick one up at Grainger and save yourself shipping.
01-07-2020, 04:28 AM
Well, I happen to have one of those already, nice. I guess I'm already set to experiment without worry.
|
Users browsing this thread: 2 Guest(s)