Results 1 to 2 of 2
I am trying to verify an AHCI HBA that is built using the Amirix/FPGA board. The Amirix AP1000 board is sitting on the PCI bus of the PC. There is ...
- 07-20-2008 #1Just Joined!
- Join Date
- Jul 2008
- Posts
- 1
Linux detecting SATA drive
I am trying to verify an AHCI HBA that is built using the Amirix/FPGA board. The Amirix AP1000 board is sitting on the PCI bus of the PC. There is no SATA drive attached to the AHCI HBA, but a collection of SRAM(onchip) is to be treated as sectors of data on a real disk.
The goal is to have the SATA drive recognized and accessed using Linux.
i.e.If I run Linux, the PC host should think it sees a real disk attached.
I am new to Linux, so I am not sure how to do that, I will really appreciate if someone can give me some hints/guidelines/pointers/advices/etc.
Currently, I am running Debian Etch with kernel 2.6.25.2, which already has AHCI module. Since my AHCI HBA is not fully implemented/only has few features/using ABAR=2 (instead of 5)/etc, so I need to modify the AHCI driver code to match what I have implemented/modification in the implementation.
I did some online searching…
Here is what I think I should do in order to get my host pc to think/detect the SATA drive, and able to read/write the driver. Please correct me if my steps/procedures do not make sense.
1. modify the AHCI driver
2. rebuild/recompile it..and load it into the kernel (insmod ahci.ko)
3. Creates a special block device file named xxx and gives it major number and minor number.
mknod /dev/xxx b major# minor#
However, I don’t really know what major or minor # that I should use?
From linux-2.6.25.2/Documentation/device.txt….it kinda explains what major/minor number to use according to the type of the device….is that what I am supposed to look to determine the major and minor number. There is a section about SATA drive, but still confusing to me what I should use..
4. Do I need to mount the SATA drive? If yes, how do I do that…just use the “mount” command
5. read/write to the SATA drive. I only know the ”echo”, is that the right way to write/read from the SATA drive?
My project is due really SOON, please HELP. Thanks for helping in advance!
- 07-20-2008 #2
are there partitions on the disc? if yes are those formated with any kind of file system?
execute # fdisk -l
can you see your drive in the list?
be more specific on your problem not on options


Reply With Quote