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.

Booting BBB from eMMC raw partition

Other Parts Discussed in Thread: OMAPL138, OMAP-L138

We are using BBB based custom board with eMMC.
We want board to BOOt from raw eMMC partition,

Could you please help us if following partition structure would be okay or not.
I am pasting two partition table, we are planning to use table 1.

Table 1
Sr No binary Partition Address  
1 SPL1 raw 0x0 128 KB
2 SPL2 raw 0x20000 128 KB
3 SPL3 raw 0x40000 128 KB
4 SPL4 raw 0x60000 128 KB
5 uEnv.txt1 raw 0x80000 128 KB
6 uEnv.txt2 raw 0x100000 128 KB
7 U-Boot1 raw 0x120000 1 MB
8 U-Boot2 raw 0x220000 1 MB
9 uImage1 raw 0x320000 8 MB
10 uImage2 raw 0xB20000 8 MB
11 dtb1 raw 0x1320000 128 KB
12 dtb2 raw 0x1340000 128 KB
13 rootfs1 ext4 0x2000000 1 GB
14 rootfs2 ext4 0x42000000 1GB
Table 2
Sr No binary Partition Address Size
1 SPL1 raw 0x0 128 KB
2 SPL2 raw 0x20000 128 KB
3 SPL3 raw 0x40000 128 KB
4 SPL4 raw 0x60000 128 KB
5 U-Boot1 vFAT 0x100000 Partition size can
be 32 MB
u-boot - 1MB
u-Image - 8MB
dtb - 128 KB
uenv.txt - 128 KB
Total = 2 * ( 9 MB + 256 kb) + 12 MB buffer = 32 MB
6 U-Boot2 vFAT  
7 uEnv.txt1 vFAT  
8 uEnv.txt2 vFAT  
9 uImage1 vFAT  
10 uImage2 vFAT  
11 dtb1 vFAT  
12 dtb2 vFAT  
13 rootfs1 ext4 0x2000000 1 GB
14 rootfs2 ext4 0x42000000 1GB

So now my questions are

is it possible to have partition structure as mentioned in "Table1" ?

is it possible to have partition structure as mentioned in "Table2" ?

Any pitfall in either of the partition table structure ?

Any further suggestions/correction ?

Thank you,

