Boot from eMMC with blank SD in slot... - No boot


#1

When I boot from eMMC with blank SD inside - System will not start (First boot A83T is from SD) , When I plug when the system is already running - is not recognized. Is it possible to recognize the SD Card after boot? (like USB-stick - “put & ->System can his see”)

Or do we need ‘redirector’ on SD-Bootsector? (like old PC && Floppy Disk) ?

Great from Austria

@sinovoip Can you the new images cleanse the boot partitions of all the garbage? Leave only what is needed to BPi-M3. Thx


#2

@sinovoip I am a little disappointed. I thought it was a few minutes for you (!?) And I not gotten any - even evasive answers.

Great from Austria eW


(JRG) #3

Same problem here. I boot the eMMC just fine. If I insert the blank SD it will not boot. Seems like it ALWAYS checks the SD to boot first. Can this be fixed / changed? I would like to use the SD for storage only, not the OS.


#4

I got it! Recognize tthe SD cart after boot by plug - like Android

Edit the file “sys_config.fex” and look for [mmc0_para] The path: this path (or file) ist ONLY for for Resolution 1080P /BPI-M3-bsp/sunxi-pack/chips/sun8iw6p1/configs/BPI_M3_1080P/sys_config.fex
(https://github.com/BPI-SINOVOIP/BPI-M3-bsp)

;-------------------------------------------------------------------------------- ; SDMMC PINS MAPPING | ; ------------------------------------------------------------------------------| ; Config Guide | ; sdc_used: 1-enable card, 0-disable card | ; sdc_detmode: card detect mode | ; 1-detect card by gpio polling | ; 2-detect card by gpio irq(must use IO with irq function) | ; 3-no detect, always in for boot card | ; 4-manually insert and remove by /proc/driver/sunxi-mmc.x/insert| ; sdc_buswidth: card bus width, 1-1bit, 4-4bit, 8-8bit | ; sdc_use_wp: 1-with write protect IO, 0-no write protect IO | ; sdc_isio: for sdio card | ; sdc_regulator: power control.if card supports UHS-I/DDR and HS200 timing for| ; SD3.0 or eMMC4.5, regulator must be configured. the value is | ; the ldo name of AXP221, eg: sdc_regulator = “axp22_eldo2” | ; other: GPIO Mapping configuration | ; ------------------------------------------------------------------------------| ; Note: | ; 1 if detmode=2, sdc_det’s config=6 | ; else if detmode=1, sdc_det’s config=0 | ; else sdc_det IO is not necessary | ; 2 if the customer wants to support UHS-I and HS200 features, he must provide| ; an independent power supply for the card. This is only used in platforms | ; that supports SD3.0 cards and eMMC4.4+ flashes
… |… … ;-------------------------------------------------------------------------------- [mmc0_para] sdc_used = 1 sdc_detmode = 3 sdc_buswidth = 4 sdc_clk = port:PF02<2><1><2> sdc_cmd = port:PF03<2><1><2> sdc_d0 = port:PF01<2><1><2> sdc_d1 = port:PF00<2><1><2> sdc_d2 = port:PF05<2><1><2> sdc_d3 = port:PF04<2><1><2> sdc_det = port:PF06<0><1><2> sdc_use_wp = 0 sdc_wp = sdc_isio = 0 sdc_regulator = “none” sdc_power_supply = “vcc-card” … … …

And the most important!

Change sdc_detmode from 3 to 1

after compile und “dd”…

root@BananaPiM3:~ # dmesg | tail [ 155.365740] mmc1: new high speed SDHC card at address 59b4 [ 155.372439] mmcblk1: mmc1:59b4 USD00 29.5 GiB [ 155.378893] mmcblk1: p1 p2 [ 155.382764] sd init ok

root@BananaPiM3:~ # cat /proc/partitions major minor #blocks name

179 0 7634944 mmcblk0 179 1 262144 mmcblk0p1 179 2 7270400 mmcblk0p2 179 32 4096 mmcblk0boot1 179 16 4096 mmcblk0boot0 179 48 30981120 mmcblk1 179 49 51200 mmcblk1p1 179 50 30827520 mmcblk1p2

But sdc_detmode=1 is good ONLY for eMMC, for SD card use sds_detmode=3 (SD-card with sdc_detmode=1 no boot)

Great


(JRG) #5

I am a little confused. Do I have to rebuild the entire kernel then dd it to the eMMC? Will this allow the device to boot from eMMC with a SD inserted? Do you have any instructions on the build process or the way to update the boot method? This is driving me crazy. I really want to just use the SD slot as storage.


#6

Nope, ask sinovoip ;:smiley:


(JRG) #7

So in other words to use both emmc and SD I need to boot from SD? :confused:

Ah well I guess I’ll do that then. What a shame. Was hoping to boot from emmc then mount SD as storage for /home.


(bpi team) #8

if you want boot from emmc , you need clear SD boot information.

step 1: Please input commend: sudo dd if=/dev/zero of=${card} bs=1k seek=8


#9

So in other words to use both emmc and SD I need to boot from SD? :confused:

No! Put the files im eMMC with “dd” and after reboot (from emmc) you can use ANY card (inserting after boot - like usb-flash in pc). It will be recognized ( look at the dmesg | tail or fdisk -l) . You must only mount this Card.


#10

I have no such intention , that EVERY "SD Card " to prepare before placing it in the BpiM3 - which also obtained by changing the parameter sdc_detmode

@sinovoip is it possible change sdc_detmode from bootargs (uEnv.txt) ?


(bpi team) #11

for our newest image ,have include configfile when emmc boot and need use SD card

please see bananapi/bpi-m3/linux dir, it have a file:script.bin.emmc.

when you boot from eMMC ,replace this file :script.bin.emmc ,then you can Dynamic insertion SD card


#12

@sinovoip

Did you read my question ? Because that’s what you made is not the answer .

is it possible change sdc_detmode from bootargs (uEnv.txt) ?


(Antonio Pisano) #13

Hello, sorry to revive an old thread, but I have this same problem: I own a BPI-M3 and I have flashed the emmc with a working debian image. When no SD card is inserted everything works fine, system boots and works ok.

I have an empty SD card that I can mount manually after boot. However, if I try to boot with the SD card inserted, BPI just hangs and does not boot at all.

Ho can I boot from emmc with an empy SD card inserted? I really cannot manually plug the SD every time I reboot!

Thanks in advance

Antonio


(Sebastian) #14

Hi there.

my Banana is finally booting from emmc and now I’m trying to get a SD card regognized. When it’s inserted while booting - it won’t boot from the emmc - when it’s inserted after booting it’s not recognized in any way. (dmesg)

when you boot from eMMC ,replace this file :script.bin.emmc ,then you can Dynamic insertion SD card

replace with what?

I’m using the latest Raspbian Lite release downloaded from your homepage.


(vikrant) #15

I want to protect eMMC from unauthorized access. Attacker can boot from SD card & easily mount eMMC to access it. Is there is any way to prevent boot from SD card permanently ?

I’ve Banana Pi M2 +.


(Evgeniy) #16

I have the same problem. I cant to boot with microSD. But when i boot BPI whitout microsd and after i insert the cart in board, i cant see microsd. I would like to use the card like a file storage. How can i do it?


Banana Pi M2 Ultra - Can't boot from EMMC if microSD inserted
#17

The solution for Banana Pi M3, 2016-05-15-debian-8-jessie-lite-bpi-m3-sd-emmc.img:

  1. install to emmc, remove sd card and reboot
  2. mount /dev/mmcblk0p1 /mnt and edit /mnt/bananapi/bpi-m3/linux/uEnv.txt
  3. change script=script.bin to script=script.bin.emmc (comment/uncomment or edit) and save
  4. reboot
  5. insert the sd card. it should now be visible (use fdisk -l to verify)
  6. zero the sd card: dd if=/dev/zero of=/dev/mmcblk1 bs=1M
  7. reboot and use your sd card as you like

Disclaimer: I’m pretty new to Banana/Raspberry and may be missing other aspects of the solution.