The mmc command in android uboot, androiduboot

Source: Internet
Author: User

The mmc command in android uboot, androiduboot

I. The command of mmc is as follows:

1: Read mmc

Mmc read addr blk # cnt

2: Write to mmc

Mmc write addr blk # cnt

 

3: mmc Erasure

Mmc erase blk # cnt

 

4: re-search for mmc Devices

Mmc rescan

 

5: List mmc partitions

Mmc part-lists available partition oncurrent mmc device

 

6: view the current device number, or set the device number and partition

Mmc dev [dev] [part]-show or set currentmmc device [partition]

 

7: display the boot Partition Number

Mmc bootpart [dev] [part]-show or setboot partition

 

8: list the current mmc Devices

Mmc list-lists available devices

 

9: print information about the current mmc device.

Mmcinfo


 

 

Ii. Explanation of mmc commands

1: mmcinfo

Input:

Mmcinfo

Display result:
Manufacturer ID: 45
OEM: 100.
Name: SEM08
Tran Speed: 25000000
Rd blocks Len: 512
MMC version 4.0
Clock: 52000000
High Capacity: Yes
Capacity: 7944011776 Bytes
Bus Width: 8-bit DDR
Current Partition for boot: Boot partition 1


 

2: mmc list-lists available devices

 

Input:

Mmc list

Shown as follows:

FSL_USDHC: 0

FSL_USDHC: 1

FSL_USDHC: 2

FSL_USDHC: 3

 

Analysis: Four mmc resources are configured in boot, SD card is 2, EMMC is 3


 

 

3: mmc dev [dev] [part]-show or set current mmc device [partition]

 

Input:

Mmc dev 3

Shown as follows:

Mmc3 (part 0) is current device

 

Analysis: indicates that the device is currently in the 0th partition of the EMMC device.

 

 

Input:

Mmc dev 3 1

Shown as follows:

Mmc3 (part 1) is current device

 

Analysis: Set the 1st partitions currently on the EMMC Device


 

 

4: mmc bootpart [dev] [part]-show or set boot partition

 

Input:

Mmc bootpart

Shown as follows:

Device 3: boot partition 1 is for boot

 

 

Analysis: uboot is in the first partition.


 

5: mmc part-lists available partition on current mmc device

 

Input:

Mmc part

Shown as follows:

Partition Map for UNKNOWN device 3 -- Partition Type: DOS

 

Partition Start Sector Num Sectors Type

1 16384 16384 83

2 32768 16384 83

3 49152 6397952 5 Extd

4 6447104 9150464 83

5 49153 3145727 83

6 3194881 3145727 83

7 6340609 16383 83

8 6356993 8191 83

 

 

Analysis: displays all current EMMC partitions.

 


 

6: mmc read addr blk # cnt

This command is used to read data from the mmc to the memory.

 

Parameters:

Addr: Read location to memory

Blk: Read block location, which is the offset of the mmc 0 address, in hexadecimal format, and the block unit is 512 bytes.

Cnt: number of blocks read. The size of data to be read to the memory is in hexadecimal notation.

The block size is 512 bytes.

 

 

Example:

Mmc dev 3 0

Mmc read 0x10800000 600 10

 

Command analysis: indicates that the system reads 16x1536 bytes from the beginning of 512x1536 bytes (600 in decimal format) on the mmc (16 is a 10-byte 10) to 0x10800000 in memory

 

Display result:

MMC read: dev #3, block #1536, count 16... 16 blocks read: OK
Result Analysis:

We can only see from the results that the read is successful, but we cannot determine whether the read content is correct. Therefore, print the memory data to see if it is consistent with the content in mmc.

 

Input:

Md. B 0x10800000 100

Command analysis: print the 100 bytes of memory at 0x10800000

Display result:

10800000: b15ecb3c 6f62 746f 6564 616c 3d79 0033 ^. <. bootdelay = 3.

10800010: 61626475 6172 6574 313d 3531 3032 0030 baudrate = 115200.

10800020: 70696461 7264 313d 3239 312e 3836 312e ipaddr = 192.168.1

