rockbox/firmware/test/fat
Linus Nielsen Feltzing 0876cec68a Added rmdir, and changed atoi() to strtol(), to be able to enter hex values as arguments
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4507 a1c6a512-1295-4272-9138-f99709370657
2004-04-16 08:13:27 +00:00
..
ata-sim.c Fat test code, for the archives. 2002-12-03 14:00:33 +00:00
main.c Added rmdir, and changed atoi() to strtol(), to be able to enter hex values as arguments 2004-04-16 08:13:27 +00:00
Makefile Updated with new export dir 2003-03-10 12:42:53 +00:00
README Snapshot of file writing code. Bugs remain. Only short names are supported yet. 2002-10-20 22:50:58 +00:00
test.sh Implemented the mkdir() function in the FAT32 driver 2004-01-15 14:30:59 +00:00

This code is for testing the Rockbox fat code on a dummy drive image file.

Dummy image
-----------
Here's how to create a 1 gig dummy drive image in linux:

# dd if=/dev/hda of=disk.img bs=1M count=1024

You can then format disk.img as a FAT32 partition:

# mkdosfs -F 32 disk.img

To mount the image, your linux kernel must include the loopback device:

# mount -o loop disk.img /mnt/image

Now copy some test data to the disk, umount it and start testing.


Test code
---------
The files in this dir build the 'fat' program. It will read 'disk.img' and
treat is as a real disk, thanks to the ata-sim.c module.

Modify the main.c source code to make it perform the tests you want.