Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A20 => Topic started by: chradev on April 05, 2016, 02:43:16 AM

Title: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: chradev on April 05, 2016, 02:43:16 AM
Hi to All,

I am trying to use eMMC (as MMC2) on A20-OLinuXino-LIME2-eMMC boards without success for now.
My tests are based on Armbian with both 3.4.111 (sunxi) and 4.2.3 (mainline) Linux kernels.
Some details about configurations are published on:

I would like to ask if somebody from Olimex is testing eMMC Lime2 options and how?
Will be published new image for Lime2 with GBit Ethernet and eMMC working?

Best regards
Chris
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: LubOlimex on April 07, 2016, 11:07:28 AM
Hey,

New image for the LIME2 with eMMC support and NAND install scripts is on the way. It has the GbE workaround applied.

It would be released by the end of this week.

Best regards,
Lub/OLIMEX
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: BMK on April 20, 2016, 08:24:27 PM
Hi,
Could someone please clarify for me;
Are olimex now shipping a version the Lime2 with emmc chip assembled? I hear sme things on the forum and blog but I can't find it in shop?
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: chradev on April 20, 2016, 08:33:09 PM
Yes they ship it (as new HW rev. E) and probably it is a question of time to updated the site.
Try specify one of the following options (as description or note to your order):
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: chradev on April 22, 2016, 12:27:04 PM
Hi to All,

I am facing at a problem to write to eMMC from U-Boot (2016.05-rc1 and 2015.10).
My try to update and save U-Boot environment finishes with fail to write to eMMC

=> setenv boot_targets scsi0 usb0 fel mmc0 mmc2 pxe dhcp
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... mmc write failed
failed

The same action works fine on SD/MMC

Any thoughts how to fix it?

Best regards
Chris
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: chradev on April 23, 2016, 02:37:36 PM
Quote from: chradev on April 22, 2016, 12:27:04 PM
I am facing at a problem to write to eMMC from U-Boot (2016.05-rc1 and 2015.10).
My try to update and save U-Boot environment finishes with fail to write to eMMC

=> setenv boot_targets scsi0 usb0 fel mmc0 mmc2 pxe dhcp
=> saveenv
Saving Environment to MMC...
Writing to MMC(0)... mmc write failed
failed

The same action works fine on SD/MMC

I have tested the failing case on the second a20-Olinuxino-Lime2-eMMC board I have.

And it works fine!
The problem is probably in the HW.

EDIT: see also http://forum.armbian.com/index.php/topic/853-armbian-customization/page-4#entry8074 (http://forum.armbian.com/index.php/topic/853-armbian-customization/page-4#entry8074)
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: lauhub on June 17, 2016, 09:51:00 AM
Hello,

I have the same problem with two Lime2 boards.

Does OLimex has any update on this ? Is this really hardware issue or something else ?

Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: akshay on November 07, 2016, 03:23:21 PM
I am unable to boot from eMMC. It halts at

Trying to boot from MMC2
MMC Device 1 not found
spl: could not find mmc device. error: -19
SPL: failed to boot from all boot devices


Please help boot
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: LubOlimex on November 15, 2016, 05:01:39 PM
Yes. There was a bug. We didn't follow our own image preparation instructions. This is now fixed.

Please use release 9 or newer.

The official Linux image was updated to release #9 and now should properly install to the eMMC memory: https://www.olimex.com/wiki/images/2/20/A20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_emmc_rel_9.torrent

The build instructions that go along with the official image can be found here: https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-build-3.4.103-release-4/BUILD_DESCRIPTION_A20_Olimex_kernel_3.4.103%2B_Jessie_rel_4.txt

Best regards,
Lub/OLIMEX

Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: eosss on January 27, 2017, 12:36:06 PM
I purchased this

https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2/open-source-hardware

I think I should be using this torrent because it is for NAND not eMMC?

a20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_NAND_rel_9.img.7z

Is that right?
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: igorpec on January 27, 2017, 07:54:51 PM
Alternatively you can try this:

https://www.armbian.com/olimex-lime-2/
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: Harry on January 29, 2017, 07:47:44 PM
Hello guys,

I'm a linux rookie having a lot of troubles following LubOlimex posted instructions:

https://github.com/OLIMEX/OLINUXINO/blob/master/SOFTWARE/A20/A20-build-3.4.103-release-4/BUILD_DESCRIPTION_A20_Olimex_kernel_3.4.103%2B_Jessie_rel_4.txt

1. <deb http://www.emdebian.org/debian squeeze main> does not work. On <http://www.emdebian.org/grip/> alternate Emdebian Grip packages are listed but I get errors:

failed to fetch from http://www.emdebian.org/grip/dists/wheezy-grip/main/source/Sources  404  Not Found
failed to fetch from http://www.emdebian.org/grip/dists/wheezy-grip/main/binary-amd64/Packages  404  Not Found
failed to fetch from http://www.emdebian.org/grip/dists/wheezy-grip/main/binary-armhf/Packages  404  Not Found

