Jump to content

a20 doesn´t boot from EMMC


alr

Recommended Posts

Hi!
I look for this topic in every place at the internet but all of the topics are not related with my problem.

I have a custom board based on the Lime2-emmc.
It can boot from SD, but when I tried to copy the same u-boot-sunxi-with-spl.bin to the emmc  and try to boot, nothing happends, the screen is empty.
dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk1 bs=1024 seek=8
boot from SD

http://imgur.com/a/OHxzm



When it boots from SD the u-boot shows both (SD on MMC0 and EMMC on MMC1)
I´m using the A20-OLinuXino-Lime2-eMMC_defconfig with some mods to my board.
My emmc is unit is  KLM8G1GEME-B041 and is connected to the board like the emmc unit is connected to A20-OLinuXino-Lime2_Rev_G

http://imgur.com/a/GIY3W

I did a hexdump on the SD and MMC and it looks the same with the "eGON.BT0" tag in the right position.
SD
http://imgur.com/a/AL6lv
MMC
http://imgur.com/a/bM5v3

 

Thanks!

 

Link to comment
Share on other sites

Hi again,
A funny thing. :-[
When it boots from the SD card, and the u-boot prompt appears, if I remove the SD card and send the reset command, the board starts from the EMMC without problems.

U-Boot SPL 2017.03-rc2-dirty (Feb 15 2017 - 10:37:04)
DRAM: 1024 MiB
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from MMC1

U-Boot 2017.03-rc2-dirty (Feb 15 2017 - 10:37:04 +0100) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)                                                    
Model: Olimex A20-OLinuXino-LIME2-eMMC                                          
I2C:   ready                                                                    
DRAM:  1 GiB                                                                    
MMC:   SUNXI SD/MMC: 0, SUNXI SD/MMC: 1                                                                                                                                       
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
SCSI:  AHCI PHY power up failed.                                                
Net:   No ethernet found.                                                       
starting USB...                                                                 
USB0:   USB EHCI 1.00                                                           
USB1:   USB OHCI 1.0                                                            
USB2:   USB EHCI 1.00                                                           
USB3:   USB OHCI 1.0                                                            
scanning bus 0 for devices... 1 USB Device(s) found                             
scanning bus 2 for devices... 1 USB Device(s) found                             
       scanning usb for storage devices... 0 Storage Device(s) found            
Hit any key to stop autoboot:  0                                                                                           
=> reset  
resetting ...                                                                   
                                                                                
U-Boot SPL 2017.01-armbian (Feb 09 2017 - 14:44:38)                             
DRAM: 1024 MiB                                                                  
CPU: 912000000Hz, AXI/AHB/APB: 3/2/2                                            
Trying to boot from MMC2                                                        
                                                                                
U-Boot 2017.01-armbian (Feb 09 2017 - 14:44:38 +0100) Allwinner Technology      
                                                                                
CPU:   Allwinner A20 (SUN7I)                                                    
Model: Olimex A20-OLinuXino-LIME2-eMMC                                          
I2C:   ready                                                                    
DRAM:  1 GiB                                                                    
MMC:   SUNXI SD/MMC: 1, SUNXI SD/MMC: 0                                         
*** Warning - bad CRC, using default environment                                
                                                                                
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
SCSI:  AHCI PHY power up failed.                                                
Net:   No ethernet found.                                                       
Hit any key to stop autoboot:  0                                               


6944 bytes read in 150 ms (44.9 KiB/s)                                          
switch to partitions #0, OK                                                     
mmc0(part 0) is current device

Any hints?

 

Link to comment
Share on other sites

Hi Martinayotte.

Yes the versions are different, because the first one is the one loaded into the EMMC card with armbian  and the one into the SD is only the uboot.

Yes, I am sure about that was the file.

 

As you can see in my previous message is booting from the EMMC only when it reboots, so that says that the Uboot is working properly only when the board is already started.

Link to comment
Share on other sites

With the SD loaded with U-Boot 2017.01-armbian

I can boot and manage the board. I did a nand-sata-install and now the content of the SD and MMC is the same (checked with hexdump) but the board is not booting from the EMMC.

The config is one based on A20-OLinuXino-Lime2-eMMC_defconfig, but modified for my board:

CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_MACH_SUN7I=y
CONFIG_DRAM_CLK=360
CONFIG_DRAM_MBUS_CLK=400
CONFIG_DRAM_ZQ=91
CONFIG_DRAM_ODT_EN=y
CONFIG_DRAM_TPR3=0x041111
CONFIG_DRAM_DQS_GATING_DELAY=0x04040404
# CONFIG_DRAM_TIMINGS_VENDOR_MAGIC is not set
CONFIG_DRAM_TIMINGS_DDR3_1066F_1333H=y
CONFIG_USB0_VBUS_PIN=""
CONFIG_USB0_VBUS_DET=""
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2-emmc"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
CONFIG_SPL=y
CONFIG_MMC0_CD_PIN="PH15"
CONFIG_MMC_SUNXI_SLOT = 2
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_DFU=y
CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_FPGA is not set
CONFIG_DFU_RAM=y
CONFIG_RTL8211X_PHY_FORCE_MASTER=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP_ALDO3_VOLT=2800
CONFIG_AXP_ALDO4_VOLT=2800
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
CONFIG_G_DNL_VENDOR_NUM=0x1f3a
CONFIG_G_DNL_PRODUCT_NUM=0x1010