Regards,
Ankur

  • Hi Ankur,

    Have you tried to boot SPL code from raw eMMC & got succeed ?

    I think, it is possible as per the 26.1.7.5.5 section in TRM.

    http://processors.wiki.ti.com/index.php/AM335x_board_bringup_tips#Peripheral.2FMemory_Booting_Issues

    I ask AM335x experts to look into this and will be addressed soon.

    Wish you a very happy & prosperous new year 2015.
  • Hi Titus,

    Thank you for reply,

    I haven't tried booting SPL code from raw eMMC but I too referred TRM and I assumed it to be working,
    because generally whatever i have seen TRM would work as mentioned.

    I referred below link also, where the process of raw writing explained.
    But it doesn't explain use of raw, Vfat & ext4 partitiong together.
    http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User%27s_Guide

    If some expert can check this partioning it will help us decide better.
    -----

    Before even putting my question, I knew first answer would be from you, :)
    You are kind & humble to reply all my queries(some of which were silly)!! :)
    Thank you very much for that.
    Apart from you I owe to "Guru Biser", He is also quick and to the point,
    At the same time he is humble in replying all silly queries,:)
    I would like to Thank him too!

    Overall Ti e2e is big help. Its a platform where developers like me get enough help,
    I would like to thank TI e2e for all help.

    Wishing you & TI e2e community a happy and prosperous new year 2015.

    Thank you,

    Best regards,
    Ankur
  • Just a hint for you.
    Trying to boot raw mode on AM335x EVM SK board.

    sudo dd if=MLO of=/dev/sdc

    where,
    /dev/sdc is raw device node of MMC/SD card.

    Log:

    U-Boot SPL 2013.10-00189-g78d8ebd-dirty (Jan 02 2015 - 13:37:41)
    >>spl:board_init_r()
    boot device - 8
    boot mode - RAW
    ### ERROR ### Please RESET the board ###


    Refer to the following TI wiki.

    http://processors.wiki.ti.com/index.php/AM335x_Android_eMMC_booting#Selection_of_MMC0_or_MMC1_as_boot_device_for_eMMC_Raw_boot_on_AM335xEVM
  • Thank you for reply Titus,

    I am trying on Beaglebone Black,
    Once I am successful, I will update the post.

    Regards,
    Ankur

  • Hi Ankur,

    The board booting from the first partition of the sd-card or eMMC. This partitions has to be formatted as 'W95 FAT16 (LBA)'. Please follow the instructions in:
    http://www.adminempire.com/how-to-install-arch-linux-on-beaglebone-black-bbb/ or
    http://e2e.ti.com/support/embedded/linux/f/354/p/383573/1354794#1354794

    BR
    Ivan
  • Hi Ivan,

    Thank you for reply,

    We are planning to use raw boot from eMMC.
    We don't want to load MLO from Vfat boot partition.

    Meanwhile can there be two BOOT partition ? Will ROM code check two boot partition if it doesn't find MLO in first one ?

    Thnak you,

    Regards,
    Ankur

  • Hi Ankur,

    Reading from AM335x Sitara™ Processors TRM section "26.1.7.5 MMC / SD Cards" I understand that you can have partitions structure as mentioned in "Table1" or "Table 2" but you have to strictly configure the eMMC depending "Table 26-20. Configuration Header TOC Item" and "Table 26-39. GP Device Image Format".

    I have not tried this myself, but I suspect you could make these partitions and can boot.

    BR
    Ivan
  • Hi Ivan,

    Thank you for reply,
    Exactly, I have know how to configure header TOC header :(

    Currently I tried repartitioning the eMMC and put the MLO, u-boot, uImage, dtb, uEnv.txt in boot folder but board doesn't boot.
    Partition information of eMMC is as follows,

    Disk /dev/mmcblk1: 1920 MB, 1920991232 bytes
    4 heads, 16 sectors/track, 58624 cylinders
    Units = cylinders of 64 * 512 = 32768 bytes
    
            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk1p1   *           1         978       31288   e Win95 FAT16 (LBA)
    /dev/mmcblk1p2             979       58624     1844672  83 Linux


    but when i boot the board without micro MMC card, i see following output.

    CCCCCCCCCCCCCCCCCCCC


    It means i didn't partition eMMC correctly. I have partitioned eMMC with steps same as MMC card.
    if possible could you please suggest me how to partition eMMC correctly ?


    Thank you,

    Regards,
    Ankur

  • Hi Ankur,

    If you want to use raw mode you can make eMMC just as explained in the TRM. But I see from your post that you are formatted your eMMC. My suggestion is to formatted eMMC just as explained in link in a my first post and boot your board from eMMC. I write my eMMC partitions.

    root@am335x-evm:/# fdisk -l

    Disk /dev/mmcblk0: 1920 MB, 1920991232 bytes, 3751936 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 identifier: 0x8436ffdf

    Device Boot Start End Blocks Id System
    /dev/mmcblk0p1 * 2048 34815 16384 e W95 FAT16 (LBA)
    /dev/mmcblk0p2 34816 3751935 1858560 83 Linux

    Meanwhile the CCCCCCCCCC known that the board wants to boot from UART. This mean that your boot order is not correct.

    BR
    Ivan
  • Hi Ivan,

    Thank you for reply,

    I partitioned and formated eMMC as per the post but it didn't work,

    One difference which i can see is fdisk in my BBB prints size and start & End interms of cylinders but
    in your case it shows blocks. See below output,

    The number of cylinders for this disk is set to 58624.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)
    
    Command (m for help): p
    
    Disk /dev/mmcblk1: 1920 MB, 1920991232 bytes
    4 heads, 16 sectors/track, 58624 cylinders
    Units = cylinders of 64 * 512 = 32768 bytes
    
            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk1p1   *           1         978       31288   e Win95 FAT16 (LBA)
    /dev/mmcblk1p2             979       58624     1844672  83 Linux
    
    Command (m for help):


    I am using buybox fdisk, are you also use the same ?
    Any suggestion to match as yours ?

    Thank you,

    Regards,
    Ankur

  • Also I'm able to see eMMC flash connected to different MMC interface.

    Ivan log,

    /dev/mmcblk0p1 * 2048 34815 16384 e W95 FAT16 (LBA)

    /dev/mmcblk0p2 34816 3751935 1858560 83 Linux

    Ankur log,

    /dev/mmcblk1p1   *           1         978       31288   e Win95 FAT16 (LBA)

    /dev/mmcblk1p2             979       58624     1844672  83 Linux

     

    Ankur, so please ensure the boot mode settings for eMMC1.

  • Hi Titus,

    Thank you for reply,

    For me mmcblk0 is micro SD card.

    So i have to use /dev/mmcblk1 only.

    I think boot mode setting is okay, Currently i am trying this on BBB as custom board is not available yet.

    @Ivan: in your case, Is it eMMC or microSD card ?

    Thank you,

    Regards,

    Ankur

  • Hi Ancur,

    On my side this is eMMC. I'm sure in this because I removed sd-card from board. I'm not using busybox fdisk. Are you sure that your board is trying to boot from eMMC, because for the BBB to boot from eMMC you have to hold the USR button when powering the board up.

    BR
    Ivan
  • Please see the your other post.

    BR
    Ivan
  • Hi Ankur,

    One more suggestion, may be it could help.

    Try to append or combine the MLO and u-boot in single binary and flash into eMMC raw partition but I'm not sure that able to bind the both images into single.

    In OMAPL138 processor, we have raw partition in SD card for u-boot and kernel image will be in FAT partition.
    We left first ~500KB for u-boot storage in raw format and will create 2 partitions for other kernel image & filesystem things.

    It is possible through "fdisk" command.

    http://processors.wiki.ti.com/index.php/How_to_boot_OMAP-L138_LCDK_from_SD_card#Create_SD_card_with_2_partitions_for_Linux_kernel_and_filesystem
  • Actually, normal boot is eMMC. When you hold down the USR button, you are booting from SD Card.
    Steve K.
  • Hi Anker,

    Which version of u-boot are you using?

    Steve K.

  • Hi Anker,

    Could you try to create eMMC with dd command:
    dd if=/dev/xxx of=/dev/yyy
    where xxx is sd-card and yyy is eMMC. This way we will sure that the eMMC is a the same image of the sd-card.

    BR
    Ivan
  • Hi Steve,

    Apologies for late reply
    We are using "U-Boot 2013.04-00017"

    Thank you,

    Regards,
    Ankur
  • Hi Ivan,

    Apologies for late reply, I was allotted other high priority task so couldn't work on this.

    I tried your suggestion to copy sd card to eMMC using dd but no luck,

    But good news is I referred below link to write Angstrom to eMMC, firstly i followed the same steps and i was able to boot the Angstrom,
    http://elinux.org/Beagleboard:Updating_The_Software#Flashing_the_eMMC

    Then i observed the Partition information and figured out that C(cylinder),H(head),S(sector) values were important,
    I erased the partition table and created it newly with fdisk utility as follows,

    # fdisk /dev/mmcblk1
    Device contains neither a valid DOS partition table, nor Sun, SGI, OSF or GPT disklabel
    Building a new DOS disklabel. Changes will remain in memory only,
    until you decide to write them. After that the previous content
    won't be recoverable.
    
    
    The number of cylinders for this disk is set to 58624.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)
    
    Command (m for help): m
    Command Action
    a       toggle a bootable flag
    b       edit bsd disklabel
    c       toggle the dos compatibility flag
    d       delete a partition
    l       list known partition types
    n       add a new partition
    o       create a new empty DOS partition table
    p       print the partition table
    q       quit without saving changes
    s       create a new empty Sun disklabel
    t       change a partition's system id
    u       change display/entry units
    v       verify the partition table
    w       write table to disk and exit
    x       extra functionality (experts only)
    
    Command (m for help): x
    
    Expert command (m for help): m
    Command Action
    b       move beginning of data in a partition
    c       change number of cylinders
    d       print the raw data in the partition table
    e       list extended partitions
    f       fix partition order
    h       change number of heads
    p       print the partition table
    q       quit without saving changes
    r       return to main menu
    s       change number of sectors/track
    v       verify the partition table
    w       write table to disk and exit
    
    Expert command (m for help): h
    Number of heads (1-256, default 4): 255
    
    Expert command (m for help): s
    Number of sectors (1-63, default 16): 33
    Warning: setting sector offset for DOS compatiblity
    
    Expert command (m for help): s
    Number of sectors (1-63, default 33): 63
    Warning: setting sector offset for DOS compatiblity
    
    Expert command (m for help): c
    Number of cylinders (1-1048576, default 58624): 233
    
    Expert command (m for help): w
    The partition table has been altered.
    Calling ioctl() to re-read partition table
    [ 1523.497025]  mmcblk1:
    # fdisk /dev/mmcblk1
    
    The number of cylinders for this disk is set to 58624.
    There is nothing wrong with that, but this is larger than 1024,
    and could in certain setups cause problems with:
    1) software that runs at boot time (e.g., old versions of LILO)
    2) booting and partitioning software from other OSs
       (e.g., DOS FDISK, OS/2 FDISK)
    
    Command (m for help): m
    Command Action
    a       toggle a bootable flag
    b       edit bsd disklabel
    c       toggle the dos compatibility flag
    d       delete a partition
    l       list known partition types
    n       add a new partition
    o       create a new empty DOS partition table
    p       print the partition table
    q       quit without saving changes
    s       create a new empty Sun disklabel
    t       change a partition's system id
    u       change display/entry units
    v       verify the partition table
    w       write table to disk and exit
    x       extra functionality (experts only)
    
    Command (m for help): x
    
    Expert command (m for help): c
    Number of cylinders (1-1048576, default 58624): 233
    
    Expert command (m for help): h
    Number of heads (1-256, default 4): 255
    
    Expert command (m for help): s
    Number of sectors (1-63, default 16): 63
    Warning: setting sector offset for DOS compatiblity
    
    Expert command (m for help): n
    Command Action
    b       move beginning of data in a partition
    c       change number of cylinders
    d       print the raw data in the partition table
    e       list extended partitions
    f       fix partition order
    h       change number of heads
    p       print the partition table
    q       quit without saving changes
    r       return to main menu
    s       change number of sectors/track
    v       verify the partition table
    w       write table to disk and exit
    
    Expert command (m for help): r
    
    Command (m for help): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 1
    First cylinder (1-233, default 1): Using default value 1
    Last cylinder or +size or +sizeM or +sizeK (1-233, default 233): 9
    
    Command (m for help): t
    Selected partition 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): n
    Command action
       e   extended
       p   primary partition (1-4)
    p
    Partition number (1-4): 2
    First cylinder (10-233, default 10): Using default value 10
    Last cylinder or +size or +sizeM or +sizeK (10-233, default 233): Using default value 233
    
    Command (m for help): p
    
    Disk /dev/mmcblk1: 1920 MB, 1920991232 bytes
    255 heads, 63 sectors/track, 233 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    
            Device Boot      Start         End      Blocks  Id System
    /dev/mmcblk1p1   *           1           9       72261   c Win95 FAT32 (LBA)
    /dev/mmcblk1p2              10         233     1799280  83 Linux
    
    Command (m for help): w
    The partition table has been altered.
    Calling ioctl() to re-read partition table
    [ 1610.069364]  mmcblk1: p1 p2

    sfdisk command to partition eMMC
    --------------------------------
    echo ",9,0x0C,*
    ,,,-" | sfdisk -D -H 255 -S 63 -C 233 /dev/mmcblk1

    After partitioning I formated mmcblk1p1 and mmcblk1p2 to vfat & eMMC respectively.
    And copied MLO,uEnv.txt,u-boot.img,uImage,dtb and rootfs files respectively and board is booting fine.

    Well but this is the procedure to recover my board but my aim is to boot the beaglebone black from raw eMMC partition without erasing the MBR+partition table.

    I written MLO and u-boot.img at offset mentioned in the below link but it didn't help :(

    http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User%27s_Guide#Updating_an_SD_card_or_eMMC_with_RAW_writes


    Do you have any suggestion on the booting BBB from raw eMMC partition.

    Thank you,

    Regards,
    Ankur

  • Hi Ankur,

    You are not using a official TI SDK 6/7. Your version of u-boot is not supported by TI. Please use SDK 6/7.

    BR
    Ivan
  • Hi Ivan,

    Thank you for reply,
    We are using timesys factory build.
    SPL/u-boot boots normally(from Micro SD and eMMC boot partition) but from offsetted(0x100) raw partition its not booting.
    Well older version of u-boot are also supported in timesys build, could you please let me know which version of u-boot is available in SDK 6/7.
    I will build the same and test it.
    Meanwhile can you please tell me if you have already tried raw booting from eMMC as suggested in below link and if it works for you or not.
    http://processors.wiki.ti.com/index.php/Linux_Core_U-Boot_User%27s_Guide#Updating_an_SD_card_or_eMMC_with_RAW_writes

    Thank you,

    Best regards,
    Ankur
  • Hi Ankur,

    sdk 6 - U-Boot 2013.01.01 (Jun 25 2013 - 16:42:52)
    sdk 7 - U-Boot 2013.10-00189
    Please see also the:
    http://processors.wiki.ti.com/index.php/AM335x_Android_eMMC_booting#Selection_of_MMC0_or_MMC1_as_boot_device_for_eMMC_Raw_boot_on_AM335xEVM
    Here you can see the header file.

    BR
    Ivan
  • Hi Ivan,

    Thank you very much for reply,
    Good news is , finally it worked :)

    As you rightly suggested above link, and Titus has suggested same same link in previous reply i am able to boot the board from raw eMMC partition.

    In my opinion there two important condition for booting board from raw eMMC partition.

    1. eMMC must be partitioned correctly as suggested above.
    2. Leave 128k and put SPL right after that (i.e. 0x20000). Reason we leave first 128k is to leave MBR and partition table intact.

    As mentioned in the TRM ROM code checks 0, 0x20000, 0x40000 & 0x60000 for SPL copy. It at one the location SPL is present ROM code can boot it.
    It worked with my U-Boot version itself

    @Titus: Even after partitioning & Writing SPL at 128k offset it didn't work previously, that may be because of Cylinder, head and sectors were set to different values. When you suggested the same thing in previous reply it didn't wok.

    Thank you again for all help,

    Hope this helps some with similar issue,

    Regards,
    Ankur
  • Hi Ankur,

    Sounds good.

    Finally you made it.

    Thanks for sharing the solution with details.

  • Hi,

    I am also facing the same issue on am335x platform with sdk7. Writing data from sdcard to eMMC and gives the below error to unable to make the partition properly.

    -----------------------------------------------------------------------------------------------------------

            Device Boot      Start         End      Blocks   Id  System

    /dev/mmcblk1p1            2048      147455       72704    c  W95 FAT32 (LBA)

    /dev/mmcblk1p2          147456     7733247     3792896   83  Linux

    Command (m for help): w

    The partition table has been altered!

    Calling ioctl() to re-read partition table.

    WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

    The kernel still uses the old table. The new table will be used at

    the next reboot or after you run partprobe(8) or kpartx(8)

    Syncing disks.

    -----------------------------------------------------------------------------------------------------------

    How did you solved the issue. please help me with detailed commands.

    rgds, lofna

  • Is board booting from eMMC and you are trying to partition eMMC ? Can you put detailed steps which you followed to endup in that error ?
  • Hi,

    I have followed the below procedure to make the partitions:

    root@am335x-evm:~# fdisk /dev/mmcblk1
    Welcome to fdisk (util-linux 2.22.2).

    Changes will remain in memory only, until you decide to write them.
    Be careful before using the write command.


    Command (m for help): o
    Building a new DOS disklabel with disk identifier 0xff3c8b60.

    Command (m for help): n
    Partition type:
    p primary (0 primary, 0 extended, 4 free)
    e extended
    Select (default p): p
    Partition number (1-4, default 1): 1
    First sector (2048-7634943, default 2048):
    Using default value 2048
    Last sector, +sectors or +size{K,M,G} (2048-7634943, default 7634943): +100M
    Partition 1 of type Linux and of size 100 MiB is set

    Command (m for help): t
    Selected partition 1
    Hex code (type L to list codes): e
    Changed system type of partition 1 to e (W95 FAT16 (LBA))

    Command (m for help): n
    Partition type:
    p primary (1 primary, 0 extended, 3 free)
    e extended
    Select (default p): p
    Partition number (1-4, default 2): 2
    First sector (206848-7634943, default 206848):
    Using default value 206848
    Last sector, +sectors or +size{K,M,G} (206848-7634943, default 7634943):
    Using default value 7634943
    Partition 2 of type Linux and of size 3.6 GiB is set

    Command (m for help): p

    Disk /dev/mmcblk1: 3909 MB, 3909091328 bytes, 7634944 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 identifier: 0xff3c8b60

    Device Boot Start End Blocks Id System
    /dev/mmcblk1p1 2048 206847 102400 e W95 FAT16 (LBA)
    /dev/mmcblk1p2 206848 7634943 3714048 83 Linux

    Command (m for help): w
    The partition table has been altered!

    Calling ioctl() to re-read partition table.

    WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
    The kernel still uses the old table. The new table will be used at
    the next reboot or after you run partprobe(8) or kpartx(8)

    WARNING: If you have created or modified any DOS 6.x
    partitions, please see the fdisk manual page for additional
    information.
    Syncing disks.

    rgrds,lofna
  • So on next reboot aren't you seeing new partition table ?

    can you put output of "cat /proc/cmdline" ? If you put bootlog that would be the ideal situation.
    Are you re-partitioning the eMMC? is it eMMC or mmc ?
  • Hi,
    I am seeing only "/dev/mmcblk1p1 FAT32 (LBA)" partition. I did't see any /dev/mmcblk1p12 after reboot. While i am doing the process i am in sdcard mode. before in eMMC already partitioned and again wants to reformatting our eMMC.

    find the command line arguments:

    For sdcard (mmc1)
    setenv bootargs console=ttyO0115200n8 rootfstype=ext3 root=/dev/mmcblk0p2 mem=512M rootwait

    For eMMC (mmc1)
    setenv bootargs console=ttyO0115200n8 rootfstype=ext4 root=/dev/mmcblk1p2 mem=512M rootwait

    some times back first time partition done properly using eMMC, after reformatting the same i am facing these kind below issue.

    The partition table has been altered!

    Calling ioctl() to re-read partition table.

    WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
    The kernel still uses the old table. The new table will be used at
    the next reboot or after you run partprobe(8) or kpartx(8)

    WARNING: If you have created or modified any DOS 6.x
    partitions, please see the fdisk manual page for additional
    information.
    Syncing disks.

    rgds,lofna
  • I have couple of suggestions,

    1. When your board is booting from SDCard, check if if you see eMMC partitions being mounted, (reason: Device our resource being busy error)

        mdev/udev might automount them.

    2. If any of eMMC partition is mounted, umount them and then repeat the process.

    3. If that is not the issue, are deleting old partition before creating new one ? If not do that.

    If that too doesn't work, you can delete old partition table by erasing initial part of eMMC using below command

    dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10

    Regards,

    Ankur

  • Hi Ankur,

    Thanks..

    After reformat with the above command i am able to re partition my drive. But i am still facing some modules issue which is not loaded. But using sdcard it is booting and loaded the modules. Is there any change after copy the files from sdcard to eMMc.

    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/cryptodev/holders': No such file or directory

    root@am335x-evm:~# lsmod
    Module Size Used by
    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/cfg80211/holders': No such file or directory
    cfg80211 163054 -2
    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/usb_f_mass_storage/holders': No such file or directory
    usb_f_mass_storage 32479 -2
    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/libcomposite/holders': No such file or directory
    libcomposite 30114 -2
    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/configfs/holders': No such file or directory
    configfs 19119 -2
    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/bufferclass_ti/holders': No such file or directory
    bufferclass_ti 5405 -2
    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/omaplfb/holders': No such file or directory
    omaplfb 11426 -2
    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/pvrsrvkm/holders': No such file or directory
    pvrsrvkm 175491 -2
    libkmod: ERROR libkmod/libkmod-module.c:1796 kmod_module_get_holders: could not open '/sys/module/cryptodev/holders': No such file or directo

    rgds,lofna
  • good to hear it helped.

    I suspect that your rfs has some issue. Re flashing rootfs might solve the issue.

    One suggestion, as current problem is not related to topic of this post, could you create new post and put your queries there.

    Regards,
    Ankur