Jump to content

Install debian in Lime2-eMMC


costel.vasiliu

Recommended Posts

Hello,

 

I tried several times to install debian in eMMC on Lime2, using nand-sata-install, without success, getting with the message :

 

"There are no targets. Please check your drives."

 

Note that on the same board, the official debian image provided by Olimex is working and can be installed in eMMC

 

Checking with "dmesg | grep mmc", I don't find mmcblk1 (only mmcblk0).

 

I tried with 3.4.112 image from armbian (also with 4.5.2).

 

I installed a lot of images on Lime2 in NAND, so I'm not so unexperienced, but I don't understand where I'm wrong (or what I don't know) 

 

Thanks for any help !

 

Regards,

 

Link to comment
Share on other sites

Lime2 eMMC support is not enabled by default. Patches are present, so you need to enable and recompile uboot, install and then you should be possible to use installer.

 

Why we didnt add it by default i don't remember. Perhaps because of some problems with non mmc boards or by no reason at all.

 

Wrote on mobile phone

Link to comment
Share on other sites

Why we didnt add it by default i don't remember. Perhaps because of some problems with non mmc boards or by no reason at all.

Either eMMC or NAND can be enabled by default since they share pins.

  • Enabling eMMC in u-boot (via patch) should be safe, this is needed to boot from eMMC.
  • Enabling eMMC in fex files by default can be done only for boards that don't have NAND variant. This is needed to see eMMC in OS.
  • For mainline there will be separate DT file for Lime2-eMMC board.
Link to comment
Share on other sites

Hi costel.vasiliu,

 

Hello,

 

I tried several times to install debian in eMMC on Lime2, using nand-sata-install, without success, getting with the message :

 

"There are no targets. Please check your drives."

 

Note that on the same board, the official debian image provided by Olimex is working and can be installed in eMMC

 

Checking with "dmesg | grep mmc", I don't find mmcblk1 (only mmcblk0).

 

I tried with 3.4.112 image from armbian (also with 4.5.2).

 

I installed a lot of images on Lime2 in NAND, so I'm not so unexperienced, but I don't understand where I'm wrong (or what I don't know) 

 

Thanks for any help !

 

Regards,

 

You can find my posts about enabling and usage of eMMC (and more) on Lime2-eMMC boards on:

http://forum.armbian.com/index.php/topic/853-armbian-customization/

 

Best regards

Chris

Link to comment
Share on other sites

Hi all, I see that this is a recent thread and seems a good place to ask a similar question relating to getting Armbian on the Lime2-eMMC, which I have been attempting to do for a few days now. I have read through the related threads (the armbian-customization thread, plus the ones pertaining to the other boards), and this seems a good location to document my complete efforts to get it working for other newbies. ;)

 

The last attempt using nand-sata-install failed with a complete failure to boot, not even loading u-boot, so I set that aside for the moment and will come back to it shortly.

 

But the alternative I've successfully got to boot is:

 

Build Armbian with the emmc-compatible patches.

cp lib/patch/kernel/sunxi-next/add-emmc-lime2.patch.disabled userpatches/kernel/sunxi-next/add-emmc-lime2.patch
cp lib/patch/u-boot/u-boot-next/add-emmc-lime2.patch.disabled userpatches/u-boot/u-boot-next/add-emmc-lime2.patch
./compile.sh BOARD=lime2 BRANCH=next RELEASE=xenial KERNEL_ONLY=no PROGRESS_DISPLAY=plain 

Copy to SD card and boot from it. Check that the eMMC is detected.

