Example: How to mount IDE hard drive on ML410

From RCSWiki

Jump to: navigation, search

Contents

Combining Linux and Hardware

Since some bugs have not been fixed in xmd command from EDK 8.2i, it's recommended to use EDK 9.2i to combine Linux and hardware. The reader may refer to Combining Linux and Hardware for more information. The last step to do now is to upload reader's own design to one of the slots on FPGA.

Booting message

These information (or similar) will show up during booting Linux if all have been done correctly :

 Xilinx ML410 Board-Specific Initialization:
 
 ppb_init: dev =  9, id = ac23104c
 pci_scan: bus 0, device  0, id 030010ee
 pci_scan: bus 0, device  1, id 545110b9
 pci_scan: bus 0, device  2, id 153310b9
 pci_scan: bus 0, device  3, id 545710b9
 pci_scan: bus 0, device  6, id 0022100b
 pci_scan: bus 0, device  9, id ac23104c
 pci_scan: bus 0, device 12, id 710110b9
 pci_scan: bus 0, device 15, id 523710b9
 sio_init: Device ID = 53 15, Revision = f3.
 sio_init: LPT1 base = 0x0378, irq = 5.
 sio_init: COM1 base = 0x03f8, irq = 4.
 sio_init: COM2 base = 0x02f8, irq = 3.
 sio_init: KBC irq = 1, PS2 irq = 1.
 sio_init: Super I/O initialization complete.
 
 PCI: Probing PCI hardware
 ppc405_map_irq: bus 0 idsel 1 pin 1, res = 1                                      
 ppc405_map_irq: bus 0 idsel 2 pin 1, res = 1                                      
 ppc405_map_irq: bus 0 idsel 3 pin 1, res = 1                                      
 ppc405_map_irq: bus 0 idsel 6 pin 1, res = 9                                      
 ppc405_map_irq: bus 0 idsel 9 pin 1, res = 9                                      
 ppc405_map_irq: bus 0 idsel 11 pin 1, res = 1                                     
 ppc405_map_irq: bus 0 idsel 12 pin 1, res = 1                                     
 ppc405_map_irq: bus 0 idsel 15 pin 1, res = 1                                      
 
 Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2                          
 ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx       
 ALI15X3: IDE controller at PCI slot 0000:00:0b.0                                  
 ALI15X3: chipset revision 196                                                     
 ALI15X3: 100% native mode on irq 1 

Use "lspci" to list PCI device

Just do "lspci" at command line when logging into the root file system. These information (or similar) will show up if all have been done correctly :

 # lspci                                                                         
 00:01.0 Multimedia audio controller: ALi Corporation M5451 PCI AC-Link Controller Audio Device (rev 02)
 00:02.0 ISA bridge: ALi Corporation M1533/M1535 PCI to ISA Bridge [Aladdin IV/V/V+]
 00:03.0 Modem: ALi Corporation M5457 AC'97 Modem Controller
 00:06.0 Ethernet controller: National Semiconductor Corporation DP83820 10/100/1000 Ethernet Controller
 00:09.0 PCI bridge: Texas Instruments PCI2250 PCI-to-PCI Bridge (rev 02)
 00:0b.0 IDE interface: ALi Corporation M5229 IDE (rev c4)
 00:0c.0 Non-VGA unclassified device: ALi Corporation M7101 Power Management Controller [PMU]
 00:0f.0 USB Controller: ALi Corporation USB 1.1 Controller (rev 03)

Simple example: how to mount a minix file system on ATA hard drive

  • Connect an ATA hard drive to primary 40-pin ide hard drive slot on ML-410. Makes sure power cable has been connected to hard drive.
  • If Linux detects any ATA hard drive successfully, it will display information like this:
 ide0: BM-DMA at 0xdfd0-0xdfd7, BIOS settings: hda:pio, hdb:pio                
 ide1: BM-DMA at 0xdfd8-0xdfdf, BIOS settings: hdc:pio, hdd:pio                
 hda: IBM-DTLA-307030, ATA DISK drive                                              
 elevator: using anticipatory as default io scheduler                              
 ide0 at 0xdff8-0xdfff,0xdff6 on irq 1                                             
 hda: max request size: 128KiB                                                     
 hda: 60036480 sectors (30738 MB) w/1916KiB Cache, CHS=59560/16/63, UDMA(100)      
 hda: hda1 
  • Login root file system with root, create a device node with mknod
 mknod /dev/hda b 3 0
  • A device file called hda will be created in /dev, create partition table on hard drive with fdisk
 fdisk /dev/hda
  • A dialog menu will pop up. First type n to create a new partition with partition number and partition size, then follow by a t to select Old Minix file system type, finally type a w to save partition table.
  • make the minix file systems on new partitions with mkfs.minix
 mkfs.minix /dev/hda
  • create a temporary directory in mnt/hda, then mount our new created Minix file system on ATA hard drive :
 mount /dev/hda /mnt/hda
  • In mnt/hda you can perform file operation including open, read, write, etc.
  • Anytime when you finish using ATA hard drive , don't forget to unmount your hard drive so that your modification can be saved.
 umount /mnt/hda

Other PCI-based project

Any other PCI-based project may follow this tutorial to create necessary components in the system.

References

  • Xilinx application note 911
  • Xilinx application note 945
  • Xilinx application note 964
  • Xilinx application note 1001
  • Xilinx Linux 2.6 library for XPS
Personal tools