1、把linux2.6.13核下面的ide.h copy到/drivers/ide下面
2、修改/drivers/ide/ide.c
#include "ide.h"
#include
#include
3、修改ide.h
//#include
100:ide_register_hw(&hw_cf, NULL); - 〉ide_register_hw(&hw_cf, NULL, 0, NULL);
123:ide_register_hw(&hw_cf, NULL); - 〉ide_register_hw(&hw_cf, NULL, 0, NULL);
4、修改ide.c
137:
/////////////////////////////////////////////////////////////////
//add by garden
hwif->atapi_dma = 0; /* disable all atapi dma */
hwif->ultra_mask = 0x80; /* disable all ultra */
hwif->mwdma_mask = 0x80; /* disable all mwdma */
hwif->swdma_mask = 0x80; /* disable all swdma */
//end add
/////////////////////////////////////////////////////////////////
232:
////////////////////////////////////////////////////////////////////////////////////////
//add by garden
__raw_writel(__raw_readl(S3C2410_BWSCON)|(1<<22)&(~(1<<21))|(1<<20),S3C2410_BWSCON);
__raw_writel(__raw_readl(S3C2410_BWSCON)|(1<<10)&(~(1<<9))|(1<<8),S3C2410_BWSCON);
printk(KERN_ERR " SET CF & IDE WAIT!now BWSCON=%08x\n",__raw_readl(S3C2410_BWSCON));
ide_init_default_hwifs(); //fla
//end add
///////////////////////////////////////////////////////////////////////////////////////
5、按照上面的做法改驱动就ok了,然后是kernel的make menuconfig
Device Drivers
--- ATA/ATAPI/MFM/RLL support
Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
Include IDE/ATA-2 DISK support
File systems
Partition Types
Windows Logical Disk Manager (Dynamic Disk) support
Native language support
这个下面要选几个字库,否则无法挂载hda..
当然了还要在DOS/NT/FAT Filesystem下选择要支持的文件系统格式;
阅读(1355) | 评论(0) | 转发(0) |