This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TMS320DM8168: Failed to boot from emmc boot partition

Part Number: TMS320DM8168

Tool/software: Linux

Does dm8168 support boot from emmc boot partition? It can successfully boot from user data area. But when I move the MLO,u-boot.bin files to the emmc boot partition, and formatted the boot partition to be fat32, it did not boot successfully and continued printing ‘□'. So what is the problem?How can I boot from emmc boot partition? 

  • Hi user,

    Yes, we have customers able to boot from DM816x eMMC. Make sure you are aligned with DM816x silicon errata and DM816x ROM Code requirements.

    DM816x silicon errata, Advisory 2.1.72 — ROMCODE: ROM Code Does Not Support Booting From eMMC Devices of Size 4GB or More

    DM816x TRM, section 25.7.4 SD Cards

    See also below e2e threads:

    e2e.ti.com/.../254208
    e2e.ti.com/.../151914
    e2e.ti.com/.../307812

    Regards,
    Pavel
  • Hi Pavel,
    Thanks for your answer. My eMMC device is of size 2 GB. And it can successfully boot when MLO, u-boot.bin files are put in the eMMC user data area. What I want to do now is to boot from the eMMC boot partitions, which are visible as /dev/mmcblk0boot0 and /dev/mmcblk0boot1 in Linux. But I find it failed to boot when I copy the MLO and u-boot.bin files into the two boot partitions. It prints nothing but □□□□.
  • Hi Pavel,
    Thanks for your answer. My eMMC device is of size 2 GB. And it can successfully boot when MLO, u-boot.bin files are put in the eMMC user data area. What I want to do now is to boot from the eMMC boot partitions, which are visible as /dev/mmcblk0boot0 and /dev/mmcblk0boot1 in Linux. But I find it failed to boot when I copy the MLO and u-boot.bin files into the two boot partitions. It prints nothing but □□□□.
  • User,

    user4451846 said:
    And it can successfully boot when MLO, u-boot.bin files are put in the eMMC user data area.

    What is eMMC user data area? Can you provide full console boot up log when you are booting from  eMMC user data area?

    user4451846 said:
    But I find it failed to boot when I copy the MLO and u-boot.bin files into the two boot partitions. It prints nothing but □□□□.

    Do you mean you see "CCCC...." print of the console? Can you provide the boot up log in this case?

    What is your sysboot pins configuration?

    Check also the below wiki for debug hints.

    Regards,
    Pavel

  • user,

    Check also the below e2e post:

    e2e.ti.com/.../1653586

    Regards,
    Pavel
  • Hi,Pavel

    Pavel Botev said:

    What is eMMC user data area? 

    Boot partitions are two of the physical partitions in emmc, as is shown in the following picture.They are usually in the size of 1MB ~ 4MB. And User data area is one of the physical partition with the largest size in eMMC ,which is used most often.

    Pavel Botev said:

    Can you provide full console boot up log when you are booting from  eMMC user data area?

    This is the whole log when booting from eMMC user data area. 

    U-Boot 2010.06 (Feb 12 2018 - 09:20:37)
    
    set gp7,28,29 pin to output and high level state
    config 7611 rst pin done
    config E2PROM A0/A1 to input
    DRAM:  1 GiB
    MMC:   OMAP SD/MMC: 0
    Using default environment
    
    Hit any key to stop autoboot:  0 
    8168 close the dog & feed dog one time
    raise: Signal # 8 caught
    reading u-boot1.bin
    
    220400 bytes read
    ## Starting application at 0x80800000 ...
    
    
    U-Boot 2010.06 (Feb 12 2018 - 09:22:38)
    
    TI8168-GP rev 2.1
    
    HDVICP clk     : 600MHz
    L3 Fast clk    : 560MHz
    HDVPSS clk     : 280MHz
    Ducati M3 clk  : 280MHz
    DSP clk        : 813MHz
    ARM clk        : 987MHz
    DDR clk        : 675MHz
    
    --------- DDR PLL ----------
    DDR_N                  : 0x32
    DDR_P                  : 0x1
    DDR_MDIV1              : 0x2
    DDR_INTFREQ2           : 0x9
    DDDDR_FRACFREQ2R_N     : 0x0
    DDR_MDIV2              : 0x19
    DDR_INTFREQ3           : 0xD
    DDR_FRACFREQ3          : 0x800000
    DDR_MDIV3              : 0x2
    DDR_INTFREQ4           : 0xE
    DDR_FRACFREQ4          : 0x0
    DDR_MDIV4              : 0x4
    DDR_INTFREQ5           : 0xE
    DDR_FRACFREQ5          : 0x0
    DDR_MDIV5              : 0x4
    
    ----------EMIF Timings (identical for 0 & 1)-------
    EMIF_TIM1   : 0x1777C9E5
    EMIF_TIM2   : 0x60D87FF4
    EMIF_TIM3   : 0x001F8D0F
    EMIF_SDREF  : 0x10001356
    EMIF_SDCFG  : 0x62A73B32
    EMIF_PHYCFG : 0x00000110
    
    I2C:   ready
    set gp7,28,29 pin to output and high level state
    config 7611 rst pin done
    config E2PROM A0/A1 to input
    DRAM:  1 GiB
    NAND:  HW ECC BCH8 Selected
    256 MiB
    MMC:   OMAP SD/MMC: 0
    raise: Signal # 8 caught
    *** Warning - bad CRC or MMC, using default environment
    
    
    Net:   <ethaddr> not set. Reading from E-fuse
    Detected MACID:88:c2:55:8a:95:c8
    Ethernet PHY: GENERIC @ 0x01
    REG:0x0, DATA=0x2100
    REG:0x1, DATA=0x7849
    REG:0x2, DATA=0x4000
    REG:0x3, DATA=0x5201
    REG:0x4, DATA=0x181
    REG:0x5, DATA=0x0
    REG:0x6, DATA=0x4
    REG:0x7, DATA=0x2001
    REG:0x8, DATA=0x0
    REG:0x9, DATA=0x0
    REG:0xa, DATA=0x0
    REG:0xb, DATA=0x0
    REG:0xc, DATA=0x0
    REG:0xd, DATA=0x0
    REG:0xe, DATA=0x0
    REG:0xf, DATA=0x0
    REG:0x10, DATA=0x4040
    REG:0x11, DATA=0x6902
    REG:0x12, DATA=0x0
    REG:0x13, DATA=0x42
    REG:0x14, DATA=0x3000
    REG:0x15, DATA=0x0
    REG:0x16, DATA=0x20
    REG:0x17, DATA=0x100
    REG:0x18, DATA=0xC234
    REG:0x19, DATA=0x0
    REG:0x1a, DATA=0x0
    REG:0x1b, DATA=0xA1D0
    REG:0x1c, DATA=0x0
    REG:0x1d, DATA=0x0
    REG:0x1e, DATA=0x0
    REG:0x0, DATA=0x2100
    REG:0x1, DATA=0x7849
    REG:0x2, DATA=0x4000
    REG:0x3, DATA=0x5201
    REG:0x4, DATA=0x181
    REG:0x5, DATA=0x0
    REG:0x6, DATA=0x4
    REG:0x7, DATA=0x2001
    REG:0x8, DATA=0x0
    REG:0x9, DATA=0x0
    REG:0xa, DATA=0x0
    REG:0xb, DATA=0x0
    REG:0xc, DATA=0x0
    REG:0xd, DATA=0x0
    REG:0xe, DATA=0x0
    REG:0xf, DATA=0x0
    REG:0x10, DATA=0x4040
    REG:0x11, DATA=0x6902
    REG:0x12, DATA=0x0
    REG:0x13, DATA=0x0
    REG:0x14, DATA=0x3000
    REG:0x15, DATA=0x0
    REG:0x16, DATA=0x20
    REG:0x17, DATA=0x100
    REG:0x18, DATA=0xC234
    REG:0x19, DATA=0x0
    REG:0x1a, DATA=0x0
    REG:0x1b, DATA=0xA1D0
    REG:0x1c, DATA=0x0
    REG:0x1d, DATA=0x0
    REG:0x1e, DATA=0x0
    reset phy by set gpio 7
    DaVinci EMAC
    ~~~Please press enter key to boot from backup kernel~~~
    Hit any key to stop autoboot:  0 
    8168 close the dog & feed dog one time
    raise: Signal # 8 caught
    raise: Signal # 8 caught
    mmc rescan return 0
    reading boot.scr
    
    409 bytes read
    Running bootscript from MMC/SD to set the ENV...
    ## Executing script at 80900000
    dcrc:bdf412d2(bdf412d2) len : 159,addr 80900040
    reading uImage
    
    6621912 bytes read
    ## Booting kernel from Legacy Image at 81000000 ...
       Image Name:   Linux-2.6.37
       Image Type:   ARM Linux Kernel Image (uncompressed)
       Data Size:    6621848 Bytes = 6.3 MiB
       Load Address: 80008000
       Entry Point:  80008000
    8168 close the dog & feed dog one time
       Verifying Checksum ... dcrc:744b475f(744b475f) len : 650a98,addr 81000040
    OK
       Loading Kernel Image ... OK
    OK
    
    Starting kernel kernel cmd console=ttyO0,115200n8 root=/dev/mmcblk0p2 mem=256M ddr_mem=1024M rootwait rootfstype=ramfs rw noinitrd nolock init=/linuxrc ip=192.165.54.223:192.165.54.32:192.165.54.1:255.255.255.0::eth0:on notifyk.vpssm3_sva=0xBEE00000 vram=20M
    
    Starting kernel ...
    
    8168 close the dog & feed dog one time
    Linux version 2.6.37 (huxiaojie@guo) (gcc version 4.5.3 20110311 (prerelease) (GCC) ) #45 Sun Feb 11 11:09:59 CST 2018
    CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c53c7f
    CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
    Machine: ti8168evm
    vram size = 20971520 at 0x0
    ti81xx_reserve: ### Reserved DDR region @8ff00000
    reserved size = 20971520 at 0x0
    FB: Reserving 20971520 bytes SDRAM for VRAM
    Memory policy: ECC disabled, Data cache writeback
    OMAP chip is TI8168 2.1
    Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 59648
    Kernel command line: console=ttyO0,115200n8 root=/dev/mmcblk0p2 mem=256M ddr_mem=1024M rootwait rootfstype=ramfs rw noinitrd nolock init=/linuxrc ip=192.165.54.223:192.165.54.32:192.165.54.1:255.255.255.0::eth0:on notifyk.vpssm3_sva=0xBEE00000 vram=20M
    PID hash table entries: 1024 (order: 0, 4096 bytes)
    Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
    Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
    Memory: 234MB 1MB = 235MB total
    Memory: 224016k/224016k available, 38128k reserved, 0K highmem
    Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
        DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
        vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
        lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .init : 0xc0008000 - 0xc096a000   (9608 kB)
          .text : 0xc096a000 - 0xc0d82000   (4192 kB)
          .data : 0xc0d82000 - 0xc0dc7000   ( 276 kB)
    SLUB: Genslabs=11, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
    NR_IRQS:407
    IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
    Total of 128 interrupts on 1 active controller
    GPMC revision 6.0
    Trying to install interrupt handler for IRQ400
    Trying to install interrupt handler for IRQ401
    Trying to install interrupt handler for IRQ402
    Trying to install interrupt handler for IRQ403
    Trying to install interrupt handler for IRQ404
    Trying to install interrupt handler for IRQ405
    Trying to install interrupt handler for IRQ406
    Trying to install type control for IRQ407
    Trying to set irq flags for IRQ407
    OMAP clockevent source: GPTIMER1 at 27000000 Hz
    Console: colour dummy device 80x30
    Calibrating delay loop... 986.31 BogoMIPS (lpj=4931584)
    pid_max: default: 32768 minimum: 301
    Security Framework initialized
    Mount-cache hash table entries: 512
    CPU: Testing write buffer coherency: ok
    devtmpfs: initialized
    TI81XX: Map 0x8ff00000 to 0xfe500000 for dram barrier
    TI81XX: Map 0x40300000 to 0xfe600000 for sram barrier
    omap_voltage_early_init: voltage driver support not added
    regulator: core version 0.5
    regulator: dummy: 
    NET: Registered protocol family 16
    omap_voltage_domain_lookup: Voltage driver init not yet happened.Faulting!
    omap_voltage_add_dev: VDD specified does not exist!
    OMAP GPIO hardware version 0.1
    OMAP GPIO hardware version 0.1
    omap_mux_init: Add partition: #1: core, flags: 0
    _omap_mux_get_by_name: Could not find signal i2c2_scl.i2c2_scl i2c2_scl
    _omap_mux_get_by_name: Could not find signal i2c2_sda.i2c2_sda i2c2_sda
    registered ti816x_gpio_vr device
    registered ti816x_sr device
    Cannot clk_get ck_32
    pm_dbg_init: only OMAP3 supported
    registered ti81xx_vpss device
    registered ti81xx_vidout device
    registered ti81xx on-chip HDMI device
    registered ti81xx_fb device
    registered ti81xx_vin device
    bio: create slab <bio-0> at 0
    gpio_vr gpio_vr: failed to get the gpios
    gpio_vr: probe of gpio_vr failed with error -16
    vgaarb: loaded
    SCSI subsystem initialized
    omap_i2c omap_i2c.1: bus 1 rev4.0 at 100 kHz
    I2C: Read failed at pcf8575_cir_enable 670 with error code: -121
    I2C: Transfer failed at pcf8575_cir_enable 676 with error code: -121
    omap_i2c omap_i2c.2: bus 2 rev4.0 at 100 kHz
    Advanced Linux Sound Architecture Driver Version 1.0.23.
    Switching to clocksource gp timer
    NET: Registered protocol family 2
    IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
    TCP established hash table entries: 8192 (order: 4, 65536 bytes)
    TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
    TCP: Hash tables configured (established 8192 bind 8192)
    TCP reno registered
    UDP hash table entries: 256 (order: 0, 4096 bytes)
    UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
    NET: Registered protocol family 1
    RPC: Registered udp transport module.
    RPC: Registered tcp transport module.
    RPC: Registered tcp NFSv4.1 backchannel transport module.
    NetWinder Floating Point Emulator V0.97 (double precision)
    PMU: registered new PMU device of type 0
    omap-iommu omap-iommu.0: ducati registered
    omap-iommu omap-iommu.1: sys registered
    JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
    msgmni has been set to 437
    io scheduler noop registered
    io scheduler deadline registered
    io scheduler cfq registered (default)
    Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
    omap_uart.0: ttyO0 at MMIO 0x48020000 (irq = 72) is a OMAP UART0
    console [ttyO0] enabled
    omap_uart.1: ttyO1 at MMIO 0x48022000 (irq = 73) is a OMAP UART1
    omap_uart.2: ttyO2 at MMIO 0x48024000 (irq = 74) is a OMAP UART2
    brd: module loaded
    loop: module loaded
    omap2-nand driver initializing
    ONFI param page 0 valid
    ONFI flash detected
    NAND device: Maf ID: 0x2c, Chip ID: 0xca (Micron, NAND 256MiB 3,3V 16-bit)
     erasesize: 0x20000, writesize: 2048, oobsize: 64
    omap2-nand: detected x16 NAND flash 
    Creating 6 MTD partitions on "omap2-nand.0":
    0x000000000000-0x000000260000 : "U-Boot"
    0x000000260000-0x000000280000 : "U-Boot Env"
    0x000000280000-0x000000580000 : "U-Boot Logo"
    0x000000580000-0x0000030a0000 : "File Read Only"
    0x0000030a0000-0x00000d1e0000 : "File System"
    0x00000d1e0000-0x000010000000 : "Reserved"
    [ssd1322] begin to init LCD
    [ssd1322] spi mode 00
    [ssd1322] spi 9 bits per word
    [ssd1322] spi 10000000 Hz (max)
    [ssd1322] array_sz 8612
    [ssd1322] all lcd init data send ok
    [ssd1322] begin to init LCD
    [ssd1322] spi mode 00
    [ssd1322] spi 9 bits per word
    [ssd1322] spi 10000000 Hz (max)
    [ssd1322] array_sz 8612
    [ssd1322] all lcd init data send ok
    davinci_mdio davinci_mdio.0: davinci mdio revision 1.6
    davinci_mdio davinci_mdio.0: detected phy mask fffffffd
    davinci_mdio.0: probed
    davinci_mdio davinci_mdio.0: phy[1]: device 0:01, driver unknown
    mice: PS/2 mouse device common for all mice
    omap_rtc omap_rtc: rtc core: registered omap_rtc as rtc0
    i2c /dev entries driver
    Linux video capture interface: v2.00
    OMAP Watchdog Timer Rev 0x00: initial timeout 60 sec
    notify_init : notify drivercreated  for  remote proc id 2 at physical Address 0xbee00000
    Registered tvp5158 audio codec
    mcasp(2) : lck sel 0
    mcasp(2) : clk rate @@@@@@@@@@@@@@@@   24576000   0xfa050000 later
    clock: 'mcasp0_fck' clock's parent 'sysclk20_ck' is in use can't change the rate usecount = 2
    mcasp(0) : lck sel 0
    mcasp(0) : clk rate @@@@@@@@@@@@@@@@   24576000   0xfa038000 later
    asoc: tvp5158-hifi <-> davinci-mcasp.0 mapping ok
    asoc: tlv320aic3x-hifi <-> davinci-mcasp.2 mapping ok
    asoc: HDMI-DAI-CODEC <-> hdmi-dai mapping ok
    ALSA device list:
      #0: TI81XX SOUND0
      #1: TI81XX SOUND1
    TCP cubic registered
    NET: Registered protocol family 17
    VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
    omap_voltage_late_init: Voltage driver support not added
    Power Management for TI81XX.
    smartreflex smartreflex: Driver initialized
    omap_rtc omap_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
    mmc0: new high speed MMC card at address 0001
    mmcblk0: mmc0:0001 MMC02G 1.78 GiB 
    mmcblk0boot0: mmc0:0001 MMC02G partition 1 1.00 MiB
    mmcblk0boot1: mmc0:0001 MMC02G partition 2 1.00 MiB
     mmcblk0: p1 p2 p3
     mmcblk0boot1:
     mmcblk0boot0: p1
    davinci_mdio davinci_mdio.0: resetting idled controller
    net eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, id=40005201)
    IP-Config: Complete:
         device=eth0, addr=192.165.54.223, mask=255.255.255.0, gw=192.165.54.1,
         host=192.165.54.223, domain=, nis-domain=(none),
         bootserver=192.165.54.32, rootserver=192.165.54.32, rootpath=
    Freeing init memory: 9608K
    
        System initialization...
    
        Hostname       : DVR_RDK_HW
    
    
        Kernel release : Linux 2.6.37
        Kernel version : #45 Sun Feb 11 11:09:59 CST 2018
    
     Mounting /proc             : [SUCCESS]
     Mounting /sys              : [SUCCESS]
     Mounting /dev              : [SUCCESS]
     Mounting /dev/shm              : [SUCCESS]
     Mounting /dev/pts          : [SUCCESS]
     Enabling hot-plug          : [SUCCESS]
     Populating /dev            : [SUCCESS]
     Mounting other filesystems : [SUCCESS]
     Starting syslogd           : [SUCCESS]
     Starting telnetd           : [SUCCESS]
     Mounting /debug             : [SUCCESS]
    
    System initialization complete.

    Pavel Botev said:

    Do you mean you see "CCCC...." print of the console? Can you provide the boot up log in this case?

    It may be the same. I think this charater may be different because of different charater encoding. I have no boot log when it boots from the eMMC boot partition because when power up, it just prints nothing but charaters like "CCC" or in my case "□□□".

    Pavel Botev said:

    What is your sysboot pins configuration?

    Do you mean the MBOOT[4:0] in TRM? In my case, MBOOT[4:0] = 10111,and I keep it same when I try to boot from eMMC user data area and eMMC boot partition.

    Pavel Botev said:

    Check also the below wiki for debug hints.

    I  have browsed the wiki you provide. But I did not find things useful for my case.Because they concern little about how to boot from eMMC boot partition.

    Sincerely waiting for your help.Thanks.

  • user4451846 said:
    Boot partitions are two of the physical partitions in emmc, as is shown in the following picture.They are usually in the size of 1MB ~ 4MB. And User data area is one of the physical partition with the largest size in eMMC ,which is used most often.

    From what I understand, "user data area" boot mode correspond to "raw mode" described in DM816x TRM:

    25.7.4 SD Cards

    Raw mode, image data read directly from sectors in the user area. The contents of an SD card may be formatted as raw binary or within a FAT file system. The ROM Code reads out raw sectors from image or the booting file within the file system and boots from it. In raw mode the booting image can be located at one of the four consecutive locations in the main area: offset 0/20000h (128KB)/40000h (256KB)/60000h (384KB). The raw mode is detected by reading sectors #0, #256, #512, #768. The content of these sectors is then verified for presence of a TOC structure as described in Section 25.10.

    From what I understand, you are able to boot your DM816x board from eMMC in RAW mode and now trying to switch to "File system mode".

    Do you use the same MLO image for raw mode and filesystem mode? Have you tried that MLO image on MMC/SD card (not eMMC), if yes, does it boot successful? Note that there might be different requirements regarding the MLO image between raw mode and filesystem mode. In raw mode you will have MLO file + TOC header (512 bytes header), while in filesystem mode you do not have TOC header, check the below e2e post:

     

    Regarding filesystem mode, you can prepare your eMMC FAT32 from user space with the set of commands described in the below e2e posts:

     

    user4451846 said:
    Pavel Botev

    Do you mean you see "CCCC...." print of the console? Can you provide the boot up log in this case?

    It may be the same. I think this charater may be different because of different charater encoding. I have no boot log when it boots from the eMMC boot partition because when power up, it just prints nothing but charaters like "CCC" or in my case "□□□".


    Your MLO (located in eMMC FAT32 partition) is not properly detected by the ROM Code, thus ROM Code switch to the next booting devices in the list till reaching UART. When reaching UART, it prints CCCC... on the console.

    user4451846 said:
    Do you mean the MBOOT[4:0] in TRM? In my case, MBOOT[4:0] = 10111,and I keep it same when I try to boot from eMMC user data area and eMMC boot partition.

    Yes. Your MBOOT[4:0] pins looks to be correct.

    user4451846 said:
    I  have browsed the wiki you provide. But I did not find things useful for my case.Because they concern little about how to boot from eMMC boot partition.

    Check the trace vector values to understand the stage of the ROM code. You need to use JTAG to connect the board with CCS.

    If you can connect through JTAG, bring up a disassembly window to see where the program counter (PC) is. It should be somewhere in 0x20000-0x2C000 (ie, somewhere in ROM code). If you are in the interrupt table vectors (0x20080-0x200BC), the code is stuck in a dead loop. Refer to the Initialization chapter of the TRM to determine which dead loop is it. This will give you a clue on what went wrong. Typically it will be a data abort, which means the processor attempted to access a bad address.

    Regards,
    Pavel

     

     

  • Pavel Botev said:

    From what I understand, you are able to boot your DM816x board from eMMC in RAW mode and now trying to switch to "File system mode".

    I am confused about  the difference between "File system modeI" and "raw mode". According to the RTM, in raw mode, SD card may also be formatted within a FAT file system, which is the same as in "File system modeI". So dose it mean the key difference between the two modes is whether the MLO file contains a TOC header? If my understanding is right, then I used  "File system modeI" both in the eMMC boot partition and eMMC user data area. Because I didn''t add a TOC header into the MLO file .

    Pavel Botev said:

    Do you use the same MLO image for raw mode and filesystem mode? Have you tried that MLO image on MMC/SD card (not eMMC), if yes, does it boot successful? Note that there might be different requirements regarding the MLO image between raw mode and filesystem mode. In raw mode you will have MLO file + TOC header (512 bytes header), while in filesystem mode you do not have TOC header, 

    Yes, I use the same MLO file. According to my understanding, boot partition area and user data area are both physical partitons of eMMC. So  I can use the same MLO and uboot.bin files ,and use the same boot mode and operations in both this two situation. Am I misunderstanding? Is it possible that when power up, dm8168 cannot identify the two boot partitions of eMMC, or dm8168 treat boot partitons area and user data area differently?

  • user4451846 said:
    According to the RTM, in raw mode, SD card may also be formatted within a FAT file system, which is the same as in "File system modeI".

    Where exactly in TRM you find that info? Please specify the section number and page number. I made a search but I am not able to find such info.

    user4451846 said:
    So dose it mean the key difference between the two modes is whether the MLO file contains a TOC header?

    Yes.

    In raw mode the booting image can be located at one of the four consecutive locations in the main area. The raw mode is detected by reading sectors #0, #256, #512, #768. The content of these sectors is then verified for presence of a TOC structure as described in Section 25.10.

    In raw mode, the MLO file cannot be used. You need to add a TOC header to the MLO file - there is a specific 512 byte header that would need to be put first for the ROM to identify the image and switch to RAW mode. The MLO file is the boot binary + 8 bytes header, the RAW image is MLO + 512 byte TOC header. RAW mode will not work without the TOC header. For booting an MLO, the TOC only needs to contain a dummy CHSETTINGS section.

    user4451846 said:
    If my understanding is right, then I used  "File system modeI" both in the eMMC boot partition and eMMC user data area. Because I didn''t add a TOC header into the MLO file .

    Do you use FAT file system (FAT12/16/32) for the user data area? If yes, then seems you are using the "file system mode" for both user area and boot area.

    Regards,
    Pavel

  • Hi, Pavel

    I'm sorry for replying you after such a long time.

    Pavel Botev said:

    Where exactly in TRM you find that info? Please specify the section number and page number. I made a search but I am not able to find such info.

    In TRM 25.7.4 , "Raw mode, image data read directly from sectors in the user area. The contents of an SD card may be formatted as raw binary or within a FAT file system.". I think it means in Raw mode, emmc partitions can also be formatted within a FAT file system.

    Pavel Botev said:
    If yes, then seems you are using the "file system mode" for both user area and boot area.

    I just take the same operations when I boot from emmc boot area or emmc user area. I faile to boot from emmc boot partition while it can boot successfully from user area of eMMC. So did I do something wrong when boot from boot partition? Or DM8168 don't supprot  booting from boot partition of eMMC? Do Rom code has size limitation for partitions when booting from eMMC(I ask this because my eMMC device only has size of 1MB for the two boot partitions)?

  • user4451846 said:
    In TRM 25.7.4 , "Raw mode, image data read directly from sectors in the user area. The contents of an SD card may be formatted as raw binary or within a FAT file system.". I think it means in Raw mode, emmc partitions can also be formatted within a FAT file system.

    No, I do not think so. Which version of DM816x TRM you are using? On Rev C (SPRUGX8C) we have the below:

    25.7.4.1 Overview

    The ROM code supports booting from SD cards in the following conditions:

    • Raw mode, image data read directly from sectors in the user area.
    • File system mode (FAT12/16/32 supported with or without Master Boot Record), image data is read from a booting file.

    25.7.4.5 Initialization and Detection

    As previously mentioned, the contents of an SD card may be formatted as raw binary or within a FAT file system. The ROM Code reads out raw sectors from image or the booting file within the file system and boots from it.

    Per mine understanding, filesystem can NOT be used in RAW mode.

    user4451846 said:
    I just take the same operations when I boot from emmc boot area or emmc user area. I faile to boot from emmc boot partition while it can boot successfully from user area of eMMC. So did I do something wrong when boot from boot partition? Or DM8168 don't supprot  booting from boot partition of eMMC? Do Rom code has size limitation for partitions when booting from eMMC(I ask this because my eMMC device only has size of 1MB for the two boot partitions)?

    You should be able to boot from eMMC boot partition /dev/mmcblk1p1.

    Could you please provide me the exact steps you are doing for:

    1. Creating your MLO and u-boot.bin files

    2. formatting eMMC boot partition /dev/mmcblk1p1 to FAT and flash MLO/u-boot.bin files there

    3. formatting eMMC user area /dev/mmcblk1p2 to FAT and flash MLO/u-boot.bin files there

    Regards,
    Pavel

  • Pavel Botev said:
    You should be able to boot from eMMC boot partition /dev/mmcblk1p1.

    I think you may misunderstand the boot partitions of eMMC. The two boot partitions of eMMC are shown as /dev/mmcblk0boot0 and /dev/mmcblk0boot1, and the user data area  is shown as /dev/mmcblk0p1 /dev/mmcblk0p2  /dev/mmcblk0p3.

    Here are my exact steps:

    1.change MBOOT[4:0] to MBOOT[4:0]=10011 in order to boot from nand flash.

    2.

    / # fdisk /dev/mmcblk0boot0

    Disk /dev/mmcblk0boot0: 1 MB, 1048576 bytes
    4 heads, 16 sectors/track, 32 cylinders
    Units = cylinders of 64 * 512 = 32768 bytes

    2.

    Command (m for help): n
    Command action
    e extended
    p primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-32, default 1): 1
    Last cylinder or +size or +sizeM or +sizeK (1-32, default 32): 20

    Command (m for help): n
    Command action
    e extended
    p primary partition (1-4)
    p
    Partition number (1-4): 2
    First cylinder (21-32, default 21): Using default value 21
    Last cylinder or +size or +sizeM or +sizeK (21-32, default 32): Using default value 32

    Command (m for help): t
    Partition number (1-4): 1
    Hex code (type L to list codes): l

    0 Empty 1b Hidden Win95 FAT32 9f BSD/OS
    1 FAT12 1c Hidden W95 FAT32 (LBA) a0 Thinkpad hibernation
    4 FAT16 <32M 1e Hidden W95 FAT16 (LBA) a5 FreeBSD
    5 Extended 3c Part.Magic recovery a6 OpenBSD
    6 FAT16 41 PPC PReP Boot a8 Darwin UFS
    7 HPFS/NTFS 42 SFS a9 NetBSD
    a OS/2 Boot Manager 63 GNU HURD or SysV ab Darwin boot
    b Win95 FAT32 80 Old Minix b7 BSDI fs
    c Win95 FAT32 (LBA) 81 Minix / old Linux b8 BSDI swap
    e Win95 FAT16 (LBA) 82 Linux swap be Solaris boot
    f Win95 Ext'd (LBA) 83 Linux eb BeOS fs
    11 Hidden FAT12 84 OS/2 hidden C: drive ee EFI GPT
    12 Compaq diagnostics 85 Linux extended ef EFI (FAT-12/16/32)
    14 Hidden FAT16 <32M 86 NTFS volume set f0 Linux/PA-RISC boot
    16 Hidden FAT16 87 NTFS volume set f2 DOS secondary
    17 Hidden HPFS/NTFS 8e Linux LVM fd Linux raid autodetect
    Hex code (type L to list codes): c
    Changed system type of partition 1 to c (Win95 FAT32 (LBA))

    Command (m for help): a
    Partition number (1-4): 1

    Command (m for help): p

    Disk /dev/mmcblk0boot0: 1 MB, 1048576 bytes
    4 heads, 16 sectors/track, 32 cylinders
    Units = cylinders of 64 * 512 = 32768 bytes

    Device Boot Start End Blocks Id System
    /dev/mmcblk0boot0p1 * 1 20 632 c Win95 FAT32 (LBA)
    /dev/mmcblk0boot0p2 21 32 384 83 Linux

    Command (m for help): w
    The partition table has been altered.
    Calling ioctl() to re-read partition table
    mmcblk0boot0: p1 p2

    3.

    / # mkfs.vfat -F 32 -n boot /dev/mmcblk0boot0p1
    / # mkfs.ext2 -L rootfs /dev/mmcblk0boot0p2
    Filesystem label=rootfs
    OS type: Linux
    Block size=1024 (log=0)
    Fragment size=1024 (log=0)
    48 inodes, 384 blocks
    19 blocks (5%) reserved for the super user
    First data block=1
    Maximum filesystem blocks=262144
    1 block groups
    8192 blocks per group, 8192 fragments per group
    48 inodes per group

    4.

    / # mkdir /boot0

    / # mount /dev/mmcblk0boot0p1 /boot0

    5.

    / # cd /boot0/
    /boot0 # cp /files/MLO ./
    /boot0 # cp /files/u-boot1.bin ./

    6.Power down. Change MBOOT pins to MBOOT[4:0] = 10111 in oder to boot from eMMC. Then power up.

    And it can not  boot successfully.

  • user4451846 said:
    I think you may misunderstand the boot partitions of eMMC. The two boot partitions of eMMC are shown as /dev/mmcblk0boot0 and /dev/mmcblk0boot1, and the user data area  is shown as /dev/mmcblk0p1 /dev/mmcblk0p2  /dev/mmcblk0p3.

    Thanks for that explanation, I think I understand now the main issue.

    Booting from eMMC boot area partition (/dev/mmcblkXboot0) is NOT supported by DM816x device. You can use only eMMC user area partition (/dev/mmcblkXp1) for boot from eMMC. Check the below e2e threads, these threads are for AM335x device, but the same is valid for DM816x device.

    Booting from eMMC boot area partition (/dev/mmcblkXboot0) is supported only for AM57x/DRA7x devices and is called Alternative boot mode, refer to the below pointers for more info:

    processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User's_Guide#Using_SD.2C_eMMC_or_USB_storage

    Booting MLO and u-boot from eMMC boot partition

    http://processors.wiki.ti.com/index.php/Linux_Core_MMC/SD_User's_Guide

    Regards,
    Pavel

  • Thanks for you reply. I think this may explain why I failed to boot from /dev/mmcblkXbootX. Now I want to try in other ways. In the e2e thread  

    it mentioned  "You might be able to modify u-boot code such that the boot ROM will load MLO from the user data area and the modified MLO will look for u-boot in a boot partition." So what exact steps should I follow if I want to put  MLO in the user data area and put u-boot in a boot partition /dev/mmcblkXbootX?

  • Xiaojie Hu said:
    it mentioned  "You might be able to modify u-boot code such that the boot ROM will load MLO from the user data area and the modified MLO will look for u-boot in a boot partition." So what exact steps should I follow if I want to put  MLO in the user data area and put u-boot in a boot partition /dev/mmcblkXbootX?

    I do not have a list with the exact steps. In general, you should modify the MLO code to load u-boot from eMMC boot area, as  MLO by default will load u-boot from user area.

    For detailed software support please contact any of the select partners recommended below.

    Regards,
    Pavel

  • Hi Pavel,
    Thanks for you help.

    Regards,
    Hu