[*] Autoselect yaffs2 format
[*] Cache short names in RAM
配置cpu相关选项
修改配置如下:
System Type --->
S3C2440 Machines --->
[*] SMDK2440
[*] SMDK2440 with S3C2440 CPU module
去掉S3C2400 Machines、S3C2410 Machines、S3C2412 Machines、S3C2442 Machines的所有选项 ,
否则会报错。如果现在编译内核,下载到开发板中,内核就可以正常启动了.有了雏形,继续移植设备驱动。
这里,内核选项*代表编译至内核,M代表编译为模块 。
9、移植USB host驱动
在这个版本的linux内核,已经对USB驱动进行来很好的支持,仅仅需要修改配置。
Device Drivers --->
[*] USB support --->
{*} Support for Host-side USB
[*] USB device filesystem (DEPRECATED)
[*] USB device class-devices (DEPRECATED)
<*> OHCI HCD support
<*> USB Mass Storage support
[*] HID Devices --->
{*} Generic HID support
[*] /dev/hidraw raw HID device support
SCSI device support --->
<*> SCSI device support
[*] legacy /proc/scsi/ support
<*> SCSI disk support
<*> SCSI tape support
10、移植RTC驱动
在这个版本的linux内核,已经对RTC驱动进行来很好的支持,不需要修改配置。相应配置如下
Device Drivers --->
<*> Real Time Clock --->
[*] Set system time from RTC on startup and resume
(rtc0) RTC used to set the system time
[ ] RTC debug support
*** RTC interfaces ***
[*] /sys/class/rtc/rtcN (sysfs)
[*] /proc/driver/rtc (procfs for rtc0)
[*] /dev/rtcN (character devices)
<*> Samsung S3C series SoC RTC
然后添加对设备的支持
打开arch/arm/mach-s3c2440/mach-smdk2440.c ,添加设备,代码如下:
static struct platform_device *smdk2440_devices[] __initdata = {
&s3c_device_ohci,
&s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&s3c_device_rtc,
};
11、移植UDA1341驱动
在平台上添加和配置UDA1341:
修改arch/arm/mach-s3c2440/mach-smdk2440.c ,在开始添加头文件
#include
#include
static struct s3c24xx_uda134x_platform_data s3c24xx_uda134x_data = {
.l3_clk = S3C2410_GPB(4),
.l3_data = S3C2410_GPB(3),
.l3_mode = S3C2410_GPB(2),
.model = UDA134X_UDA1341,
};
static struct platform_device s3c24xx_uda134x = {
.name = "s3c24xx_uda134x",
.dev = {
.platform_data = &s3c24xx_uda134x_data,
}
};
把设备添加到平台当中
static struct platform_device *smdk2440_devices[] __initdata = {
&s3c_device_ohci,
&s3c_device_lcd,
&s3c_device_wdt,
&s3c_device_i2c0,
&s3c_device_iis,
&s3c_device_rtc,
&s3c24xx_uda134x,
};
内核配置如下
Device Drivers --->
<*> Sound card support --->
<*> Advanced Linux Sound Architecture --->
<*> OSS Mixer API
<*> OSS PCM (digital audio) API
[*] OSS PCM (digital audio) API - Include plugin system
[*] Support old ALSA API
[*] Verbose procfs contents
[*] Verbose printk
[*] Generic sound devices --->
<*> ALSA for SoC audio support --->
<*> SoC Audio for the Samsung S3C24XX chips
<*> SoC I2S Audio support UDA134X wired to a S3C24XX
12、移植DM9000驱动
a、修改 drivers/net/dm9000.c 文件:
头文件增加:
#include
#include
#include
在dm9000_probe 函数 开始增加:
unsigned char ne_def_eth_mac_addr[]={0x00,0x12,0x34,0x56,0x80,0x49};
static void *bwscon;
static void *gpfcon;
static void *extint0;
static void *intmsk;
#define BWSCON (0x48000000)
#define GPFCON (0x56000050)
#define EXTINT0 (0x56000088)
#define INTMSK (0x4A000008)
bwscon=ioremap_nocache(BWSCON,0x0000004);
gpfcon=ioremap_nocache(GPFCON,0x0000004);
extint0=ioremap_nocache(EXTINT0,0x0000004);
intmsk=ioremap_nocache(INTMSK,0x0000004);
writel(readl(bwscon)|0xc0000,bwscon);
writel( (readl(gpfcon) & ~(0x3 < 14)) | (0x2 < 14), gpfcon);