The SD card of dm355 is virtualized into a USB flash drive.

Source: Internet
Author: User
Configure the USB driver to the device mode. After the computer is connected, the SD card is automatically recognized as a logical disk.
The kernel compilation configuration is shown in USB. txt.
Add the initialization statement to/etc/init. d/RCS.
Insmod musb_hdrc.ko
Insmod g_file_storage.ko file =/dev/mmcblk0p1
After USB is inserted, the hardware cannot be initialized because D + and D-are reversed on the USB board.
Problems:
1. when taking the photo, take 100 photos. The first time you plug the USB into the host, it will show that the size of the 100 photos is 0; however, if you input LS-Al/mnt/sdcard on the board, the size is 15.8 kb, which is correct. After the USB is inserted for the second time, some images may become correct, the size will change to 15.8k, and the images can be turned on. Some other images are broken.
2. later, I made a further research on this issue. I took 100 photos without loading the USB driver, and copied the data on the SD card to NFS on the serial terminal, copy the image from a Linux virtual machine to Windows. The image is correct. Input LS-Al/mnt/sdcard on the serial port to check that the image size is 15.8 kb. Board power-off, unplug the SD card, plug in to PC via card reader, browse under Windows, the results are also normal. However, if you do not want to write your work, only one photo set, m1.jpeg, is normal (random, but not all others are normal). The others are 0 kb. Insert the SD card back to the board, and then execute LS-Al/mnt/sdcardafter power-on. It is found that only m1.jpeg is normal, and all others are 0 kb. Solution: in Linux, data written to the disk is first cached in the memory, and the system writes the data from the memory to the disk when appropriate. Therefore, run the sync command before unplugging the SD card to ensure that the data in the memory is completely written to the disk.

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.