U-Boot with direct NVMe boot support for eMMC/SPI Flash
@pcm720 - I have also tested your build of uboot. It works without problem for me. Booting from NVME or SD card.
I have flashed it with dd from Manjaro running my self-compiled 5.8rc4.

Also I've heard rumours about eDP patch submitted to uboot patchwork but I can't find it.

Thanks for your work Smile
  Reply
Working!  Thank you all for your patience.  I can only imagine the eyeroll "noob" comments you thought to yourself as I figure it this out.  I can confirm and am writing this from my Manjaro install on my NVME drive.  Thank you all for your development work and for the help!

-Josh!
  Reply
(07-08-2020, 11:25 AM)as400 Wrote: @pcm720 - I have also tested your build of uboot. It works without problem for me. Booting from NVME or SD card.
I have flashed it with dd from Manjaro running my self-compiled 5.8rc4.

Also I've heard rumours about eDP patch submitted to uboot patchwork but I can't find it.

Thanks for your work Smile
I found this patch https://github.com/amiraeva/uboot-pbp/co...4897672758 but did  not ee that it had been sent to patchwork,  or that it was  ultimately successful.

There was a patch applied a few hours ago that enabled some features for PBP, though.  

https://github.com/u-boot/u-boot/commit/...f79f046cb7
  Reply
(07-08-2020, 12:53 PM)belfastraven Wrote:
(07-08-2020, 11:25 AM)as400 Wrote: @pcm720 - I have also tested your build of uboot. It works without problem for me. Booting from NVME or SD card.
I have flashed it with dd from Manjaro running my self-compiled 5.8rc4.

Also I've heard rumours about eDP patch submitted to uboot patchwork but I can't find it.

Thanks for your work Smile
I found this patch https://github.com/amiraeva/uboot-pbp/co...4897672758 but did  not ee that it had been sent to patchwork,  or that it was  ultimately successful.

There was a patch applied a few hours ago that enabled some features for PBP, though.  

https://github.com/u-boot/u-boot/commit/...f79f046cb7

Yeah ignore https://github.com/amiraeva/uboot-pbp/co...4897672758 as that was just a naive (and failed) attempt at getting the eDP to work in u-boot. I'm no kernel level whiz; just know enough C to be dangerous haha. Hopefully someone smarter than me comes around sooner than later and gets it working!
  Reply
(07-09-2020, 08:10 AM)amiraeva Wrote:
(07-08-2020, 12:53 PM)belfastraven Wrote:
(07-08-2020, 11:25 AM)as400 Wrote: @pcm720 - I have also tested your build of uboot. It works without problem for me. Booting from NVME or SD card.
I have flashed it with dd from Manjaro running my self-compiled 5.8rc4.

Also I've heard rumours about eDP patch submitted to uboot patchwork but I can't find it.

Thanks for your work Smile
I found this patch https://github.com/amiraeva/uboot-pbp/co...4897672758 but did  not ee that it had been sent to patchwork,  or that it was  ultimately successful.

There was a patch applied a few hours ago that enabled some features for PBP, though.  

https://github.com/u-boot/u-boot/commit/...f79f046cb7

Yeah ignore https://github.com/amiraeva/uboot-pbp/co...4897672758 as that was just a naive (and failed) attempt at getting the eDP to work in u-boot. I'm no kernel level whiz; just know enough C to be dangerous haha. Hopefully someone smarter than me comes around sooner than later and gets it working!
Everything is working well, except when I reboot. When I do i get vertical bars on the display. If I do a cold boot, no issues. Is this just me? Any ideas why this might happen?
  Reply
(07-09-2020, 08:35 AM)mamboman777 Wrote:
(07-09-2020, 08:10 AM)amiraeva Wrote:
(07-08-2020, 12:53 PM)belfastraven Wrote:
(07-08-2020, 11:25 AM)as400 Wrote: @pcm720 - I have also tested your build of uboot. It works without problem for me. Booting from NVME or SD card.
I have flashed it with dd from Manjaro running my self-compiled 5.8rc4.

