Using eMMC
I'm interested in loading up the newest images onto the eMMC card, but I'm a little at a loss. With the eMMC in the device it boots into Android and I didn't see any tools for formatting storage. I see that eMMCs for the board are on sale here (loverpi) and come with a Type-A to Type-A for programming, but haven't found any docs about how this works.
Any advice appreciated
Comments
Update: I went back to the packaging and saw that the board came with a Type-A to Type-A. I dug around and found some comments on the Kickstarter page that indicate I should try the USB_Burning_Tool from amlogic. I'll give that a try, but if I'm on the wrong path and anyone has other instructions please LMK (I'll check back here).
@JSchibley: I haven't found any other information. Please let us now if armlogic tool is working. I was also waiting for a kind of wiki how to flash eMMC...
I personally did that using the board itself.
Wrote linux image to SD card, boot from it, connected the eMMC card, and it is in the system as /dev/mmcblk1, which is just a block device on which you can image your images according to any guide how to do that in linux.
@OverSun: Which OS are you using? I can't see eMMC by using df -h.
ubuntu. "df -h" shows you mounted partitions. if you connect eMMC after booting it's not mounted, it is still just a block device in /dev.
And it's going to be /dev/mmcblk0, not /dev/mmcblk1, my bad, but not a big difference.
@OverSun Do I need to clean/format device first? With dd I always get 'No space left on device'? :-(
what is the command you try? block device has nothing to do with space at all, it's just a stream of bytes for the system itself...
@wappi lsblk
lsblk is just showing mmcblk1 with p1,p2 & p3 before and after plugging eMMC to board. However, dd starts for mmcblk0.
Please find attached my terminal commands.
My eMMC is working with pre-installed Android - I have not recognized any issue yet. I hope that it is not defect...
mmcblk1 is your sd card.
and only 1 gig is written to the mmcblk0 device and then it stops, like the device has ended. which is quite strange, I don't think you have 1 Gig eMMC
I don't really have an idea why it stops at this point. Is there a way you plug in together sd card and eMMC before boot? I don't really remember which one is going to be chosen to boot from, it could be eMMC will take precedance, or SD. If SD will boot you linux, there is a chance you will have proper mmcblk0 device representing eMMC card.
That's the trick. Bootloader is checking first for eMMC and second for SD card. I just powered board and connected eMMC 1-2s afterwards. By doing this I can see mmcblk0 and dd is working as expected. Unfortunately the board does not boot from eMMC only with image 4.14.11.
I will check with a better power supply and/or another image later today again...
it's quite possible that it's hardcoded in u-boot to boot from mmc 0 (which is sd) and not from mmc 1 (which is emmc), and it stops in the very beginning.
Do you have UART to check what's in the output of u-boot?
No, sorry. I do not have UART to check.
I think emmc is mmc0 and sd card is mmc1
@loverpi: Isn't it a question for image creator? It would be good if image is booting from both SD or eMMC.
ironically in u-boot sd is mmc 0 and emmc is mmc 1. at least for u-boot 2015 used for 3.14 and 4.9 kernel. maybe they changed it to match OS numbering in mainline u-boot.
Power supply does not make a difference. I guess that root is defined as mmc1p2. Not sure how to change this.
@OverSun : Can you provide your OS as image file?
I'm planning to do image when 18.04 is out.
18.04 is going to be LTS and is advanced than current 17.10 that is very much intermediate between LTS-es. 17.04 just yesterday lost support completely, even update branch is no longer there for apt-update. and 16.04 that is current LTS is two years old. So I don't see a reason to do an image on something that is obsolete in two months...
@wappi, The u-boot script (boot.scr) is not set to detect eMMC. Will add it to the next image.
Was glad to see the thread had picked up comments because I had no luck with the USB_Burning_Tool (it did not recognize the device and gave errors about invalid images). I had been shy to mount the eMMC with power, but I tried and the method @wappi mentioned, and this allowed me to see the eMMC.
Unfortunately after I loaded up the image file on the sd-card, I've been unable to get my USB ports working (mouse won't light, tried different power). I'm going to put this aside for now and order a second device to make debugging easier.
https://docs.google.com/presentation/d/1gP-8njKQg6WE3p9HOU55m39NyLyq6IBa0Ukww5N15IU/edit#slide=id.p
Oi... This might take a while. In the mean time I'll be tinkering on the Tinker board and Pi3B+.
I have an oDroid eemc module adapter on its way. Hoping I can use the standard methods for loading images. Primarily just wanting to use this as a 4k60 HTPC. I'll update if that method works, or if it frys my module.
@deviat1 The Libre Computer eMMC modules are not wired the same as the ODROID eMMC modules so the adapters are not compatible.
@wappi The next preview image is almost complete. It has eMMC OS transfer capability.
Yep adapter A) not wired the same, but also use a different connecter period...
@wappi what command did you use to format your emmc?
@wappi why do you say that?
So I ended up taking my emmc module, and flashing it after I wiped it with zeros.
cmd I ran first:
root@libre-computer:~# sudo dd if=/dev/zero of=/dev/mmcblk0
dd: writing to '/dev/mmcblk0': No space left on device
61071361+0 records in
61071360+0 records out
31268536320 bytes (31 GB, 29 GiB) copied, 2554.3 s, 12.2 MB/s
root@libre-computer:~#
This wiped the Android image that was there, then I downloaded the LibreElec image I wanted and used gzip to extract the file leaving me with the .img.
To transfer the image, I then ran:
root@libre-computer:~# dd bs=4M if=LibreELEC-LePotato.arm-8.90.6.img of=/dev/mmcblk0
137+1 records in
137+1 records out
575668224 bytes (576 MB, 549 MiB) copied, 21.0296 s, 27.4 MB/s
root@libre-computer:~#
Shutdown, pulled my MicroSD and Voila, I boot into Kodi. Will finally be able to test out some 4K60 and other formats that I wasn't able to before.
Hope this helps others out.
Really good news that Libreelec works. I wonder why.
However, for me Libreelec is fast enough from SD card. I am looking for Ubuntu or Android from emmc... but I will try Kodi as well now. 😉
Thank you.
@loverpi Maybe Libre.computer devs can provide emmc images for Ubuntu and Android copying the LibreElec way?