{"id":13,"date":"2024-04-04T18:30:36","date_gmt":"2024-04-04T16:30:36","guid":{"rendered":"https:\/\/blog.sf-paris.dev\/?page_id=13"},"modified":"2024-04-04T19:07:17","modified_gmt":"2024-04-04T17:07:17","slug":"how-to-boot-radxa-rock-5b-from-nvme-ssd","status":"publish","type":"post","link":"https:\/\/blog.sf-paris.dev\/en\/how-to-boot-radxa-rock-5b-from-nvme-ssd\/","title":{"rendered":"How to boot Radxa Rock 5B from NVMe SSD drive"},"content":{"rendered":"\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column has-larger-font-size is-layout-flow wp-block-column-is-layout-flow\" style=\"letter-spacing:1px\"><div class=\"wp-block-post-date has-text-color has-medium-gray-color has-small-font-size\"><time datetime=\"2024-04-04T18:30:36+02:00\">April 4, 2024<\/time><\/div><\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\"><\/div>\n<\/div>\n\n\n\n<figure class=\"wp-block-image size-full is-style-default\"><img decoding=\"async\" src=\"https:\/\/blog.sf-paris.dev\/wp-content\/uploads\/2023\/08\/rock5b.avif\" alt=\"\" class=\"wp-image-66\"\/><\/figure>\n\n\n\n<p>The tech community has seen a surge of single-board computers (SBCs) over the past few years, offering tech enthusiasts a plethora of options. However, few come as power-packed and future-ready as the Radxa <strong>ROCK 5 Model B<\/strong>. This potent Raspberry Pi alternative brings to the table a set of features that puts it a notch above many of its competitors.<\/p>\n\n\n\n<p>Historically, the default choices for booting operating systems on such devices have been either through a micro SD card (uSD) or embedded MultiMediaCard (eMMC) memory. While both methods have served their purpose, they come with their own sets of limitations, primarily in terms of speed and overall system responsiveness. Enter the NVMe (Non-Volatile Memory express) drives, a game-changer in the world of storage solutions, known for their breathtaking speed and efficiency.<\/p>\n\n\n\n<p>The PCIe 3.0 x4 slot on the ROCK 5B isn&#8217;t just a token feature; it represents a paradigm shift. By leveraging the capability to connect NVMe drives directly to this slot, users can bypass the traditional bottlenecks associated with uSD cards and eMMC memory. The potential benefits?<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Faster boot times,<\/li>\n\n\n\n<li>snappier system responses, and<\/li>\n\n\n\n<li>a smoother user experience.<\/li>\n<\/ul>\n\n\n\n<p>For those yearning to unlock this potential and revolutionize their SBC experience, the question isn&#8217;t about &#8216;why&#8217; but &#8216;how&#8217;. How does one transition from conventional storage methods to booting their Operating System straight from an NVMe drive on the ROCK 5B? The upcoming guide promises to shed light on this transformative journey, offering step-by-step insights to supercharge your ROCK 5B experience.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Download the needed files<\/h3>\n\n\n\n<p>Let&#8217;s start downloading the needed file, the <strong><a href=\"https:\/\/dl.radxa.com\/rock5\/sw\/images\/others\/zero.img.gz\">zero.img<\/a><\/strong> and the new <strong>bootloader.img<\/strong>, needed since we are going to flash it to SPI Nor Flash.<br><br>There are 4 different bootloader images:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/dl.radxa.com\/rock5\/sw\/images\/loader\/rock-5b\/release\/rock-5b-spi-image-gd1cf491-20240523.img\" title=\"\">normal bootloader<\/a> [<a href=\"https:\/\/dl.radxa.com\/rock5\/sw\/images\/loader\/rock-5b\/release\/rock-5b-spi-image-gbf47e81-20230607.img\" target=\"_blank\" rel=\"noopener\" title=\"\">old<\/a>], recommend for everything <strong>except armbian<\/strong>, has the u-boot serial console disabled<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/huazi-yg\/rock5b\/releases\/download\/rock5b\/rkspi_loader.img\">bootloader for armbian<\/a>, if you like to boot armbian from the M.2 NVME SSD<\/li>\n\n\n\n<li><a href=\"https:\/\/dl.radxa.com\/rock5\/sw\/images\/loader\/rock-5b\/debug\/rock-5b-spi-image-gd1cf491-20240523-debug.img\" target=\"_blank\" rel=\"noopener\" title=\"\">debuging bootloader<\/a> [<a href=\"https:\/\/dl.radxa.com\/rock5\/sw\/images\/loader\/rock-5b\/debug\/rock-5b-spi-image-gbf47e81-20230607-debug.img\" target=\"_blank\" rel=\"noopener\" title=\"\">old<\/a>] with u-boot serial console enabled, if you need to troubleshoot booting issue with serial. (For advanced users)<\/li>\n\n\n\n<li><a href=\"https:\/\/github.com\/edk2-porting\/edk2-rk3588\/releases\">EDK2 bootloader<\/a> for booting UEFI-compatible operating system images (<strong>currently experimental<\/strong>)<\/li>\n<\/ul>\n\n\n\n<p>You can download files by using <em><code>wget link.to\/file.img<\/code><\/em> . In this guide I&#8217;m using the first one.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>mkdir bootloader\ncd bootloader\/\nwget https:\/\/dl.radxa.com\/rock5\/sw\/images\/others\/zero.img.gz\nwget https:\/\/dl.radxa.com\/rock5\/sw\/images\/loader\/rock-5b\/release\/rock-5b-spi-image-gd1cf491-20240523.img<\/code><\/pre>\n\n\n\n<p>We are going to decompress the file and check that the md5 digest is as the one published on radxa website.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gzip -d zero.img.gz\nmd5sum zero.img<\/code><\/pre>\n\n\n\n<p>The result of the above command will be something like this: <em><code>2c7ab85a893283e98c931e9511add182 zero.img<\/code><\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>md5sum rock-5b-spi-image-gbf47e81-20230607.img<\/code><\/pre>\n\n\n\n<p><em><code>cf53d06b3bfaaf51bbb6f25896da4b3a rock-5b-spi-image-gd1cf491-20240523.img<\/code><\/em><\/p>\n\n\n\n<p>Here the checksums of the other possible files:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>2c7ab85a893283e98c931e9511add182  zero.img\ncf53d06b3bfaaf51bbb6f25896da4b3a  rock-5b-spi-image-gd1cf491-20240523.img\nfa14c99718f55b66e82aa1661e43c1ec  rock-5b-spi-image-gd1cf491-20240523-debug.img\nbd21a6459ad33b8189782e4c904d99b3  rock-5b-spi-image-gbf47e81-20230607.img\n1b83982a5979008b4407552152732156  rkspi_loader.img<\/code><\/pre>\n\n\n\n<p>If everything is okay we can pass to check if the spi flash is available:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ls \/dev\/mtdblock*<\/code><\/pre>\n\n\n\n<p>It will return the device: <em><code>\/dev\/mtdblock0<\/code><\/em><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Let&#8217;s flash the bootloader<\/h3>\n\n\n\n<p>The first step is to completely clear the spi flash:&nbsp;<em>(be patient the flash can take up to 5mins, in my case it took 3 mins)<\/em><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dd if=zero.img of=\/dev\/mtdblock0<\/code><\/pre>\n\n\n\n<p>check if the flash was successfully cleared<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo md5sum \/dev\/mtdblock0 zero.img<\/code><\/pre>\n\n\n\n<p><em><code>2c7ab85a893283e98c931e9511add182 \/dev\/mtdblock0<br>2c7ab85a893283e98c931e9511add182 zero.img<\/code><\/em><\/p>\n\n\n\n<p>Okay! Now you can write the desired bootloader\u00a0to the spi flash\u00a0using the following command<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo dd if=rock-5b-spi-image-gd1cf491-20240523.img of=\/dev\/mtdblock0<\/code><\/pre>\n\n\n\n<p>Be patient it will take some time again, as soon it has finished you can lunch<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sync<\/code><\/pre>\n\n\n\n<p>and then check again if everything was successful:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo md5sum \/dev\/mtdblock0 rock-5b-spi-image-gd1cf491-20240523.img<\/code><\/pre>\n\n\n\n<p><code><em>cf53d06b3bfaaf51bbb6f25896da4b3a \/dev\/mtdblock0<br>cf53d06b3bfaaf51bbb6f25896da4b3a rock-5b-spi-image-gd1cf491-20240523.img<br><\/em><\/code>In my case the 2 digests are identical, which means that everything went well, otherwise <strong>flash the bootloader again<\/strong>.<\/p>\n\n\n\n<p>Now you can safely reboot your device!<\/p>\n\n\n\n<div class=\"wp-block-group is-vertical is-content-justification-left is-nowrap is-layout-flex wp-container-core-group-is-layout-cfee1719 wp-block-group-is-layout-flex\"><div class=\"wp-block-post-author\"><div class=\"wp-block-post-author__avatar\"><img alt='' src='https:\/\/secure.gravatar.com\/avatar\/567cfac1038be249e394ac60cc52e2dc1d14001a6aea4fc78050f1c99ab046ba?s=48&#038;d=retro&#038;r=g' srcset='https:\/\/secure.gravatar.com\/avatar\/567cfac1038be249e394ac60cc52e2dc1d14001a6aea4fc78050f1c99ab046ba?s=96&#038;d=retro&#038;r=g 2x' class='avatar avatar-48 photo' height='48' width='48' \/><\/div><div class=\"wp-block-post-author__content\"><p class=\"wp-block-post-author__name\">Simone Flavio<\/p><\/div><\/div>\n\n<div class=\"wp-block-post-author-biography\">Bachelor in Computer Science cum Laude, I&#8217;m passionate about Linux, electronics and everything that can make life easier and more secure.\r\n\r\nIn my spare time I dabble with ffmpeg to compress to AV1\/HEVC my movie library.\r\nOptimizing drive and network resources has been a passion of mine since I could only rely on a 2 Mbps connection as a kid.\r\nIn fact all images here are uploaded in AVIF format making the site more responsive.<\/div><\/div>\n\n\n\n<div class=\"wp-block-comments\">\n\n\n\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The tech community has seen a surge of single-board computers (SBCs) over the past few years, offering tech enthusiasts a plethora of options. However, few come as power-packed and future-ready as the Radxa ROCK 5 Model B. This potent Raspberry Pi alternative brings to the table a set of features that puts it a notch [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[18],"tags":[11,17,8,10,7,6,9],"class_list":["post-13","post","type-post","status-publish","format-standard","hentry","category-guides","tag-boot","tag-guide","tag-nvme","tag-pci","tag-radxa","tag-rockchip","tag-ssd"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/posts\/13","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/comments?post=13"}],"version-history":[{"count":30,"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/posts\/13\/revisions"}],"predecessor-version":[{"id":218,"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/posts\/13\/revisions\/218"}],"wp:attachment":[{"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/media?parent=13"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/categories?post=13"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.sf-paris.dev\/en\/wp-json\/wp\/v2\/tags?post=13"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}