Also I've heard rumours about eDP patch submitted to uboot patchwork but I can't find it.

Thanks for your work Smile
I found this patch https://github.com/amiraeva/uboot-pbp/co...4897672758 but did  not ee that it had been sent to patchwork,  or that it was  ultimately successful.

There was a patch applied a few hours ago that enabled some features for PBP, though.  

https://github.com/u-boot/u-boot/commit/...f79f046cb7

Yeah ignore https://github.com/amiraeva/uboot-pbp/co...4897672758 as that was just a naive (and failed) attempt at getting the eDP to work in u-boot. I'm no kernel level whiz; just know enough C to be dangerous haha. Hopefully someone smarter than me comes around sooner than later and gets it working!
Everything is working well, except when I reboot. When I do i get vertical bars on the display. If I do a cold boot, no issues. Is this just me? Any ideas why this might happen?
Same for me i have some issues with the screen when boot, need more test.
  Reply
Hi all,

This is mi experience trying boot with the NVMe SSD Intel 660p M.2 1 TB SSDPEKNW010T8X1 on PBP for now:

After dd if=Manjaro-ARM-i3-pbpro-20.06.img of=/dev/nvme0n1
and flashing SPI following @pcm720 
https://github.com/pcm720/u-boot-build-scripts/releases/tag/v2020.07-1 
# flash_erase /dev/mtd0 0 0
# dd if=spiflash.bin of=/dev/mtd0

and unplug/remove SD and eMMC

  1. when i boot the pinebook pro with the new SPI config, the power led stay ambar 10 seconds then turns green and boot. (On firsts boots after unboxin PBP the power led tuns green after 1 second.)
  2. the screen resolution don't work correctly and can log in. I pluged the eMMc and reboot the PBP. then it boot from emmc correctly before reboot the first wrong boot with no screen.
  3. can't boot from SD.
I decided delete the spi due to https://wiki.pine64.org/index.php/Pinebo...le_Storage  and return to factory boot. If i undestood it well (At this time, the Pinebook Pro ships with a Manjaro + KDE build with uboot on the eMMC. Its boot order is: SD, USB, then eMMC.)  
# flash_erase /dev/mtd0 0 0

but the power led remain ambar for 10 seconds when i power up the PBP. Then boot normal from emmc or sd without problems.

I have bought a UART cable and a USB Type-A to USB-C cable and this weekend i will have it to see what is happen during ambar power led boot stage.

some info/help are welcome, thanks.
  Reply
(07-21-2020, 09:15 AM)viel Wrote: Hi all,

This is mi experience trying boot with the NVMe SSD Intel 660p M.2 1 TB SSDPEKNW010T8X1 on PBP for now:

After dd if=Manjaro-ARM-i3-pbpro-20.06.img of=/dev/nvme0n1
and flashing SPI following @pcm720 
https://github.com/pcm720/u-boot-build-scripts/releases/tag/v2020.07-1 
# flash_erase /dev/mtd0 0 0
# dd if=spiflash.bin of=/dev/mtd0

and unplug/remove SD and eMMC

  1. when i boot the pinebook pro with the new SPI config, the power led stay ambar 10 seconds then turns green and boot. (On firsts boots after unboxin PBP the power led tuns green after 1 second.)
  2. the screen resolution don't work correctly and can log in. I pluged the eMMc and reboot the PBP. then it boot from emmc correctly before reboot the first wrong boot with no screen.
  3. can't boot from SD.
I decided delete the spi due to https://wiki.pine64.org/index.php/Pinebo...le_Storage  and return to factory boot. If i undestood it well (At this time, the Pinebook Pro ships with a Manjaro + KDE build with uboot on the eMMC. Its boot order is: SD, USB, then eMMC.)  
# flash_erase /dev/mtd0 0 0

but the power led remain ambar for 10 seconds when i power up the PBP. Then boot normal from emmc or sd without problems.

