• Before reporting problems with your board running Armbian, check the following:

    • 1. Check power supply, check SD card and check other people experiences   06/23/17

      Power supply issues are one of the three biggest issues you'll face when starting with Single Board Computers (SBCs). SD card issues, whether fake or faulty, are another and issues resulting from poor board design is the other common issues you can encounter.   Power supply issues can be tricky. You might have a noisy power supply that works with one board because it has extra filtering, but won't work with another. Or you're using that cheap phone charger because your board has a microUSB connector, and it is either erratic, or doesn't start up, or even becomes the cause of some SD card issues.    Some tips to avoid the most common causes of problems reported:   Don't power via micro USB  - unless you have optimised your setup for low power requirements. Micro USB is great for mobile phones because they are simply charging a battery. It's bad for SBCs. Yes, it does work for a lot of people, but it also causes more problems and headaches over time than it is worth, unless you know exactly what you are doing. If you have a barrel jack power connector on your SBC, use it instead! If there is an option for powering via header connections, use that option!
        Don't use mobile phone chargers. They might be convenient and cheap, but this is because they are meant for charging phones, not powering your SBC which has particular power requirements.
        When you are evaluating a power supply, make sure you run some stress tests on your system to ensure that it will not cause issues down the path.   (Micro) SD card issues can be sneaky. They might appear right at the start causing strange boot and login errors, or they might cause problems over time. It is best to run a test on any new SD card you use, to ensure that it really is what it is, and to ensure that isn't faulty. Armbian provides you a simple way to do this   --   armbianmonitor -c /path/to/device/to/test  
    • 2. Make sure to collect and provide all necessary information   06/24/17

      We can only help if you provide quality information for us to work with. All stable images from the download section are tested, most stable upgrades are tested and we have tens of thousands of users. Even with regular and extensive testings, bugs sometimes do slip through. This is a voluntary support service and is unrelated to board makers, and is not obligated to provide you any answers. Repeated asking the same questions because you're not happy with the answers will result in you being ignored.

      Before you post a question, use the forum search as someone else might have already had the same problem and resolved it. And make sure you've read the Armbian documentation. If you still haven't found an answer, make sure you include the following in your post:   1. Logs when you can boot the board: armbianmonitor -u (paste URL to your forum post)   2. If your board does not boot, provide a log from serial console or at least make a picture, where it stops.   3. Describe the problem the best you can and provide all necessary info that we can reproduce the problem. We are not clairvoyant or mind readers. Please describe your setup as best as possible so we know what your operating environment is like.     We will not help in cases you are not using stable official Armbian builds, you have a problem with 3rd party hardware or reported problem would not be able to reproduced.

Boot from eMMC with blank SD in slot (BPI-M3)
1 1

11 posts in this topic

Recommended Posts

I use "Semi_Armbian_5.07_M3", how can I mount blank SD? 

When I boot from eMMC with blank SD inside - System will not start (First boot A83T is from SD) , When I plug when the systen is already running - is not recognized.

Do we need  'redirector' on SD-Bootsector? (like PC+ Floppy Disk) ?

 

After inserting the SD:

 

 

 

 

 

root@BananaPiM3:~# fdisk -l

Disk /dev/mmcblk0: 7,3 GiB, 7818182656 bytes, 15269888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x000ac9e8

Device         Boot  Start      End  Sectors  Size Id Type
/dev/mmcblk0p1 *    204800   729087   524288  256M  c W95 FAT32 (LBA)
/dev/mmcblk0p2      729088 15269887 14540800    7G 83 Linux

Disk /dev/mmcblk0boot1: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/mmcblk0boot0: 4 MiB, 4194304 bytes, 8192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
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
root@BananaPiM3:~# blkid -c /dev/null
/dev/mmcblk0: PTUUID="000ac9e8" PTTYPE="dos"
/dev/mmcblk0p1: SEC_TYPE="msdos" LABEL="BPI-BOOT" UUID="4621-6220" TYPE="vfat" PARTUUID="000ac9e8-01"
/dev/mmcblk0p2: LABEL="BPI-ROOT" UUID="c551b64c-2f93-4c4c-b35b-5b1680f8a207" TYPE="ext4" PARTUUID="000ac9e8-02"

 

 

 

 

 

 

Great

eW

 

#tkaiser

have you this  (Semi_Armbian_5.07_M3) like minimal?  Without X? Thx. (ich putze nich gerne :P  )

Share this post


Link to post
Share on other sites

I use "Semi_Armbian_5.07_M3", how can I mount blank SD? 

 

