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 - tophneal - 07-07-2020

(07-07-2020, 08:47 AM)mamboman777 Wrote: 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!

Yup, download that repo as a zip or use git clone, run the build script, navigate into the directory with the finished images, and run the command.


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

(07-07-2020, 08:47 AM)mamboman777 Wrote:
(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!

First of all, to build the U-Boot on x32/x64 PC, you'll need to install aarch64-linux-gnu-gcc cross-compiler.
Then, clone the repository with "git clone --recursive", this will also clone ATF and U-Boot repositories as submodules.
After that, just build the U-Boot with build.sh and write spiflash.bin to /dev/mtd0 via dd.


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

(07-07-2020, 08:57 AM)pcm720 Wrote:
(07-07-2020, 08:47 AM)mamboman777 Wrote:
(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!

First of all, to build the U-Boot on x32/x64 PC, you'll need to install aarch64-linux-gnu-gcc cross-compiler.
Then, clone the repository with "git clone --recursive", this will also clone ATF and U-Boot repositories as submodules.
After that, just build the U-Boot with build.sh and write spiflash.bin to /dev/mtd0 via dd.
It's going to be a while, based off of the speed it looks like dejadup is running.  I've also got to make sure I have a working SD manjaro image before I get started.  That being said, I was planning on building and running this on my aarch64 PBP then flashing directly from there.  pcm720, are you saying that I should do something else?


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

(07-07-2020, 09:12 AM)mamboman777 Wrote:
(07-07-2020, 08:57 AM)pcm720 Wrote:
(07-07-2020, 08:47 AM)mamboman777 Wrote:
(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!

First of all, to build the U-Boot on x32/x64 PC, you'll need to install aarch64-linux-gnu-gcc cross-compiler.
Then, clone the repository with "git clone --recursive", this will also clone ATF and U-Boot repositories as submodules.
After that, just build the U-Boot with build.sh and write spiflash.bin to /dev/mtd0 via dd.
It's going to be a while, based off of the speed it looks like dejadup is running.  I've also got to make sure I have a working SD manjaro image before I get started.  That being said, I was planning on building and running this on my aarch64 PBP then flashing directly from there.  pcm720, are you saying that I should do something else?

If you're going to build it directly on your PBP, you'll have to remove every occurence of "CROSS_COMPILE=aarch64-linux-gnu-" from build.sh.
That should be enough.


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

(07-07-2020, 09:12 AM)mamboman777 Wrote: It's going to be a while, based off of the speed it looks like dejadup is running.  I've also got to make sure I have a working SD manjaro image before I get started.  That being said, I was planning on building and running this on my aarch64 PBP then flashing directly from there.  pcm720, are you saying that I should do something else?

pcm may have assumed you would be doing this on an x86 machine, as building uboot on the PBP can take quite a while. You can still do it on you PBP from what I last recall, just keep that in mind. If you have a Linux on your eMMC, you'd be better off building it from that install. An SD will give you poorer performance building this. beat me to it.


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

(07-07-2020, 09:16 AM)tophneal Wrote:
(07-07-2020, 09:12 AM)mamboman777 Wrote: It's going to be a while, based off of the speed it looks like dejadup is running.  I've also got to make sure I have a working SD manjaro image before I get started.  That being said, I was planning on building and running this on my aarch64 PBP then flashing directly from there.  pcm720, are you saying that I should do something else?

pcm may have assumed you would be doing this on an x86 machine, as building uboot on the PBP can take quite a while. You can still do it on you PBP from what I last recall, just keep that in mind. If you have a Linux on your eMMC, you'd be better off building it from that install. An SD will give you poorer performance building this. beat me to it.
Well, I've got a pretty good 4 core 8 thread Xeon sitting here.  Would I be better off using that?  I could even work on that while this backup finishes.


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

(07-07-2020, 09:21 AM)mamboman777 Wrote: Well, I've got a pretty good 4 core 8 thread Xeon sitting here.  Would I be better off using that?  I could even work on that while this backup finishes.

Probably not a bad idea. It should certainly take a lot less time.


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

(07-07-2020, 09:37 AM)tophneal Wrote:
(07-07-2020, 09:21 AM)mamboman777 Wrote: Well, I've got a pretty good 4 core 8 thread Xeon sitting here.  Would I be better off using that?  I could even work on that while this backup finishes.

Probably not a bad idea. It should certainly take a lot less time.
So after I fun build.sh, how do I get the code to the spi on my PBP?


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

(07-07-2020, 09:47 AM)mamboman777 Wrote: So after I fun build.sh, how do I get the code to the spi on my PBP?

Put it on a USB (if you're using your x86 machine to build it) and use the previous dd command to write it to SPI from the PBP.


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

(07-07-2020, 09:48 AM)tophneal Wrote:
(07-07-2020, 09:47 AM)mamboman777 Wrote: So after I fun build.sh, how do I get the code to the spi on my PBP?

Put it on a USB (if you're using your x86 machine to build it) and use the previous dd command to write it to SPI from the PBP.
Well, I got lots of errors on the build.sh.  I think I may be missing dependencies?

Code:
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make: *** No rule to make target 'realclean'.  Stop.
make: *** No rule to make target 'bl31'.  Stop.
cp: cannot stat 'build/rk3399/release/bl31/bl31.elf': No such file or directory
make: *** No rule to make target 'realclean'.  Stop.
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
make: *** No rule to make target 'mrproper'.  Stop.
cp: cannot stat '../build/bl31.elf': No such file or directory
make: *** No rule to make target 'pinebook-pro-rk3399_defconfig'.  Stop.
make: *** No targets specified and no makefile found.  Stop.
/home/joshua/Desktop/u-boot-build-scripts-master/build.sh: line 37: tools/mkimage: No such file or directory
dd: failed to open 'idbloader-spi.img': No such file or directory
cat: u-boot.itb: No such file or directory
cp: cannot stat 'idbloader-spi.img': No such file or directory
cp: cannot stat 'idbloader.img': No such file or directory
cp: cannot stat 'u-boot.itb': No such file or directory
make: *** No rule to make target 'mrproper'.  Stop.