Skip to content

alex-ren/ATS_LDD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This place is linked by /scratch/aren/git/linux_source/linux-stable/fs/ATS_FAT

You can also refer to the following Google Doc for information.
https://docs.google.com/document/d/10ffVbn0ZOqHpr9LFFaWKANRoUbrkqBO5yLj13sb6pLc/edit#heading=h.8xpklf8pjhth


-- How to create a file for loopback.
  >> dd if=/dev/zero of=/virtualfs bs=1024 count=307200


-- use loopon.sh / loopdown.sh to connect the loop device with the file


-- format the block device
  >> mkfs.msdos -F 32 /dev/loop0


-- use starttest.sh / stoptest.sh to do the test


-- Where to find original Linux modules
  /lib/modules/`uname -r`/kernel/fs/fat

-- Description of directories
  C/myfat was taken from linux source kernel_2.6.32-5-686_debian/fs/fat. 

  The Makefile has been modifed so that three modules are generated: 
  "myfat" (originally fat), "myvfat" (originally vfat) and "mymsdos" (originally msdos).

  Source files have to modifed to add trace. And the generated modules contains
  file system type "mymsdos" (originally msdos) "myvfat" (originally vfat).


  ATS/myfat_test
  This directory is built based on C/myfat. Basically I added more trace. I create this
  directory so that I can do some run-time test on the original fat module. I should freeze
  this directory except for add some more traces to certain files.

  messages_mount_unmount.txt and messages_simp.txt contains the trace for simply mount
  the file system, "cd" into directory, "cat" files and then unmount the file system.


  ATS/myfat2
  The C files are written based on linux fat source code. I rerranged the files, removed
  certain functionality to make the files as simple as I can so that this directory can
  serve as a starting point for the ATS driver. The idea is to move part of the directory
  into ATS code gradually. Basically I should freeze the directory now.


-- routine way to do the test
   1. We use two machines, one for development (dev) and one for test (test).
      Create a file for loopback on the test machine and then create the virtual hard disk.

   2. shell_script/loaddev.sh

   3. shell_script/starttest.sh

   4. less /var/log/messages (shift + f)

   * hint *
   On test machine, we'd better "su" first before doing the test. This can save us from
   lots of trouble concerning permission. If we cannot "su" (e.g. on Ubuntu system), we
   can also use "sudo". We can also use "sudo" to execute shell by the following
   ======================
   sudo sh -c xxx.sh
   sudo sh -c "cat > aaa.txt"
   ======================

About

Linux Device Driver in ATS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages