Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:mmc:mmc [17 Jul 2020 05:28] – [Test MSI Performance with Bonnie++] Sunny Fengresources:tools-software:linuxdsp:docs:linux-kernel-and-drivers:mmc:mmc [17 Jul 2020 09:58] (current) – [Mount the MS-DOS file system on the SD Card] Sunny Feng
Line 24: Line 24:
 <code> <code>
 vim build/conf/local.conf vim build/conf/local.conf
-IMAGE_INSTALL_append = " bonnie++"+IMAGE_INSTALL_append = " dosfstools e2fsprogs bonnie++"
 </code> </code>
 \\ \\
Line 72: Line 72:
 The most typical use of an SD Card in embedded applications is as a removable storage device (disk) that can be easily taken from the embedded target board. In such contexts, the SD Card installed to the embedded target board is typically already formatted with an MS-DOS file system. The Linux kernel must be specially configured to allow mounting the MS-DOS file system. See part 2 in section 2.1 for details. The mount utility is also needed. Typically,  mount will already be enabled in your busybox configuration. The most typical use of an SD Card in embedded applications is as a removable storage device (disk) that can be easily taken from the embedded target board. In such contexts, the SD Card installed to the embedded target board is typically already formatted with an MS-DOS file system. The Linux kernel must be specially configured to allow mounting the MS-DOS file system. See part 2 in section 2.1 for details. The mount utility is also needed. Typically,  mount will already be enabled in your busybox configuration.
  
-==== Insert a pre-formatted card with an MS-DOS (FAT) file system to the SD Card slot on the ADSP-SC5xx ====+==== Formatting the SD Card ==== 
 +In order to use an SD Card with Linux we need to prepare it by formatting it in the correct format. 
 + 
 +This section of instructions requires you to correctly identify the SD Card and format the card. If you select the wrong drive you may cause irreversible damage to you Host PC. 
 + 
 +To format the SD Card, follow the commands below. The example code in this section assumes that the SD Card device is reported to be /dev/sdb. Ensure that you change these commands to use your device. 
 +<code> 
 +$ sudo fdisk /dev/sdb 
 +/* Create primary partition 1, 256M size*/ 
 +Command (m for help): n 
 +Select (default p): p 
 +Partition number (1-4, default 1): 1 
 +First sector (2048-3887103, default 2048): PRESS ENTER 
 +Last sector, +sectors or +size{K,M,G} (2048-3887103, default 3887103): PRESS ENTER 
 +  
 +/* Save partition */ 
 +Command (m for help): w 
 +</code> 
 +** Format the SD card to MS-DOS (FAT) filesystem ** 
 +<code> 
 +# mkfs.vfat -F 32 /dev/mmcblk0p1 
 +</code> 
 + 
 +** Format the SD card to EXT filesystem ** 
 +<code> 
 +# mkfs.ext3 /dev/mmcblk0p1 
 +</code> 
 +\\ 
 +=== Insert a pre-formatted card with an MS-DOS (FAT) file system to the SD Card slot on the ADSP-SC5xx ===
  
 When you boot the zImage on the ADSP-SC5xx, there should be messages similar to the ones shown below. In the below example, Linux has detected an SD Card with a single partition on it: When you boot the zImage on the ADSP-SC5xx, there should be messages similar to the ones shown below. In the below example, Linux has detected an SD Card with a single partition on it:
Line 81: Line 109:
 </code> </code>
  
 +\\
 ==== Mount the MS-DOS file system on the SD Card ==== ==== Mount the MS-DOS file system on the SD Card ====
  
 This is done as follows: This is done as follows:
 <code> <code>
 +
 # mount -t vfat -o sync /dev/mmcblk0p1 /mnt  # mount -t vfat -o sync /dev/mmcblk0p1 /mnt 
 </code> </code>
Line 115: Line 145:
 <code> <code>
 # cat /mnt/log.file # cat /mnt/log.file
-Wed Aug 12 10:29:00 UTC 2015 +Fri Jul 17 05:31:49 UTC 2020
 </code> </code>
  
Line 131: Line 161:
 Input the following command on the target board console Input the following command on the target board console
 <code> <code>
-root:/> mkfs.ext2 /dev/mmcblk0p1 +root@adsp-sc589-ezkit:~# mkfs.ext2 /dev/mmcblk0p1 
-root:/> mount /dev/mmcblk0p1 /mnt/ +root@adsp-sc589-ezkit:~# mount /dev/mmcblk0p1 /mnt/ 
-root:/> bonnie++ -u root -d /mnt/ +root@adsp-sc589-ezkit:~# bonnie++ -u root -d /mnt/ 
 </code> </code>
 === Result === === Result ===
 <code> <code>
-Using uid:0, gid:0.  +Using uid:0, gid:0. 
-Writing with putc()...done  +Writing with putc()...done 
-Writing intelligently...done  +Writing intelligently...done 
-Rewriting...done Reading with getc()...done  +Rewriting...done 
-Reading intelligently...done  +Reading with getc()...done 
-start 'em...done...done...done...  +Reading intelligently...done 
-Create files in sequential order...done.  +start 'em...done...done...done... 
-Stat files in sequential order...done.  +Create files in sequential order...done. 
-Delete files in sequential order...done.  +Stat files in sequential order...done. 
-Create files in random order...done.  +Delete files in sequential order...done. 
-Stat files in random order...done.  +Create files in random order...done. 
-Delete files in random order...done.  +Stat files in random order...done. 
-Version 1.03e       ------Sequential Output------ --Sequential Input- --Random-                      +Delete files in random order...done. 
-     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--  +Version  1.04       ------Sequential Output------ --Sequential Input- --Random- 
-Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP  +                    -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- 
-buildroot      300M  2568  70  2780    4212   6  3734  97 18000  11  1169  16 +Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP 
-                     ------Sequential Create------ --------Random Create-------- +adsp-sc589-ezk 424M  7985  77  8227    3920   6  8538  90  8660    1220  18 
-                     -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- +                    ------Sequential Create------ --------Random Create-------- 
-               files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP +                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- 
-                  16   958  98 +++++ +++ +++++ +++  1032  98 +++++ +++  2449  99 buildroot,300M,2568,70,2780,2,4212,6,3734,97,18000,11,1169.2,16,16,958,98,+++++,+++,+++++,+++,1032,98,+++++,+++,2449,99  +              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP 
 +                 16  6513  92 16713  84 10240  97   149  98 +++++ +++ 12912  98 
 +adsp-sc589-ezkit,424M,7985,77,8227,8,3920,6,8538,90,8660,6,1220.4,18,16,6513,92,16713,84,10240,97,149,98,+++++,+++,12912,98 
 </code> </code>
            
 +\\
 ==== 2) Test Case 2: Bonnie++ on FAT32 ==== ==== 2) Test Case 2: Bonnie++ on FAT32 ====
 Input the following command on the target board console Input the following command on the target board console
 <code> <code>
-root:/> mkfs.vfat -F 32 /dev/mmcblk0p1 +root@adsp-sc589-ezkit:~# mkfs.vfat -F 32 /dev/mmcblk0p1 
-root:/> mount /dev/mmcblk0p1 /mnt/ +root@adsp-sc589-ezkit:~# mount /dev/mmcblk0p1 /mnt/ 
-root:/> bonnie++ -u root -d /mnt/  +root@adsp-sc589-ezkit:~# bonnie++ -u root -d /mnt/  
-</code> +Using uid:0, gid:0. 
- +Writing with putc()...done
-=== Result === +
-<code> +
-Using uid:0, gid:0. Writing with putc()...done+
 Writing intelligently...done Writing intelligently...done
 Rewriting...done Rewriting...done
Line 175: Line 206:
 Reading intelligently...done Reading intelligently...done
 start 'em...done...done...done... start 'em...done...done...done...
-Create files in sequential order...done +Create files in sequential order...done. 
-Stat files in sequential order...done.  +Stat files in sequential order...done. 
-Delete files in sequential order...done.  +Delete files in sequential order...done. 
-Create files in random order...done.  +Create files in random order...done. 
-Stat files in random order...done. +Stat files in random order...done.
 Delete files in random order...done. Delete files in random order...done.
-Version 1.03e       ------Sequential Output------ --Sequential Input- --Random-+Version  1.04       ------Sequential Output------ --Sequential Input- --Random-
                     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--                     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
 Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
-buildroot      300M  2414  64  5529    4502    3715  96 17941  12  92.0    +adsp-sc589-ezk 424M  4405  44  6886  10  4026    8360  89  8658   6 803.4  12 
-                    ------Sequential Create------ --------Random Create--------  +                    ------Sequential Create------ --------Random Create-------- 
-                   -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--  +                    -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- 
-              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  +              files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP 
-                 16    12  99 29536 100   156  99    18  99 +++++ +++    41  97  +                 16     9  99 +++++ +++   147  99    17  99 +++++ +++    39  98 
-buildroot,300M,2414,64,5529,8,4502,8,3715,96,17941,12,92.0,1,16,12,99,29536,100,156,99,18,99,+++++,+++,41,97+adsp-sc589-ezkit,424M,4405,44,6886,10,4026,7,8360,89,8658,6,803.4,12,16,9,99,+++++,+++,147,99,17,99,+++++,+++,39,98 
 </code> </code>
 +
 +\\
 +----
 +**Back to** [[resources:tools-software/linuxdsp/docs/linux-kernel-and-drivers/start|Kernel Features and Device Drivers for ADSP-SC5xx Yocto Linux]]
resources/tools-software/linuxdsp/docs/linux-kernel-and-drivers/mmc/mmc.1594956523.txt.gz · Last modified: 17 Jul 2020 05:28 by Sunny Feng