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 No Audio @ Debian 12 dmitrymyadzelets 2 1,105 04-08-2024, 06:47 AM
Last Post: dmitrymyadzelets
  OpenWRT on the Rock64 CanadianBacon 14 10,763 04-03-2024, 08:48 AM
Last Post: helpmerock
  Rock64 bricked shawwwn 7 7,014 03-17-2024, 12:22 PM
Last Post: dmitrymyadzelets
  Rock64 won't boot luminosity7 10 6,012 03-16-2024, 08:33 AM
Last Post: dmitrymyadzelets
  Rock64 doesn't boot dstallmo 1 741 03-16-2024, 08:29 AM
Last Post: dmitrymyadzelets
  Boot from SPI first mjnck 1 1,930 02-29-2024, 02:12 PM
Last Post: reukiodo
  How well does Rock64 deal with HDR and Atmos on Kodi? drvlikhell 3 2,706 04-29-2023, 04:24 AM
Last Post: newestssd
  Rock64 board not working, no HDMI no Ethernet. EDited 3 4,284 01-17-2023, 02:31 PM
Last Post: Flagtrax
  ROCK64 v3 can it boot from USB? Tsagualsa 4 2,963 11-29-2022, 11:31 AM
Last Post: Macgyver
  rock64 v3 spiflash Macgyver 0 1,053 11-28-2022, 02:18 PM
Last Post: Macgyver

Forum Jump:


Users browsing this thread: 1 Guest(s)