I have bought a UART cable and a USB Type-A to USB-C cable and this weekend i will have it to see what is happen during ambar power led boot stage.

some info/help are welcome, thanks.
I ran into issues with my PBP and getting the spiflash to work, too.  I am also running a PBP with an Intel 660P 1tb NVME drive.  With pcm720's awesome help I was able to get everything running smoothly.  

I don't know your experience level and I have made these mistakes myself, so please forgive me if some of these suggestions sound a little basic. 

If you haven't done so already, you'll need to install mtd-utils.  You can use the package manager to do this or run "sudo pacman -S mdt-utils" in a terminal.  Please note, capatilization is important in the Manjaro/Arch terminal (I only say this because I had to learn the hard way that "pacman -s" is not "pacman -S"

Next, you have to navigate the terminal to the directory where you saved the spiflash.bin file.  Example "cd /home/username/Downloads" 

I noticed in your post that you ran 'flash_erase/mtd0 0 0' and 'dd if=spiflash.bin of=/def/mtd0'.  Next, you'll need to make sure that you run the commands listed above as sudo.  So, "sudo flash_erase/mtd0 0 0" If that works correctly I get a readout that takes about a minute and goes through a percentage as the spiflash is erased.  The second command should be "dd if=spiflash.bin of=/dev/mtd0"

That should get the spiflash.bin up and running for you.  What is currently on the NVME drive?  You won't be able to boot from it unless you've installed manjaro on it.  ( I know this sounds basic, but like I've said, I have made this mistake before)

I hope this helps, but if not, you may want to reach out in a private message to pcm720 to see if they can help.

-Josh
  Reply
(07-22-2020, 07:47 AM)mamboman777 Wrote:
(07-21-2020, 09:15 AM)viel Wrote: Hi all,

This is mi experience trying boot with the NVMe SSD Intel 660p M.2 1 TB SSDPEKNW010T8X1 on PBP for now:

After dd if=Manjaro-ARM-i3-pbpro-20.06.img of=/dev/nvme0n1
and flashing SPI following @pcm720 
https://github.com/pcm720/u-boot-build-scripts/releases/tag/v2020.07-1 
# flash_erase /dev/mtd0 0 0
# dd if=spiflash.bin of=/dev/mtd0

and unplug/remove SD and eMMC

  1. when i boot the pinebook pro with the new SPI config, the power led stay ambar 10 seconds then turns green and boot. (On firsts boots after unboxin PBP the power led tuns green after 1 second.)
  2. the screen resolution don't work correctly and can log in. I pluged the eMMc and reboot the PBP. then it boot from emmc correctly before reboot the first wrong boot with no screen.
  3. can't boot from SD.
I decided delete the spi due to https://wiki.pine64.org/index.php/Pinebo...le_Storage  and return to factory boot. If i undestood it well (At this time, the Pinebook Pro ships with a Manjaro + KDE build with uboot on the eMMC. Its boot order is: SD, USB, then eMMC.)  
# flash_erase /dev/mtd0 0 0

but the power led remain ambar for 10 seconds when i power up the PBP. Then boot normal from emmc or sd without problems.

I have bought a UART cable and a USB Type-A to USB-C cable and this weekend i will have it to see what is happen during ambar power led boot stage.

some info/help are welcome, thanks.
I ran into issues with my PBP and getting the spiflash to work, too.  I am also running a PBP with an Intel 660P 1tb NVME drive.  With pcm720's awesome help I was able to get everything running smoothly.  

I don't know your experience level and I have made these mistakes myself, so please forgive me if some of these suggestions sound a little basic. 

If you haven't done so already, you'll need to install mtd-utils.  You can use the package manager to do this or run "sudo pacman -S mdt-utils" in a terminal.  Please note, capatilization is important in the Manjaro/Arch terminal (I only say this because I had to learn the hard way that "pacman -s" is not "pacman -S"

Next, you have to navigate the terminal to the directory where you saved the spiflash.bin file.  Example "cd /home/username/Downloads" 

I noticed in your post that you ran 'flash_erase/mtd0 0 0' and 'dd if=spiflash.bin of=/def/mtd0'.  Next, you'll need to make sure that you run the commands listed above as sudo.  So, "sudo flash_erase/mtd0 0 0" If that works correctly I get a readout that takes about a minute and goes through a percentage as the spiflash is erased.  The second command should be "dd if=spiflash.bin of=/dev/mtd0"

That should get the spiflash.bin up and running for you.  What is currently on the NVME drive?  You won't be able to boot from it unless you've installed manjaro on it.  ( I know this sounds basic, but like I've said, I have made this mistake before)

I hope this helps, but if not, you may want to reach out in a private message to pcm720 to see if they can help.

-Josh

Thanks for the reply.

I did that as u say, with sudo, caps, etc. U right I forgot some things that I thought were basic. I will try to be more specific next time.

Mi two doubts for now are:

Before flash the SPI I installed manjaro in the NVMe with sudo dd if=Manjaro-ARM-i3-pbpro-20.06.img of=/dev/nvme0n1 i don't know if it is the correct way to install Manjaro on NVMe. On the first try booting from NVMe I can perceive the manjaro logo and login screen as if it is distorted, like with poor screen resolution. Since I couldn't do anything (boot from sd didn't work.) i plugged in the emmc again and can start manjaro from emmc, i remember that sometimes when I reboot and can login on the system installed on emmc and i do a lsblk the boot partition mounted was the nvme0n1p1.

For now i leaved the 2 partitions that dd created in the NVMe (i remember that i resized root from 4G to 100G), and i have made an other partition for home, i cleaned nvme0n1p1 (boot) and nvme0n1p2 (root) to make a new installation. Maybe the 4G of the root partition was the problem, don't know.
[rock@pbp bootsplash]$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
mmcblk2      179:0    0  58,2G  0 disk 
├─mmcblk2p1  179:1    0 213,6M  0 part  /boot
└─mmcblk2p2  179:2    0    58G  0 part  /
mmcblk2boot0 179:32   0     4M  1 disk 
mmcblk2boot1 179:64   0     4M  1 disk 
zram0        252:0    0   5,6G  0 disk  [SWAP]
nvme0n1      259:0    0 953,9G  0 disk 
├─nvme0n1p1  259:1    0 213,6M  0 part 
├─nvme0n1p2  259:2    0   100G  0 part 
└─nvme0n1p3  259:3    0 853,6G  0 part 
  └─data     253:0    0 853,6G  0 crypt /home


The second doubt is why the power led stay ambar/orange for 10 seconds when i boot the PBP after flashing and erasing the SPI. Is there something that comes from the factory in the SPI?
Too late to me to see if there was anything.
[root@pbp bootsplash]# hexdump -C /dev/mtd0 | head
00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
01000000
[root@pbp bootsplash]#


I will do a new try this weekend with the cables and i will take best notes for post if necessary.

How did you install Manjaro on the NVMe? How long does it take for the power led to turn green in your PBP?

Thanks in advance.
  Reply
(07-22-2020, 11:54 AM)viel Wrote:
(07-22-2020, 07:47 AM)mamboman777 Wrote:
(07-21-2020, 09:15 AM)viel Wrote: Hi all,

This is mi experience trying boot with the NVMe SSD Intel 660p M.2 1 TB SSDPEKNW010T8X1 on PBP for now:

After dd if=Manjaro-ARM-i3-pbpro-20.06.img of=/dev/nvme0n1
and flashing SPI following @pcm720 
https://github.com/pcm720/u-boot-build-scripts/releases/tag/v2020.07-1 
# flash_erase /dev/mtd0 0 0
# dd if=spiflash.bin of=/dev/mtd0

and unplug/remove SD and eMMC

  1. when i boot the pinebook pro with the new SPI config, the power led stay ambar 10 seconds then turns green and boot. (On firsts boots after unboxin PBP the power led tuns green after 1 second.)
  2. the screen resolution don't work correctly and can log in. I pluged the eMMc and reboot the PBP. then it boot from emmc correctly before reboot the first wrong boot with no screen.
  3. can't boot from SD.
I decided delete the spi due to https://wiki.pine64.org/index.php/Pinebo...le_Storage  and return to factory boot. If i undestood it well (At this time, the Pinebook Pro ships with a Manjaro + KDE build with uboot on the eMMC. Its boot order is: SD, USB, then eMMC.)  
# flash_erase /dev/mtd0 0 0

but the power led remain ambar for 10 seconds when i power up the PBP. Then boot normal from emmc or sd without problems.

I have bought a UART cable and a USB Type-A to USB-C cable and this weekend i will have it to see what is happen during ambar power led boot stage.

some info/help are welcome, thanks.
I ran into issues with my PBP and getting the spiflash to work, too.  I am also running a PBP with an Intel 660P 1tb NVME drive.  With pcm720's awesome help I was able to get everything running smoothly.  

I don't know your experience level and I have made these mistakes myself, so please forgive me if some of these suggestions sound a little basic. 

If you haven't done so already, you'll need to install mtd-utils.  You can use the package manager to do this or run "sudo pacman -S mdt-utils" in a terminal.  Please note, capatilization is important in the Manjaro/Arch terminal (I only say this because I had to learn the hard way that "pacman -s" is not "pacman -S"

Next, you have to navigate the terminal to the directory where you saved the spiflash.bin file.  Example "cd /home/username/Downloads" 

I noticed in your post that you ran 'flash_erase/mtd0 0 0' and 'dd if=spiflash.bin of=/def/mtd0'.  Next, you'll need to make sure that you run the commands listed above as sudo.  So, "sudo flash_erase/mtd0 0 0" If that works correctly I get a readout that takes about a minute and goes through a percentage as the spiflash is erased.  The second command should be "dd if=spiflash.bin of=/dev/mtd0"

That should get the spiflash.bin up and running for you.  What is currently on the NVME drive?  You won't be able to boot from it unless you've installed manjaro on it.  ( I know this sounds basic, but like I've said, I have made this mistake before)

I hope this helps, but if not, you may want to reach out in a private message to pcm720 to see if they can help.

-Josh

Thanks for the reply.

I did that as u say, with sudo, caps, etc. U right I forgot some things that I thought were basic. I will try to be more specific next time.

Mi two doubts for now are:

Before flash the SPI I installed manjaro in the NVMe with sudo dd if=Manjaro-ARM-i3-pbpro-20.06.img of=/dev/nvme0n1 i don't know if it is the correct way to install Manjaro on NVMe. On the first try booting from NVMe I can perceive the manjaro logo and login screen as if it is distorted, like with poor screen resolution. Since I couldn't do anything (boot from sd didn't work.) i plugged in the emmc again and can start manjaro from emmc, i remember that sometimes when I reboot and can login on the system installed on emmc and i do a lsblk the boot partition mounted was the nvme0n1p1.

For now i leaved the 2 partitions that dd created in the NVMe (i remember that i resized root from 4G to 100G), and i have made an other partition for home, i cleaned nvme0n1p1 (boot) and nvme0n1p2 (root) to make a new installation. Maybe the 4G of the root partition was the problem, don't know.
[rock@pbp bootsplash]$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
mmcblk2      179:0    0  58,2G  0 disk 
├─mmcblk2p1  179:1    0 213,6M  0 part  /boot
└─mmcblk2p2  179:2    0    58G  0 part  /
mmcblk2boot0 179:32   0     4M  1 disk 
mmcblk2boot1 179:64   0     4M  1 disk 
zram0        252:0    0   5,6G  0 disk  [SWAP]
nvme0n1      259:0    0 953,9G  0 disk 
├─nvme0n1p1  259:1    0 213,6M  0 part 
├─nvme0n1p2  259:2    0   100G  0 part 
└─nvme0n1p3  259:3    0 853,6G  0 part 
  └─data     253:0    0 853,6G  0 crypt /home


The second doubt is why the power led stay ambar/orange for 10 seconds when i boot the PBP after flashing and erasing the SPI. Is there something that comes from the factory in the SPI?
Too late to me to see if there was anything.
[root@pbp bootsplash]# hexdump -C /dev/mtd0 | head
00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
01000000
[root@pbp bootsplash]#


I will do a new try this weekend with the cables and i will take best notes for post if necessary.

How did you install Manjaro on the NVMe? How long does it take for the power led to turn green in your PBP?

Thanks in advance.
As far as the power light going directly to green vs. amber then green it has something to do with what they did with uboot.  Mine used to be the same, but now it is different.  I am no expert, but I believe the old uboot or spi used to just turn green when the power was pressed.  The new one goes amber to indicate that the power is on, but the boot disc is not yet found.  After the boot disc is found the light goes from amber to green.  Cool, right?!?

I'm guessing that if you couldn't boot off of the SD card either that the problem lies with your installation method.  That may explain why it's taking a bit longer than expected to go from amber to green.  It's looking at the installed disks for a boot file and can't identify one, so it moves to the next.  Which takes time.

I don't know the best way to install the os on the NVME or SD, but I know what I did. I can tell you how I got my Nvme up and running, but there is probably a faster and maybe better way of doing it. I use "Gnome Disks" from the package manager.  The only real reasons that I continue to use it are that I used it when I first started on Linux with Ubuntu and because I have found that it pretty consistently works for me.  

After you have installed Gnome disks, download the iso image from the wiki page: https://wiki.pine64.org/index.php?title=...anjaro_ARM

Before you install it on the image you will need to extract the file.  So, where ever the downloaded file is, right click and select extract here.

Next I used Gnome Disks to "restore image" to the drive that I'm trying to install to.   - Use super key and type "disks" to open gnome disk utility.  I don't think it's strictly necessary, but I usually format it first.  So on the left click on the drive that you want to install on.  Then click on the three dots.  Then click on "Format."  Wait.  Click on the three dots again.  Then click "Restore Disk Image."  Then select the image file that you downloaded.  Wait for the process to finish and you should have a functional os on the disk.

One more thing, no matter the medium (SD, eMMC, SSD) I have found that the first boot it much slower so give it a little extra time on the first try.
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cant boot into an OS trashtendenz 3 662 10-23-2024, 03:49 AM
Last Post: chaylengordon
  3 days in, slow/stuck or no boot. lgmpbp2 30 3,687 09-05-2024, 08:49 AM
Last Post: lgmpbp2
  Unable to boot? YossiS 4 383 09-04-2024, 10:35 AM
Last Post: wdt
  upgrading u-boot--what version? where to get it? bsammon 11 2,610 05-22-2024, 09:33 AM
Last Post: wdt
  uboot wont boot to SD card after upgrade jbradley419 7 2,279 01-19-2024, 02:29 PM
Last Post: wdt
  Video Flashing/adjusting on boot and reboot jbradley419 0 630 01-16-2024, 09:17 AM
Last Post: jbradley419
  Brand new Pinebook Pro doesn't boot after Manjaro update johnboiles 8 3,723 12-15-2023, 02:11 PM
Last Post: wdt
  PBP won't boot after trying to reinstall Manjaro ARM soupgirl 3 1,468 12-13-2023, 08:17 PM
Last Post: trillobite
  Various freezes during boot & while running several Linux distros - hardware error? donuts 1 1,044 11-22-2023, 11:47 AM
Last Post: fxc
  Happy eMMC and SDcard OS usage for Pinebook Pro Newbies... Paulie420 42 67,896 11-20-2023, 06:22 PM
Last Post: wdt

Forum Jump:


Users browsing this thread: 10 Guest(s)