BBAI64 - NVMe - rootfs

A few users have asked for this, sorry it’s a little late…

Assumptions…

Currently, U-Boot (or Boot ROM) doesn’t support reading the NVMe, so we need something to load u-boot, our choices are eMMC or microSD… eMMC is onboard… So, we might as well assume eMMC for u-boot…

  • ROM loads u-boot from eMMC
  • u-boot loads Image & device tree’s from eMMC
  • linux mounts NVMe as rootfs.
/boot/firmware -> 1st partition of eMMC
/ -> 1st partition of NVMe.

(if you want to use the 2nd partition of eMMC, for anything go ahead, after you complete the copy over to rootfs, just leave the 1st partition alone…)

Hardware/Adapter:

Samsung 970 EVO Plus and Amazon.com

System can be either booting off microSD or eMMC at this point…

Update System (microSD or eMMC boot)

sudo apt update
sudo apt upgrade
sudo reboot

Update All Bootloader related files (microSD or eMMC boot)

sudo /opt/u-boot/bb-u-boot-beagleboneai64/install-emmc.sh
sudo /opt/u-boot/bb-u-boot-beagleboneai64/install-microsd.sh

Flash eMMC from microSD (microSD boot)

sudo enable-beagle-flasher
sudo reboot

Remove microSD if you had been using it, at this point we assume only eMMC bootup…

Copy RootFS to NVMe… (eMMC boot)

sudo cp -v /opt/u-boot/bb-u-boot-beagleboneai64/bbai64-emmc-to-nvme /etc/default/beagle-flasher
sudo beagle-flasher-boot-emmc-rootfs-nvme
sudo reboot

NVMe RootFS… (eMMC boot, NVMe RootFS )

/proc/cmdline

debian@BeagleBone:~$ cat /proc/cmdline 
console=ttyS2,115200n8 earlycon=ns16550a,mmio32,0x02800000 root=/dev/nvme0n1p1 ro rootfstype=ext4 rootwait net.ifnames=0 quiet
debian@BeagleBone:~$ lsblk
NAME         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
mmcblk0      179:0    0  14.6G  0 disk 
├─mmcblk0p1  179:1    0   128M  0 part /boot/firmware
└─mmcblk0p2  179:2    0  14.5G  0 part 
nvme0n1      259:0    0 232.9G  0 disk 
└─nvme0n1p1  259:1    0 232.9G  0 part /
mmcblk0boot0 179:256  0     4M  1 disk 
mmcblk0boot1 179:512  0     4M  1 disk 

NVMe Benchmarks

debian@BeagleBone:~$ sudo hdparm -tT /dev/nvme0n1

/dev/nvme0n1:
 Timing cached reads:   2598 MB in  2.00 seconds = 1299.56 MB/sec
 Timing buffered disk reads: 1644 MB in  3.00 seconds = 547.65 MB/sec

eMMC Benchmarks

debian@BeagleBone:~$ sudo hdparm -tT /dev/mmcblk0

/dev/mmcblk0:
 Timing cached reads:   2438 MB in  2.00 seconds = 1219.10 MB/sec
 Timing buffered disk reads: 498 MB in  3.00 seconds = 165.90 MB/sec

Regards,

4 Likes

Works good, thank you for doing that.

Unfortunately this is not working for me.
After enable-beagle-flasher when I reboot system hangs only showing the two beagles.

MIght try skipping that step and go to the next. It has been a long time since I used that but do remember skipping over a one of the steps because it is not needed. That might be the one.

Can you share what is reported over the debug uart0?

Sorry for delayed response. I ordered alternate interface board off Amazon. Went thru steps and it works. I now have a 1 TB root drive! running off NVME board. Cool!

Samsung 970 EVO Plus and Amazon.com

I like that adapter with the ribbon idea rather than that 90 degree one forming a huge tower.

Im thinking i will try that, but also in dealing with heat i might go with a TEC cooling rig.

Will start a thread on that if i go that way. Im an electrician with mechanical and technology integration interests… linux is not my strength but working with this group will certainly get me where i need to be

Even with the long cable it gets the correct link speed (and x1 connection) Subsystem: Samsung Electronics Co Ltd SSD 970 EVO

		LnkSta:	Speed 8GT/s, Width x1 (downgraded)
			TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

Regards,

1 Like

Well i got it all up and running with that adaptor and the 970 evo+ and went ahead and put 5 parts on it so i can test mutiple OS’s. This thing is awesome.

Where can i get u-boot from to start this off?

2 Likes


What a Beautiful Beast

1 Like

btw, Cervoz makes a 2230 NVMe with e-key.

1 Like