Unable to boot from eMMC with uSD card inserted


#1

I wanted to add a uSD card to be used to store data. When the card is inserted it will not boot. What is the reason for this ?


#2

Please boot from eMMC and check that Linux detects your uSD.
dmesg output:

[   61.034938] mmc0: new high speed SDHC card at address aaaa
[   61.042554] mmcblk0: mmc0:aaaa SC16G 14.8 GiB
[   61.053024]  mmcblk0: p1 p2
root@neutis-n5:~# ls -l /dev/mmcblk*
brw-rw---- 1 root disk 179, 96 Oct 24 06:21 /dev/mmcblk0
brw-rw---- 1 root disk 179, 97 Oct 24 06:21 /dev/mmcblk0p1
brw-rw---- 1 root disk 179, 98 Oct 24 06:21 /dev/mmcblk0p2
brw-rw---- 1 root disk 179,  0 Oct 24 06:20 /dev/mmcblk2
brw-rw---- 1 root disk 179, 32 Oct 24 06:20 /dev/mmcblk2boot0
brw-rw---- 1 root disk 179, 64 Oct 24 06:20 /dev/mmcblk2boot1
brw-rw---- 1 root disk 179,  1 Oct 24 06:20 /dev/mmcblk2p1
brw-rw---- 1 root disk 179,  2 Oct 24 06:20 /dev/mmcblk2p2

Also, please make sure that you flash a uSD card correctly. The easiest way is to use Etcher from Resin.


#3

I probably was not to clear on my post. Just in case. I do not want to boot from uSD. I want to boot from eMMC and use the uSD as a storage. I have access to the drive, but if i try to boot with the uSD inserted I get nothing in the terminal at all after boot.

If i install the uSD card after its booted its ok though.

root@neutis:~# fdisk -l | grep '^Disk'
Disk /dev/mmcblk2: 7.3 GiB, 7818182656 bytes, 15269888 sectors
Disklabel type: dos
Disk identifier: 0x01e0dbdc
Disk /dev/mmcblk2boot1: 4 MiB, 4194304 bytes, 8192 sectors
Disk /dev/mmcblk2boot0: 4 MiB, 4194304 bytes, 8192 sectors
Disk /dev/mmcblk0: 29.8 GiB, 32010928128 bytes, 62521344 sectors
Disklabel type: dos
Disk identifier: 0xfeb39e61
root@neutis:~# ls -l /dev/mmcblk*
brw-rw---- 1 root disk 179, 96 Oct 31 12:26 /dev/mmcblk0
brw-rw---- 1 root disk 179, 97 Oct 31 12:26 /dev/mmcblk0p1
brw-rw---- 1 root disk 179,  0 Oct 31 03:36 /dev/mmcblk2
brw-rw---- 1 root disk 179, 32 Oct 31 03:36 /dev/mmcblk2boot0
brw-rw---- 1 root disk 179, 64 Oct 31 03:36 /dev/mmcblk2boot1
brw-rw---- 1 root disk 179,  1 Oct 31 03:36 /dev/mmcblk2p1
brw-rw---- 1 root disk 179,  2 Oct 31 03:36 /dev/mmcblk2p2
root@neutis:~#

#4

Got it.

I think Neutis finds the valid key phrase (U-boot on uSD) and use uSD as a bootable device.
This describes here: https://docs.neutis.io/hardware-integration/fel/ .

You need to format your uSD and try to boot again.

Best regards,
Aleksandr


#5

I read that section before i posted the OP.
I tried 2 things neither of which caused it to boot.
#1) using Etcher i formatted the uSD card with the neutis-ubuntu-xenial-image_1.0.6.img. Stuck it in the dev kit and powered it on. nothing at all in the terminal.
#2) I then formatted the card. Stuck it in the dev kit and powered it on, and again nothing at all in the terminal.

This is why I dont understand why its getting hungup on boot when the uSD card is in.


#6

Please format the first part of the uSD from Linux OS:
dd if=/dev/zero of=${card} bs=1M count=1 , usually Linux detects a card as a /dev/mmcblk0

Then try to boot with the inserted uSD.
According to your first option(#1), maybe there is something wrong with the uSD or Etcher.
The v1.0.6 image works without any booting issues as far as I know.

Let me know how it goes.


#7

Im sorry, I meant to say in #1 i formatted the uSD. It was blank. If i use Etcher and put the image on it, it will boot from the uSD card just fine. But what I want is to boot from eMMC and use the uSD as storage.


#8

Please format the first part of the uSD from Linux OS using the following:
dd if=/dev/zero of=${card} bs=1M count=1, usually Linux detects a card as a /dev/mmcblk0.

Did you try this way?


#9

There seems to be some misunderstanding. There is no issue using the uSD. It works just fine.
The problem is that I can only use it after i have booted up from eMMC, and then inserting the card.
If i leave the uSD card in there and try to boot it does nothing.


#10

I got what you meant, I suggested formatting the uSD card using dd, insert it to SD connector and boot from eMMC with your formatted uSD.
In my opinion, Neutis detects some valid data on the uSD, it causes your issue.

So please tell me that you tried the way that I suggested and you still have this issue.

Best regards,
Aleksandr


#11

I have tried that already, still will not boot.
Can you get it to boot from eMMC with a uSD card inserted on your kit?

Even if there is data on the card it should not matter, unless that data is boot information. Because once I start storing files on it, there will be data on it.


#12

The setup that you would like to launch is workable.

It is quite strange issue. If I understand you right, you can boot from eMMC and from uSD. But you have no serial output if the empty uSD card inserted and the eMMC flashed with the correct image, don’t you?

Could you please check power LEDs and measure Neutis Devboard power consumption when the empty uSD inserted?


#13

It is quite strange issue. If I understand you right, you can boot from eMMC and from uSD. But you have no serial output if the empty uSD card inserted and the eMMC flashed with the correct image

That is correct.
Reset pressed without uSD inserted and booted to login prompt 188ma.
Reset pressed with uSD inserted and nothing in terminal 127ma
Reset pressed and booted to login prompt and then uSD inserted 207ma.
Both green leds on in all cases.


#14

Hi,
after reading about the issue i also tested to boot from emmc while a blank sd was inserted.
Its a little bit strange because if the sd card is in the slot and i power the neutis up while connecting to usb it works fine. But if i press the reset button or type “reboot -h now” UBOOT is trying to boot from the sd, even if i pulled out the sd before reboot. The only way to start the os is to disconnect and reconnect the power.
See the picture attached