This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext 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 Feng | resources: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: | ||
< | < | ||
vim build/ | vim build/ | ||
- | IMAGE_INSTALL_append = " bonnie++" | + | IMAGE_INSTALL_append = " |
</ | </ | ||
\\ | \\ | ||
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, | 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, | ||
- | ==== 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. | ||
+ | < | ||
+ | $ 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, | ||
+ | Last sector, +sectors or +size{K, | ||
+ | |||
+ | /* Save partition */ | ||
+ | Command (m for help): w | ||
+ | </ | ||
+ | ** Format the SD card to MS-DOS (FAT) filesystem ** | ||
+ | < | ||
+ | # mkfs.vfat -F 32 / | ||
+ | </ | ||
+ | |||
+ | ** Format the SD card to EXT filesystem ** | ||
+ | < | ||
+ | # mkfs.ext3 / | ||
+ | </ | ||
+ | \\ | ||
+ | === 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: | ||
</ | </ | ||
+ | \\ | ||
==== 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: | ||
< | < | ||
+ | |||
# mount -t vfat -o sync / | # mount -t vfat -o sync / | ||
</ | </ | ||
Line 115: | Line 145: | ||
< | < | ||
# cat / | # cat / | ||
- | Wed Aug 12 10:29:00 UTC 2015 | + | Fri Jul 17 05:31:49 UTC 2020 |
</ | </ | ||
Line 131: | Line 161: | ||
Input the following command on the target board console | Input the following command on the target board console | ||
< | < | ||
- | root:/> mkfs.ext2 / | + | root@adsp-sc589-ezkit:~# mkfs.ext2 / |
- | root:/> mount / | + | root@adsp-sc589-ezkit:~# mount / |
- | root:/> bonnie++ -u root -d /mnt/ | + | root@adsp-sc589-ezkit:~# bonnie++ -u root -d /mnt/ |
</ | </ | ||
=== Result === | === Result === | ||
< | < | ||
- | 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 ' | + | Reading intelligently...done |
- | Create files in sequential order...done. | + | start ' |
- | 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. |
- | | + | Version |
- | Machine | + | -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- |
- | buildroot | + | Machine |
- | | + | adsp-sc589-ezk 424M 7985 77 8227 |
- | | + | ------Sequential Create------ --------Random Create-------- |
- | | + | -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete-- |
- | 16 958 98 +++++ +++ +++++ +++ 1032 | + | files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP |
+ | | ||
+ | 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, | ||
</ | </ | ||
+ | \\ | ||
==== 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 | ||
< | < | ||
- | root:/> mkfs.vfat -F 32 / | + | root@adsp-sc589-ezkit:~# mkfs.vfat -F 32 / |
- | root:/> mount / | + | root@adsp-sc589-ezkit:~# mount / |
- | root:/> bonnie++ -u root -d /mnt/ | + | root@adsp-sc589-ezkit:~# bonnie++ -u root -d /mnt/ |
- | </ | + | Using uid:0, gid:0. |
- | + | Writing with putc()...done | |
- | === Result === | + | |
- | < | + | |
- | 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 ' | start ' | ||
- | 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 |
-Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- | -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks-- | ||
Machine | Machine | ||
- | buildroot | + | adsp-sc589-ezk 424M 4405 44 6886 10 4026 |
- | ------Sequential Create------ --------Random Create-------- | + | ------Sequential Create------ --------Random Create-------- |
- | | + | -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 |
- | | + | |
- | buildroot,300M,2414,64,5529,8,4502,8,3715,96,17941,12,92.0,1,16,12,99,29536,100,156,99,18, | + | adsp-sc589-ezkit,424M,4405,44,6886,10,4026,7,8360,89,8658,6,803.4,12,16,9,99,+++++,+++,147,99,17, |
</ | </ | ||
+ | |||
+ | \\ | ||
+ | ---- | ||
+ | **Back to** [[resources: |