10800030: 312e3330 7300 7265 6576 6972 3d70 3931. 103. serverip = 19

10800040: 2e323631 2e38 2e31 3031 0031 656e 6d74 255.1.101.netm

10800050: 73613d6b 3532 2e35 3532 2e35 3532 2e35 ask = 255.255.255.

.....

.......

Result Analysis:

I stored the environment variables at the mmc position 1536 × 512, which is consistent with the memory printing and read correctly.


 

 

7: mmc write addr blk # cnt

This command is used to write data in the memory to the mmc.

 

Parameters:

Addr: Read location from memory

Blk: The block location written to the mmc. This location is the offset of the mmc 0 address, in hexadecimal notation, and the block unit is 512 bytes.

Cnt: number of blocks written to mmc. The data size to be written is in hexadecimal notation,

The block size is 512 bytes.

 

Example:

Mmc dev 3

Mmc write 0x108000000 0 100

 

Command analysis: reads 256*512 of data (256 in decimal format) from the memory 0x108000000 to the 0 position on the mmc, which is not verified here.

 

 

The location of 0 on mmc is a partition table. After I write the messy data in the memory, uboot cannot detect the partition.


8: mmc erase blk # cnt

Parameters:

Blk: The block position in the erased mmc. This position is the offset of the mmc 0 address, in hexadecimal notation, and the block unit is 512 bytes.

Cnt: number of blocks in the erased mmc, in hexadecimal format. The block unit is 512 bytes.

 


You can send commands to the serial port during uboot of Android.

In theory, sending commands to the serial port is acceptable.
However, most Android serial port debugging Uses Bluetooth analog devices,
In the uboot phase, the device initialization has not been completed, so the solution is not feasible.
If you use a jumper to connect to the serial port after dismounting the host, you can meet your requirements.
(However, the jumper of the motherboard is very advanced .)

What is the mmc command on the computer? Tips

The Microsoft Management Console (MMC) is an ISV extension that provides a general extension display service for managing applications. MMC is included in Windows 2000 and will also run in Windows NT 4.0, Windows 95, and Windows 98 operating systems.

MMC provides a general host environment for plug-ins, which can be provided by Microsoft or a third-party software vendor. The plug-in provides actual management behaviors. MMC does not provide any management functions. The MMC environment provides seamless integration for the plug-in.

Administrators and other users can use plug-ins (plug-ins can be provided by different vendors) to create custom management tools. Administrators can save the tool for future use or share it with other Administrators and Users. This model provides an effective tool customization method for administrators to create and benefit from complex and different levels of task allocation.

To create tools to better manage Windows-based systems, Microsoft has made a lot of efforts. MMC is one of these efforts. The Windows Management Development Team defines a common host for a large number of their own management tools. The goal of the MMC project is to simplify management through integration, authorization, task targeting, and overall interface simplification (which are all required by users.

As Microsoft emphasizes, it adds project content to include all Microsoft management tools and provides a comprehensive framework for managing a large number of software. MMC is an important part of Windows Service Policy Management, which will be discussed later in this article. Most Microsoft development teams will use MMC to manage applications.

What is MMC?

MMC is a Windows-based multi-Document Interface (MDI) application that focuses on Internet technology. By writing an MMC plug-in (which executes management tasks), Microsoft and ISV have extended the console.

The MMC programming interface allows the plug-in to be integrated with the console. These interfaces only process user interface extensions. How each plug-in actually executes tasks depends on the plug-in. The relationship between the plug-in and the console is shared with a common host environment and interactive integration of applications. The console does not provide any management actions. Plug-ins reside in the console and cannot start themselves.

Both Microsoft and third-party software vendors can develop management tools to run in MMC or write applications managed by the MMC console. MMC is part of the Microsoft platform software development kit (SDK) and is universal. For more information about the software development kit (SDK) on the Microsoft platform, visit the Microsoft developer website.

Set
File-Add/delete management units. You can select services, local users, and groups. Generally, services and local users and groups are available after you click OK, you can click them to manage

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.