Do a web search for /devices/platform/sunxi-mmc.1/mmc_host how to get an SD card recognized after boot (I explained the whole stuff a few weeks here in another forum thread but forum search doesn't work). If you have an SD card inserted at boot the SoC will prefer that so you need still bootloader on the SD card even if rootfs is on the eMMC. It should work just the usual way by using nand-sata-install.sh to write all the stuff from SD card to eMMC but then not wiping out the whole SD card but simply using the former rootfs ext4 partition for data and leaving the first sectors of the card intact.

Share this post


Link to post
Share on other sites

I got it! :thumbup:

After boot from eMMC i plug SD and ... voila!   Effect as in "Android"











 

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

 

 

 

 

 

 

 // Clone BPI-M3-bsp //

Edit the file sys_config.fex
/BPI-M3-bsp/sunxi-pack/chips/sun8iw6p1/configs/BPI_M3_1080P/sys_config.fex
 

I use HDMI-1080P, for other Resolution or Video Output must chage the path /BPI_M3_1080P/

 

Edit sys_config.fex:  aud look for [mmc0_para]

 

 

 

.
.
.
.
. ...

;--------------------------------------------------------------------------------
;   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><default>
sdc_cmd           = port:PF03<2><1><2><default>
sdc_d0            = port:PF01<2><1><2><default>
sdc_d1            = port:PF00<2><1><2><default>
sdc_d2            = port:PF05<2><1><2><default>
sdc_d3            = port:PF04<2><1><2><Default>
sdc_det           = port:PF06<0><1><2><default>
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 (BPI-M3-bsp)  boot from SD Card, flash eMMC with the  5 files ,

 

export card=/dev/mmcblk1

 

dd if=boot0_sdcard.fex of=${card} bs=1k seek=8
dd if=u-boot.fex of=${card} bs=1k seek=19096
dd if=sunxi_mbr.fex of=${card} bs=1k seek=20480
dd if=boot-resource.fex of=${card} bs=1k seek=36864
dd if=env.fex of=${card} bs=1k seek=69632
dd if=boot.fex of=${card} bs=1k seek=86016

 

Shutdown -h now, SD card out, boot fom eMMC, plug the SD inside and.....   Problem solved! :thumbup: 

 

Great

eW

 

 
JTI likes this

Share this post


Link to post
Share on other sites

After compile (BPI-M3-bsp)  boot from SD Card, flash eMMC with the  5 files ,

 

export card=/dev/mmcblk1

 

dd if=boot0_sdcard.fex of=${card} bs=1k seek=8

dd if=u-boot.fex of=${card} bs=1k seek=19096

dd if=sunxi_mbr.fex of=${card} bs=1k seek=20480

dd if=boot-resource.fex of=${card} bs=1k seek=36864

dd if=env.fex of=${card} bs=1k seek=69632

dd if=boot.fex of=${card} bs=1k seek=86016

 

Nope, this shouldn't be necessary since even @sinovoip figured out how to read files in u-boot after one year. There is a small FAT partition where their u-boot script looks for uEnvt.txt in the following location there: bananapi/bpi-m3/linux/uEnv.txt. And you can also put script.bin there (bananapi/bpi-m3/linux/script.bin) so after such minor modifications it should be enough to use bin2fex/fex2bin to alter the contents there.

 

As a side note: I tried to outline what's necessary to use an inserted SD card at boot not for the rootfs (but instead use the faster eMMC for that and put any data on the ext4 partition of the SD card):

 

http://irclog.whitequark.org/linux-sunxi/2016-05-24#16549392;

 

The whole 'trick' is keeping the first MB of the SD card (containing bootloader, kernel and an initrd) and to edit uEnv.txt there to point to eMMC to be used for the rootfs. After this you can delete the contents of the ext4 partition on the SD card (but not destroy or alter partitions!) and to use it for any purpose you like (needs an entry in /etc/fstab on eMMC then and for device identifiers looking at /proc/partitions is a good idea).

Share this post


Link to post
Share on other sites
 
Nope ?
I have no such intention , that EVERY "SD Card " to prepare before placing it in the BpiM3 . I'm not active developer ( in the 90s I programmed in 'C' and assembler ) . As a normal user was looking for such a solution : I put the "SD Card " in the slot , and I want to see you through the operating system .
Links to chat on IRC are not for me to solve this problem - and for every normal USER (no developer) too. ;)
 
And by the way , in which of these five files , after compiling the sys_config.fex?
 
 

Share this post


Link to post
Share on other sites

And we can still boot from a inserted SD card, if there is somethings wrong with the eMMC? So the "original boot loader" isn't changed and the SDCard is prefered before the eMMC?

Thanks.

Share this post


Link to post
Share on other sites

And we can still boot from a inserted SD card, if there is somethings wrong with the eMMC?

 

Two options with Allwinner SoCs since boot priority on all known devices is 'SD card first, then eMMC'

  • the SD card gets ignored if there is no SPL signature found. In this case to be able to boot from SD card you would have to exchange SD card
  • the SD card contains a valid SPL signature (and at least u-boot). In this case the settings on SD card have to switch to eMMC for normal boots but you could setup things in a way that an alternative OS could be booted from SD card too

The 2nd approach with our current implementation (relying on device nodes and not UUIDs) is somewhat tricky/broken so better wait for fixes (relying on UUIDs and also needing some tweaks for u-boot installation postinstall script)

References:

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

1 1

  • Support the project

    We need your help to stay focused on the project.

    Choose the amount and currency you would like to donate in below.