root@lime2:~# dmesg | grep mmc
[    0.000000] Kernel command line: console=ttyS0,115200 console=tty1 root=/dev/mmcblk0p1 rootwait rootfstype=ext4 cgroup_enable=memory swapaccount=1 sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_no_mali_mem_reserve sunxi_fb_mem_reserve=16 hdmi.audio=EDID:0 disp.screen0_output_mode=1920x1080p60 panic=10 consoleblank=0 enforcing=0 loglevel=1
[    3.819355] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    3.852205] sunxi-mmc 1c0f000.mmc: base:0xf08dc000 irq:26
[    3.888722] mmc0: host does not support reading read-only switch, assuming write-enable
[    3.891047] mmc0: new high speed SDHC card at address 0001
[    3.891983] mmcblk0: mmc0:0001 00000 29.8 GiB 
[    3.892012] sunxi-mmc 1c11000.mmc: base:0xf08f2000 irq:27
[    3.893690]  mmcblk0: p1
[    3.905611] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 8, RTO !!
[    3.910023] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    3.910928] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    3.911820] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    3.912710] sunxi-mmc 1c11000.mmc: smc 1 err, cmd 55, RTO !!
[    3.951649] mmc1: new DDR MMC card at address 0001
[    3.952681] mmcblk1: mmc1:0001 P1XXXX 3.60 GiB 
[    3.953090] mmcblk1boot0: mmc1:0001 P1XXXX partition 1 16.0 MiB
[    3.953463] mmcblk1boot1: mmc1:0001 P1XXXX partition 2 16.0 MiB
[    3.954724]  mmcblk1: p1
[    6.193692] EXT4-fs (mmcblk0p1): mounted filesystem with writeback data mode. Opts: (null)
[    7.618451] EXT4-fs (mmcblk0p1): re-mounted. Opts: commit=600,errors=remount-ro

We have both mmcblk0 and mmcblk1, so the eMMC is detected. (Output might look a little different, the above is with the eMMC already partitioned.)

 

Copy over the same .raw image used for the SD card to the running system and dd it to the eMMC.

Now the problem I had with booting directly is that the rootfs is set to be /dev/mmcblk0 but the eMMC enumerates as mmcblk1, so the boot fails. We can set the rootfs by partition uuid instead.

 

Mount the eMMC, then look at the block device ids.

dd bs=1M if=Armbian_5.15_Lime2_Ubuntu_xenial_4.6.3.raw of=/dev/mmcblk1
mkdir -p /mnt/emmc
mount /dev/mmcblk1p1 /mnt/emmc

root@lime2:/mnt/emmc/boot# blkid
/dev/mmcblk0p1: UUID="4b73aadb-b2ef-49c9-b539-503ee3fe99be" TYPE="ext4" PARTUUID="e9b1e023-01"
/dev/mmcblk1p1: UUID="4b73aadb-b2ef-49c9-b539-503ee3fe99be" TYPE="ext4" PARTUUID="e9b1e023-01"
/dev/mmcblk0: PTUUID="e9b1e023" PTTYPE="dos"
/dev/mmcblk1: PTUUID="e9b1e023" PTTYPE="dos"

Note the two device uuids and partition uuids are the same since they've been dd-ed from the same raw image. Edit the boot script on the eMMC and change the root= kernel parameter from the mmcblk device to be the partition uuid from above, i.e.:

cd /mnt/emmc/boot
mv boot.cmd boot-old.cmd
sed 's_root=/dev/mmcblk0p1_root=PARTUUID=e9b1e023-01_' <boot-old.cmd >boot.cmd
mkimage -C none -A arm -T script -d boot.cmd boot.scr 

Now shutdown, pop out the SD card, power back up and you should be booting from the eMMC.

 

As said above, the SD card and eMMC have the same partition ids, which isn't great. But it doesn't affect the boot process, because the system will always boot from the SD card if it's present.

 

I will have a closer look at the sata-nand-install script now and see why that's failing.

Link to comment
Share on other sites

Hello,

 

Indeed, it works for kernel 4.6.x, but doesn't work for default kernel (3.4.112), of course, applying the appropriate patches for u-boot and kernel;  mmcblk1 cannot be seen.

 

And, MALI Open GLES works only on legacy kernel ...

 

... still searching ....

Link to comment
Share on other sites

Hi neomanic,

 

Hi all, I see that this is a recent thread and seems a good place to ask a similar question relating to getting Armbian on the Lime2-eMMC, which I have been attempting to do for a few days now. I have read through the related threads (the armbian-customization thread, plus the ones pertaining to the other boards), and this seems a good location to document my complete efforts to get it working for other newbies. ;)

 

...

 

I will have a closer look at the sata-nand-install script now and see why that's failing.

 

Take a look on armbian-customization thread probably all your questions have answers there.

 

Best regards

Chris

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines