PINE64
U-Boot with direct NVMe boot support for eMMC/SPI Flash - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: General Discussion on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=112)
+--- Thread: U-Boot with direct NVMe boot support for eMMC/SPI Flash (/showthread.php?tid=8439)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - xmixahlx - 06-27-2020

i still have the bootloader on emmc, and /boot and root on nvme. looking at this again to flash SPI for nvme-only boot.

what is the process to create the spiflash.bin from these sources? as mrfixit accepted pcm's pcie PR, the v2.0 branch is more featureful.

and is anyone tracking the status of mainline u-boot?

wondering if these topics/threads can be expanded upon definitively.


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - belfastraven - 06-27-2020

Check this out:  I must have lucked out and installed this before NVME booting was disabled,  but I have been booting the NVME since February.   He @"dhivael" 
https://forum.pine64.org/showthread.php?tid=8752  (original thread)    I believe Manjaro at one time was using that u-boot  .  I can boot from NVME, SD, and EMMC for sure,  I don't remember trying a USB boot.

He also explains in the git how to build the binaries to be flashed.

https://git.eno.space/pbp-uboot.git/


Also see this thread:  https://forum.pine64.org/showthread.php?tid=8685  From @sigmaris .  I have been using his uboot on SPI flash on a rockpro64.  He has made it very easy to flash/erase SPI whitout going into maskrom mode to install it.    

I haven't a chance to check out the current state of  the latest  Mainline u-boot recently.  

I am relatively new to the linux world:  I think if you take a look at these threads you could figure out what you want to do...
FWIW


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - xmixahlx - 06-28-2020

thanks. i am aware of the great resources of how to flash the SPI and where to download it. i am specifically asking two questions that i did not see addressed:

how do you create the SPI image?
is anyone tracking mainline uboot and can compare features to mrfixit v2.0 uboot?

i found an answer to the first question in the repo you linked:
https://git.eno.space/pbp-uboot.git/commit/?id=3d3dbebfe8726cf2ae51ed44dc49bbc497d62ac5


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - pcm720 - 06-29-2020

(06-28-2020, 11:40 AM)xmixahlx Wrote: thanks. i am aware of the great resources of how to flash the SPI and where to download it. i am specifically asking two questions that i did not see addressed:

how do you create the SPI image?
is anyone tracking mainline uboot and can compare features to mrfixit v2.0 uboot?

i found an answer to the first question in the repo you linked:
https://git.eno.space/pbp-uboot.git/commit/?id=3d3dbebfe8726cf2ae51ed44dc49bbc497d62ac5

Hi!
Just yesterday I updated my build script to build from upstream U-Boot and reference ARM Trusted Firmware, no Rockchip blobs this time.
This one is based on patches from dhivael, sigmaris and Manjaro. The resulting SPI image works on my PBP and boots from NVMe just fine.
You can find it here:
https://github.com/pcm720/u-boot-build-scripts


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - xmixahlx - 06-29-2020

thanks pcm!!! that is EXACTLY what i was looking for and will be incredibly helpful.


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - mamboman777 - 07-07-2020

I'm still interested in this. I currently have the emmc as root and the nvme as home. Is this attainable for the average Joe (me)? Is there much benefit?


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - tophneal - 07-07-2020

(07-07-2020, 02:54 AM)mamboman777 Wrote: I'm still interested in this.  I currently have the emmc as root and the nvme as home.  Is this attainable for the average Joe (me)? Is there much benefit?

Back up your data and give it a shot! The github page for pcm's BSP-based uboot has the terminal command for writing the a file to the SPI, and a few other users have added a wiki page with steps one can take to help recover a bad flash on SPI. Once you've got this uboot on SPI, you should able to install and boot directly from the NVMe, w/o splitting partitions among drives.


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - mamboman777 - 07-07-2020

(07-07-2020, 08:16 AM)tophneal Wrote:
(07-07-2020, 02:54 AM)mamboman777 Wrote: I'm still interested in this.  I currently have the emmc as root and the nvme as home.  Is this attainable for the average Joe (me)? Is there much benefit?

Back up your data and give it a shot! The github page for pcm's BSP-based uboot has the terminal command for writing the a file to the SPI, and a few other users have added a wiki page with steps one can take to help recover a bad flash on SPI. Once you've got this uboot on SPI, you should able to install and boot directly from the NVMe, w/o splitting partitions among drives.
Thanks for the encouragement.  Making a backup now.  

Just to be clear, you are saying I should follow instructions from this, right?  https://github.com/pcm720/u-boot-build-scripts


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - tophneal - 07-07-2020

(07-07-2020, 08:35 AM)mamboman777 Wrote: Thanks for the encouragement.  Making a backup now.  

Just to be clear, you are saying I should follow instructions from this, right?  https://github.com/pcm720/u-boot-build-scripts

No, his earlier, rockchip-based uboot has this command for writing to SPI:
Code:
sudo dd if=spiflash.bin of=/dev/mtd0
Looking at the build script of the most recent (your link,) that spiflash.bin will be in your build folder.


RE: U-Boot with direct NVMe boot support for eMMC/SPI Flash - mamboman777 - 07-07-2020

(07-07-2020, 08:42 AM)tophneal Wrote:
(07-07-2020, 08:35 AM)mamboman777 Wrote: Thanks for the encouragement.  Making a backup now.  

Just to be clear, you are saying I should follow instructions from this, right?  https://github.com/pcm720/u-boot-build-scripts

No, his earlier, rockchip-based uboot has this command for writing to SPI:
Code:
sudo dd if=spiflash.bin of=/dev/mtd0
Looking at the build script of the most recent (your link,) that spiflash.bin will be in your build folder.
Ok.  Still seeking clarification as I'd really like this to work the first time.  1. Download and extract from https://github.com/pcm720/u-boot-build-scripts
2. Run build.sh
3. then run "sudo dd if=spiflash.bin of=/dev/mtd0

If this is already documented someplace, I apologize, but could you please point me in the right direction.  

Thanks!