this is my fdisk -l output

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       2048 15213343 15211296  7.3G 83 Linux

Disk /dev/mmcblk1: 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: 0x8a6be3e2

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk1p1       2048 15117183 15115136  7.2G 83 Linux

Disk /dev/mmcblk1boot1: 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
Disklabel type: dos
Disk identifier: 0xeb695f6b

Device              Boot Start   End Sectors Size Id Type
/dev/mmcblk1boot1p1          1  8191    8191   4M 83 Linux

Disk /dev/mmcblk1boot0: 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
Disklabel type: dos
Disk identifier: 0xaf98e9b7

Any hints?

 

Link to comment
Share on other sites

4 minutes ago, zador.blood.stained said:

I don't think this is a correct option or even a correct syntax (with spaces). I think this is the option you need to use:


CONFIG_MMC_SUNXI_SLOT_EXTRA=2

 

Yeah, that´s was copy/paste from another file.

Thanks.

I meant:

CONFIG_ARM=y
CONFIG_ARCH_SUNXI=y
CONFIG_SPL_I2C_SUPPORT=y
CONFIG_MACH_SUN7I=y
CONFIG_DRAM_CLK=360
CONFIG_DRAM_MBUS_CLK=400
CONFIG_DRAM_ZQ=91
CONFIG_DRAM_ODT_EN=y
CONFIG_DRAM_TPR3=0x041111
CONFIG_DRAM_DQS_GATING_DELAY=0x04040404
# CONFIG_DRAM_TIMINGS_VENDOR_MAGIC is not set
CONFIG_DRAM_TIMINGS_DDR3_1066F_1333H=y
CONFIG_USB0_VBUS_PIN=""
CONFIG_USB0_VBUS_DET=""
CONFIG_DEFAULT_DEVICE_TREE="sun7i-a20-olinuxino-lime2-emmc"
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
CONFIG_SYS_EXTRA_OPTIONS="SUNXI_GMAC,RGMII,AHCI,SATAPWR=SUNXI_GPC(3)"
CONFIG_SPL=y
CONFIG_MMC0_CD_PIN="PH15"
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_DFU=y
CONFIG_CMD_USB_MASS_STORAGE=y
# CONFIG_CMD_FPGA is not set
CONFIG_DFU_RAM=y
CONFIG_RTL8211X_PHY_FORCE_MASTER=y
CONFIG_ETH_DESIGNWARE=y
CONFIG_AXP_ALDO3_VOLT=2800
CONFIG_AXP_ALDO4_VOLT=2800
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_MUSB_GADGET=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="Allwinner Technology"
CONFIG_G_DNL_VENDOR_NUM=0x1f3a
CONFIG_G_DNL_PRODUCT_NUM=0x1010

But still doesn´t boot

Link to comment
Share on other sites

26 minutes ago, zador.blood.stained said:

Serial console logs? "Doesn't boot" may mean a lot of different things.

As I told in earlier posts, nothings appears in the Serial console, is completely empty, like nothings happends.

Link to comment
Share on other sites

Just now, alr said:

As I told tin earlier post, nothings appears in the Serial console, is completely empty, like nothings happends.

This means that SPL is not loaded (even if u-boot is misconfigured it would print something like "unknown boot source"). 

 

On 16.02.2017 at 11:37 AM, alr said:

if I remove the SD card and send the reset command, the board starts from the EMMC without problems.

Is this still true? Is the eMMC accessible if you load u-boot using FEL mode (and does the board fall back to FEL without SD inserted or not)?

Maybe eMMC doesn't have enough time to reset properly on cold start, or 3.3V power (according to Lime2 rev. G schematic it is enabled with EXTEN pin) doesn't turn on fast enough.

Did you try to press the reset button multiple times without SD inserted?

Link to comment
Share on other sites

21 hours ago, zador.blood.stained said:

This means that SPL is not loaded (even if u-boot is misconfigured it would print something like "unknown boot source"). 

 

Is this still true? Is the eMMC accessible if you load u-boot using FEL mode (and does the board fall back to FEL without SD inserted or not)?

 

Yes. I load a u-boot via FEL mode and then type reset without SD card and it boots from the eMMC. I lost the version I compiled to this board. How I can get this boot info to put in another board.

21 hours ago, zador.blood.stained said:

Maybe eMMC doesn't have enough time to reset properly on cold start, or 3.3V power (according to Lime2 rev. G schematic it is enabled with EXTEN pin) doesn't turn on fast enough.

 

I have to check that.

21 hours ago, zador.blood.stained said:

Did you try to press the reset button multiple times without SD inserted?

Yes, and it isn´t working

 

Link to comment
Share on other sites

I just realized that the boot and boot1 sectors of the emmc on the LIme2-emmc board are 16Mb each. And the boot sectors on my EMMC of my custom board are 4MB each. is this related with the SPL?

Can I configure armbian u-boot to change this?

 

Thanks again.

Link to comment
Share on other sites

1 minute ago, alr said:

I just realized that the boot and boot1 sectors of the emmc on the LIme2-emmc board are 16Mb each. And the boot sectors on my EMMC of my custom board are 4MB each. is this related with the SPL?

Can I configure armbian u-boot to change this?

AFAIK A20 BROM boots fine from u-boot located in the "main" eMMC partition, I don't think anybody investigated what offsets and configuration should be used with boot partitions and whether BROM checks them.

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