How to use eMMC on A20-OLinuXino-LIME2-eMMC

Started by chradev, April 05, 2016, 02:43:16 AM

Previous topic - Next topic

LubOlimex

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
Technical support and documentation manager at Olimex

MHayer

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

LubOlimex

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
Technical support and documentation manager at Olimex

winfried

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
---- Atelier Algorythmics --- [url="http://algo.mur.at/"]http://algo.mur.at/[/url] ----

winfried

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

---- Atelier Algorythmics --- [url="http://algo.mur.at/"]http://algo.mur.at/[/url] ----