-> got the same errorsusing <deb http://www.emdebian.org/grip stable-grip main>, <deb http://ftp.uk.debian.org/emdebian/grip wheezy-grip main> and <deb http://ftp.uk.debian.org/emdebian/grip stable-grip main>

using <deb http://emdebian.bytesatwork.ch/mirror/grip wheezy-grip main> caused following error:
<debian the following signatures couldn't be verified because the public key is not available>

For adding a key I downloaded <http://qgis.org/de/site/forusers/alldownloads.html#debian> but I couldn't add the keys.
<gpg --recv-key 073D307A618E5811> forced following error:

gpg: requesting key 618E5811 from hkp server keys.gnupg.net
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

2. <apt-get install gcc-4.7-arm-linux-gnueabihf ncurses-dev uboot-mkimage build-essential git> throws following error:

Package uboot-mkimage is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  u-boot-tools:armhf u-boot-tools

E: Package gcc-4.7-arm-linux-gnueabihf cannot be found.
E: Using regular expressions »gcc-4.7-arm-linux-gnueabihf« no package can't be found.
E: Package 'uboot-mkimage' has no installation candidate

trying <apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install uboot-mkimage> instead does not help too.


I have absolutely no idea what to do next!
Can anyone help me please,
many thanks

(I'm using debian 8.7.1 amd64 as virtual host under MacOS):
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: igorpec on January 30, 2017, 09:05:01 AM
QuoteI have absolutely no idea what to do next!

Install Armbian for Lime2 and start using the board?  ::) It's updated, bugfixed and should be plug and play experience. It's 100% Olimex compatible. With Debian or Ubuntu base.

This will help you:
https://www.olimex.com/forum/index.php?topic=5092.0
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: Harry on January 30, 2017, 01:00:47 PM
Thx a lot so far Igorpec, I'll try Armbian for my LIME2.

But nevertheless I'm still interested in solving the problems following the instructions posted by Lub/OLIMEX (using a brand-new SD card Olinuxino image from OLIMEX provided 5 days ago). Does anyone else has similar errors and found a solution in the meantime?

greetings
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: JohnS on January 30, 2017, 03:36:04 PM
Looks like emdebian have changed things around so that things are now broken.  Ask them where they are now.

John
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: LubOlimex on January 31, 2017, 04:18:22 PM
Hey,

There is no point moving forward in the installation instructions if you fail a step. So focus on how to install the same tools that we have used or you would face many more problems moving forward.

The error you receive when you execute:

apt-get install gcc-4.7-arm-linux-gnueabihf ncurses-dev uboot-mkimage build-essential git

Means that you should try with u-boot-tools package instead of uboot-mkimage. Try with:

apt-get install gcc-4.7-arm-linux-gnueabihf ncurses-dev u-boot-tools build-essential git

Best regards,
Lub/OLIMEX
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: MHayer on February 07, 2017, 04:54:25 PM
Hello,

this is an request that is fit to the topic.
We have recently got the A20-OLinuxXino-LIME2-eMMC
with the corresponding SD card A20-LIME2-eMMC-DEBIAN-SD (from the end of last year).

We got our application running on the SD Card.
This system is now ready for use.
Now is the question: Can the whole file system be used from the eMMC?

I found an instruction that should do this:
In the root folder is an script "resize_sd.sh". This should bring the File System to fit in the 4 GB.
Then in the same folder the "emmc.sh" seems to copy all the files from the SD to the internal memory.
But, when I then start without the SD Card plugged. Nothing happens.
No message at the UART0 at all.

What I doing wrong?

Thanks
M. Hayer
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: LubOlimex on February 09, 2017, 10:47:57 AM
Hey,

The official Debian image for the LIME2 board with eMMC was updated few times, maybe the card that you got didn't have the latest release. Make sure to test with the image available as a torrent at the wiki article. I recommend you to first try the two scripts, and then deploy your software, e.g. first make sure that the default image boots from the eMMC before modifying anything.

The image I recommend can be downloaded from here: https://www.olimex.com/wiki/images/2/20/A20-lime2_mainline_uboot_sunxi_kernel_3.4.103_jessie_emmc_rel_9.torrent

Also refer to this: https://www.olimex.com/wiki/How_to_install_Debian_to_eMMC

Note that sometimes the script doesn't work the first time, we don't know why this happens. You need to try it a few times until it succeeds.

Best regards,
Lub/OLIMEX
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: winfried on March 21, 2017, 09:13:26 PM
Thank for the effort it worked for me.

Now I have the problem booting from emmc, the sd-card is not recognized any more:

