How to install and boot ROCK64 from eMMC?
#1



This thread is closed.  thanks
#2
(07-08-2017, 12:25 PM)kershaw Wrote:
I've looked at both the image installation guide and the wiki but I can't find any instructions that detail booting from the eMMC module.
How do I install the OS images on the eMMC module? is it even possible?

Do you have a Rock64 board?   ... they should start shipping by July end.

... yes, it is possible to boot from the eMMC;  I 'm booting my Rock64 pre release board from the eMMC now.  It is tricky.

We had a gap of images which would not boot from the eMMC due to build errors;  those have been corrected.  Images between 0.2.1 and 0.3.7 will not boot from eMMC.

Also, everything changed between 2 and 3;  

I am testing image 0.3.7 minimal xenial arm64 ArmV8;  running from the eMMC.  Somehow you have to flash the image to the eMMC ;  1) loader,  2) SD copy to eMMC,  3) curl  copy from the network once the SD is booted;  and this is tricky because a jumper is involved which has to be removed at the right point in the boot process.

It helps now that the device names are standard (SD is mmcblk1;  eMMC is mmcblk0).  The resize_rootfs.sh  script has been fixed to be able to expand the SD or the eMMC correctly.  

boot priority:
eMMC--> SPI flash-->  SD card

The board jumper (just north of the recovery button) forces the board to boot from SD card.

By removing the jumper at the right point, you can use the booted SD card image to (curl) load the eMMC image from the network onto the eMMC module;  the trick is that both the mmcblk0 and mmcblk1 devices have to be visible!  If the jumper is not removed at the right point then the eMMC module will not be visible to the kernel and you have to start over.

That's enough for now.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#3
Hi Mark,
Thank you for the detailed reply and for your time.

I do not have a ROCK64 board but I'm interested in buying one, specifically with an eMMc module which I hope to run the OS from.
From your explanation, I understand that the process of flashing the OS to the eMMC module is rather complicated and far from streamlined.
Are there plans to somehow automate the process and make it more straightforward? It seems too much of a hassle and error-prone at the moment.

I'll hold off purchasing for the time being until running the OS from the eMMC module is stable. 

Thanks again for your help and best of luck!
#4
Removing the jumper at the right moment wasn't so tricky, I've got it successfully done on the first try ...
#5
(07-08-2017, 05:50 PM)kershaw Wrote: I understand that the process of flashing the OS to the eMMC module is rather complicated and far from streamlined.
Are there plans to somehow automate the process and make it more straightforward? It seems too much of a hassle and error-prone at the moment.

Yes,  of course there are plans to automate and streamline; always.  As noted above by martinayotte, the process is not so tricky that it is erratic or a major hassle (nor did I mean to imply that) but it is tricky; meaning, it is not a straight-forward streamlined process!

Having said that, the board is running very well from both the SD and the eMMC, and very soon it is also going to be booting from the SPI flash.  Some members of the team also have their Rock64 running from SSD and|or HDD;  and of course with the usb3.0 this is very very fast and efficient.  And unlike the Raspberry PI, this board does not have a shared "hub" bottle-neck-- it is going to be one dandy NAS server too!

I should also point out (for the sake of completeness and clarity) that the jumper is just an easy way to pull the clock line of the eMMC to ground!  ... if you think about that just a bit it means that the jumper could be automated under software control via gpio pin;  in such a way that the jumper is pulled "precisely" when it needs to be because the eMMC clock line is being released under control of the process running from SD.  This aspect is running wildly in my imagination right now and may not be possible soon;  so things will remain "tricky" for some time,  but not impossible and certainly not something to be afraid of.

Look forward to seeing you around ;  please check out the irc , see link at the bottom.
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#6
The basic idea is to boot from the microSD from a image version of 0.3.7 or later (at the time of writing, 0.3.7 is the latest release, and 0.4.0 is now pre-release), download or copy the image to the eMMC, and then boot from the eMMC only. 

To do that, you have the jumper for the eMMC on/'closed' when booting to ensure that the rock64 boots from the microSD card. After the board has been powered up for 1-2 seconds, you then pull/'open' the jumper off (if you have the serial console connected, you'll see uboot is counting down for user interaction for three seconds). You can then boot the system, and you should then be able to see both devices with you do a sudo fdisk -l. Then as root, with an ethernet connection, you can run the below command to download the 0.3.7 (substitute for a later or different image as appropriate), unpack it, and write it directly to the eMMC. You can then power off the rock64 (safely! sudo shutdown now thank you!), remove the microSD, and then boot the rock64 from your newly installed linux image on the microSD. Wink You can of course substitute the path if you have the image stored locally on you network or on a USB device, but that is the general gist of it at this point in time. There are plans to make a install-to-eMMC script similar to that for the pine64, so stay tuned... it's early days yet for the rock64 Wink 

Code:
curl -L https://github.com/ayufan-rock64/linux-build/releases/download/0.3.7/xenial-minimal-rock64-0.3.7-62-arm64.img.xz | unxz -c > /dev/mmcblk0
#7
(07-09-2017, 06:17 PM)pfeerick Wrote:
Code:
curl -L https://github.com/ayufan-rock64/linux-build/releases/download/0.3.7/xenial-minimal-rock64-0.3.7-62-arm64.img.xz | unxz -c > /dev/mmcblk0


As long as you decided to document it, I did use the above to flash my eMMC which worked very well indeed;  and I might add, runs way faster than dd copy from the SD card !!
marcushh777    Cool

please join us for a chat @  irc.pine64.xyz:6667   or ssl  irc.pine64.xyz:6697

( I regret that I am not able to respond to personal messages;  let's meet on irc! )
#8
Well, I'm convinced...Ordering a ROCK64 now. 
 Here's hoping the entire eMMC flashing process will get automated soon  Smile

Thanks a lot!
#9
(07-12-2017, 10:01 AM)kershaw Wrote: Well, I'm convinced...Ordering a ROCK64 now. 
 Here's hoping the entire eMMC flashing process will get automated soon  Smile

Thanks a lot!

For android it has been automated thanks to fire219's script
You can find me on IRC, Discord and Twitter


#10
Here is the eMMC installation guide: http://files.pine64.org/doc/rock64/guide...o_eMMC.pdf


Possibly Related Threads...
Thread Author Replies Views Last Post
  Rock64 v3 with Real Time Clock (RTC), how to verify? Enig123 1 39 Yesterday, 07:31 PM
Last Post: Rocklobster
  Rock64 v2 network issues alephnull 2 600 05-29-2020, 06:00 AM
Last Post: maccarry
  No boot up after power on Whoopsadaisy 2 71 05-26-2020, 11:24 PM
Last Post: Whoopsadaisy
Bug u-boot (forks) status mcerveny 8 1,401 05-11-2020, 01:23 PM
Last Post: CameronNemo
  Rock64 random freezes BTB 5 656 04-07-2020, 03:19 AM
Last Post: tomarm
Photo ROCK64 v3 4GB DDR board memory chip number Johannes 2 193 04-05-2020, 04:29 AM
Last Post: Johannes
  Graphical boot manager john3voltas 0 84 03-25-2020, 02:27 PM
Last Post: john3voltas
Big Grin Rock64 as a retro-gaming console: early impressions Luke 52 28,295 03-22-2020, 03:02 PM
Last Post: Labo
  Disable Auto Power On Rock64 willowen100 4 200 03-11-2020, 08:24 AM
Last Post: Rocklobster
  Rock64 running OMV, how to setup RTL8812AU WiFi? electrosam 3 502 02-21-2020, 01:49 AM
Last Post: bigtreeman

Forum Jump:


Users browsing this thread: 1 Guest(s)