Please enable javascript, or click here to visit my ecommerce web site powered by Shopify.
Jump to: navigation, search

Difference between revisions of "Rockpi4/Linux system runs on M.2 NVME SSD"

< Rockpi4Redirect page
(Created page with "{{rockpi4_header}} {{Languages|rockpi4/Linux system runs on M.2 NVME SSD}} ROCK Pi 4 > Rockpi4/Linux system runs on M.2 NVME SSD | Linux system runs on M...")
 
(Redirected page to Rockpi4/install/NVME)
 
(41 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{rockpi4_header}}
+
#REDIRECT [[Rockpi4/install/NVME]]
 
+
{{Languages|rockpi4/Linux system runs on M.2 NVME SSD}}
+
 
+
    [[rockpi4 | ROCK Pi 4]] > [[Rockpi4/Linux system runs on M.2 NVME SSD | Linux system runs on M.2 NVME SSD]]
+
 
+
__TOC__
+
 
+
It is exciting that, on ROCK Pi 4, NVME is able to boot from SPI Flash. Here is the tutorial about Linux system running on M.2 NVME SSD.
+
 
+
== Prerequisites ==
+
 
+
To follow this tutorial, you will need:
+
 
+
* A well-running ROCK Pi with eMMC or Micro SD Card
+
 
+
* Linux system image for ROCK Pi 4
+
 
+
* SPI Flash image (ROCK Pi 4 u-boot image)
+
 
+
* SPI Flash IC on ROCK Pi 4
+
** Single power supply voltage range: 2.7~3.6V
+
** Space: at least 4MB
+
 
+
* M.2 NVME SSD with M.2 NVMe SSD Reader Adapter
+
** Support brand: HP, Intel, MaxMemory, KingSpec, etc
+
 
+
== Step 1 Install ROCK Pi 4 u-boot image to SPI Flash ==
+
 
+
There are two methods for installing u-boot image to SPI Flash.
+
 
+
=== Method One: Write image to SPI flash from USB OTG port ===
+
 
+
Fitrstly, Get ROCK Pi 4 u-boot image from [http://apt.radxa.com/bionic-testing/pool/main/r/rockpi4b-rk-ubootimg/rockpi4b-rk-ubootimg_2017.09-02674-g92c16aa_all.deb ROCK Pi 4 u-boot image].
+
 
+
After that, use tool '''dpkg-deb''' to unpack the package and select the target files, called uboot-trust-spi.img and rk3399_loader_spinor_v1.15.114.bin .
+
 
+
Then  just follow [[rockpi4/dev/spi-install | Write image to SPI flash from USB OTG port]] to flash image.
+
 
+
=== Method Two: Write image to SPI flash using mtd tool ===
+
 
+
This method requires a running system on ROCK Pi 4 board. So now power on the ROCK Pi 4. Maybe your ROCK Pi system is running on eMMC module or uSD card. It is OK.
+
 
+
Firstly, add Radxa APT source.
+
 
+
For Debian stretch
+
 
+
  $ export DISTRO=stretch-testing # update more frequently but maybe unstable
+
  $ echo "deb http://apt.radxa.com/$DISTRO/ stretch main" | sudo tee /etc/apt/sources.list.d/apt-radxa-com.list
+
 
+
or Ubuntu server
+
  $ export DISTRO=bionic-testing # update more frequently but maybe unstable
+
  $ echo "deb http://apt.radxa.com/$DISTRO/ bionic main" | sudo tee /etc/apt/sources.list.d/apt-radxa-com.list
+
 
+
Get the pub key
+
  $ wget -O -  apt.radxa.com/$DISTRO/public.key | sudo apt-key add -
+
 
+
Update APT
+
  $ sudo apt-get update && sudo apt-get upgrade
+
 
+
Install necessary packages
+
 
+
  $ sudo apt-get install -y rockchip-fstab
+
  $ sudo apt-get install -y rockchip-overlay
+
  $ sudo apt-get install -y rockpi4-dtbo
+
  $ sudo apt-get install -y linux-4.4-latest # Will update kernel
+
  $ sudo apt-get install -y rockpi4b-rk-u-boot-latest # Will get the newest version of u-boot package, but not update the u-boot on eMMC or uSD card
+
 
+
Modify file, /boot/hw_intfc.conf. Uncomment these  lines.
+
 
+
  intfc:uart4=off
+
  intfc:spi1=on
+
  intfc:dtoverlay=spi1-flash
+
 
+
Reboot the machine.
+
 
+
After login, there is a device '''/dev/mtd0'''.
+
 
+
Since we have done a lot of preparation, now it is time to install the image to SPI Flash. Just follow the commands.
+
 
+
  $ sudo /usr/local/sbin/rockpi4b_write_spi_flash.sh
+
 
+
After that, something are shown to us.
+
 
+
  Doing this will overwrite data stored on SPI Flash
+
    and it will require that you use eMMC or SD
+
    as your boot device.
+
 
+
  Type YES to continue or Ctrl-C to abort.
+
 
+
We follow its suggestion and type '''YES'''. Now we just wait until the installing job is done.
+
 
+
== Step 2 Install ROCK Pi 4 system image to M.2 NVME SSD ==
+
 
+
It is convenient to install system image to M.2 NVME SSD.
+
 
+
Put the M.2 NVME SSD into M.2 NVMe SSD Reader Adapter, and then insert them to PC.
+
 
+
When they are ready, use tool command '''dd''' or APP '''Etcher''' to install system image to M.2 NVME SSD.
+
 
+
== Step 3 Test M.2 NVME SSD booting from SPI Flash ==
+
 
+
Power off ROCK Pi 4, remove eMMC module or uSD Card from ROCK Pi 4 since there is system image in eMMC module or uSD Card.
+
 
+
Insert M.2 NVME SSD into ROCK Pi 4.
+
 
+
Power on ROCK Pi 4.
+
 
+
== Troubleshooting ==
+
 
+
* If you have a issue, start a new post on the forum. https://forum.radxa.com/
+

Latest revision as of 07:43, 17 September 2020