Boot from emmc:
# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk0boot0 179:8    0   16M  1 disk
mmcblk0boot1 179:16   0   16M  1 disk
mmcblk0      179:0    0  3.6G  0 disk
|-mmcblk0p1  179:1    0   16M  0 part /boot
`-mmcblk0p2  179:2    0  3.6G  0 part /


Boot from SD-card:
root@A20-OLinuXino:~# lsblk
NAME         MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
mmcblk1boot0 179:16   0   16M  1 disk
mmcblk1boot1 179:24   0   16M  1 disk
mmcblk0      179:0    0  7.4G  0 disk
|-mmcblk0p1  179:1    0   16M  0 part /boot
`-mmcblk0p2  179:2    0  1.9G  0 part /
mmcblk1      179:8    0  3.6G  0 disk
|-mmcblk1p1  179:9    0   16M  0 part
`-mmcblk1p2  179:10   0  3.6G  0 part

Is sd-card not hotplug  ?
Any hints ?

mfg
winfried
Title: Re: How to use eMMC on A20-OLinuXino-LIME2-eMMC
Post by: winfried on March 23, 2017, 03:19:28 PM
I also found errors in the dmesg.log , does this mean the emmc is bad ?


[    2.514257] [mmc-msg] sw_mci_init
[    2.523412] [mmc-msg] MMC host used card: 0x5, boot card: 0x5, io_card 0
[    2.535504] [mmc-msg] sdc0 set round clock 400000, src 24000000
[    2.549716] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    2.567892] [mmc-msg] sdc0 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    2.584048] [mmc-msg] sdc0 Probe: base:0xf0146000 irq:64 sg_cpu:f0148000(4fc00000) ret 0.
[    2.594686] [mmc-msg] sdc0 power on
[    2.603626] [mmc-msg] sdc2 set round clock 400000, src 24000000
[    2.619679] [mmc-msg] sdc2 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    2.637665] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    2.654680] [mmc-msg] sdc2 Probe: base:0xf014a000 irq:66 sg_cpu:f014c000(4fc01000) ret 0.
[    2.667767] [mmc-msg] sdc0 set round clock 400000, src 24000000
[    2.766699] [mmc-err] smc 0 err, cmd 52,  RTO
[    2.782017] [mmc-err] smc 0 err, cmd 52,  RTO
[    2.794751] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    2.844069] [mmc-msg] sdc0 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    2.875634] [mmc-err] smc 0 err, cmd 8,  RTO
[    2.888139] [mmc-err] smc 0 err, cmd 5,  RTO
[    2.904216] [mmc-err] smc 0 err, cmd 5,  RTO
[    2.921919] [mmc-err] smc 0 err, cmd 5,  RTO
[    2.942469] [mmc-err] smc 0 err, cmd 5,  RTO
[    2.961220] [mmc-err] smc 0 err, cmd 55,  RTO
[    2.980044] [mmc-err] smc 0 err, cmd 55,  RTO
[    2.998875] [mmc-err] smc 0 err, cmd 55,  RTO
[    3.017699] [mmc-err] smc 0 err, cmd 55,  RTO
[    3.030404] [mmc-msg] sdc0 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.076495] [mmc-err] smc 0 err, cmd 1,  RTO
[    3.088771] [mmc-msg] sdc0 set ios: clk 0Hz bm OD pm OFF vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.111483] [mmc-msg] sdc0 power off
[    3.136716] [mmc-msg] sdc2 set ios: clk 0Hz bm PP pm UP vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.168806] [mmc-msg] sdc2 power on
[    3.200209] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.214627] [mmc-msg] sdc2 set round clock 400000, src 24000000
[    3.317583] [mmc-err] smc 2 err, cmd 52,  RTO
[    3.334928] [mmc-err] smc 2 err, cmd 52,  RTO
[    3.347664] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.367832] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.382259] [mmc-err] smc 2 err, cmd 8,  RTO
[    3.390576] [mmc-err] smc 2 err, cmd 5,  RTO
[    3.398885] [mmc-err] smc 2 err, cmd 5,  RTO
[    3.407196] [mmc-err] smc 2 err, cmd 5,  RTO
[    3.415505] [mmc-err] smc 2 err, cmd 5,  RTO
[    3.423904] [mmc-err] smc 2 err, cmd 55,  RTO
[    3.432382] [mmc-err] smc 2 err, cmd 55,  RTO
[    3.440865] [mmc-err] smc 2 err, cmd 55,  RTO
[    3.449344] [mmc-err] smc 2 err, cmd 55,  RTO
[    3.462048] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.480144] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.497875] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.515603] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.535712] [mmc-msg] sdc2 set ios: clk 400000Hz bm OD pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.568831] [mmc-msg] sdc2 set ios: clk 400000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.608552] [mmc-msg] sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 1 timing LEGACY(SDR12) dt B
[    3.623274] [mmc-msg] sdc2 set round clock 25000000, src 600000000
[    3.693118] [mmc-msg] sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 8 timing LEGACY(SDR12) dt B
[    3.707237] [mmc-err] smc 2 err, cmd 8,  EBE
[    3.714720] [mmc-err] In data read operation
[    3.724021] [mmc-msg] found data error, need to send stop command
[    3.734029] [mmc-err] sdc 2 send stop command failed
[    3.748444] [mmc-msg] sdc2 set ios: clk 25000000Hz bm PP pm ON vdd 3.3V width 4 timing LEGACY(SDR12) dt B
[    3.724021] [mmc-msg] found data error, need to send stop command
[    4.169181] EXT3-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)
[    4.247456] EXT2-fs (mmcblk0p2): error: couldn't mount because of unsupported optional features (240)


mfg
winfried