Linux3.0内核移植
Makefile修改
ARCH=arm
/opt/buildroot-2012.08/arm920t/usr/bin/arm-linux-
后面不留空格,直接换行
make menuconfig
m(编译成模块)y(编译进内核)n()
arch/arm/config/默认.config配置
[general setup] M-->n
[enable loadable module support] y[module unloading]
[enable the block layer] []support for 2TB
[system type] 在*****system MMU****一块只选[s3c2440 and s3c2442 Machines]中的
[smdk2440][smdk224 with s3c2440 cpu module]
[bus support]
[kernel feature] *[use the arm EABI to]
[boot option]
default kernel command string :
consel=ttySAC0,115200,init=/init
注:Uboot 中传给内核的参数 bootargs
[cpu power management]
[userspace binary formate] *[kernel support for elf binary]
[power management options] [][advanced power management emulation]
[network support] M-->n [network support](M-->n)
[device driver]
[][parallel port support]
*[block device] M-->n [network block device support]支持mount -o loop
[Misc devices]中有支持EPROM的(先不改)
[SCSI device support] SCSI是SD卡 M-->n 支持u盘
[serial ATA and Parallel ATA drivers] 支持硬盘(先不改)
[network service support] [Ehernet (10 or 100Mbit)]支持以太网卡(只有dm9000)
[wireless LAN]无线网卡 先不选
[input device support](包括鼠标键盘触摸屏(event interface)) *-->n(先都不支持只留下串口)
[charactor device]
[PTY support] 支持ssh登录
[maximum number of legacy PTY] 设备最大登录数 4
[][hardware random number ]
[serial device] 要支持[samsung SoC serial support][support for console on ..] [samsung S3C2440/..]
[I2C suppport]不选
[SPI support]不选
[PPS support]不选
[PTP clock support]不选
[hardware monitoring support]硬件模拟 不选
[watchdog timer support]不选
[multifunction device driver]多媒体 不选
[graphics support]图形化界面 [support for frame buffer device] 使用LCD时要的
[sound card support]
[advanced linux sound]M->n
[HDI device]不选
[*][usb support
[usb monitor]*-->n usb显示器[usb mass storage support]M-->*支持U盘其他M-->n[usb seriral converter support]USB转串口驱动
[*][usb FTDI ..]FTDI USB转串口驱动程序
[*][usb prolific 2303]PL2303驱动
[*][usb winchiphead CH341 ..] 支持CH341
[usb driver for GSM and CDMA modes]M-->*支持3G上网卡M-->*
[*][MMC/SD/SDIO card support]支持SD卡
[SDIO UART/GPS class support]M-->n SD卡总线,可挂SD卡,GPS,UART等
[secure digital host controller]M-->*
其他M-->n
[*][real time clock]
[file sysytem]
前4种系统一般都不会用到
M-->n
[CD-ROM/DVD Filesystems]
[ISO 9660]支持挂载ISO 9660系统,挂载光盘(不选)
M-->n
[DOS/FAT/NT Filesystem]
[*][VFAT fs support]支持U盘的VFAT文件系统
[*][NTFS file system suppport]支持U盘的NTFS 不选的话NTFS格式的U盘读不出
[*][NTFS write]支持写
[Pseudo filesystem]伪文件系统
[*][Tmpfs POSIX]将内存的一段拿出来做文件系统(掉电丢失),必须要
[Miscellaneous filesystems]
[*][Journalling Flash system v2 JFFS2]可读写(常用于Norflash)(常用JFFS2,yaffs2(要去官网下载代码添加到内核或打补丁))
[SquashFS 4.0 - ..] DDwtr M-->n
[network file system]
[NFS client support]要选。从虚拟机拷贝到arm上[root file system on NFS]不选
[]
只选[CP936,GB2312][NLS UTF-8]
[kernel hacking] 都不选
[cryptographic API]加密相关不选
[library routines] 动态库不选
u-boot源码/tools/mkimage 工具(编译后生成)制作映像文件,在原映像文件zImage前加上64字节的头生成linuxrom-s3c2440.bin(uImage)
用这个命令或添加到Makefile中
cp arch/arm/boot/zImage . -f
../u-boot-fl2440/tools/mkimage -A arm -O linux -T kernel -C none -a 30008000 -e 30008040 -n "Linux Kernel" -d zImage linuxrom-
s3c2440.bin
rm -f zImage
修改时钟和串口
将arch/arm/mach-s3c2440/mach-smdk2440.c中的__init smdk2440_map_io()函数中对时钟的初始化修改为12MHz:
s3c24xx_init_clocks(12000000);
将drivers/tty/serial/samsung.c中设置如下:
#define S3C24XX_SERIAL_NAME "ttyS"
将uart_driver s3c24xx_uart_drv结构体中的.driver_name设置为如下
.driver_name = "ttyS",
修改arch/arm/tools/mach-types
将machine_ID配置为如下
s3c2440 ARCH_S3C2440 S3C2440 1999
mini2440 MACH_MINI2440 MINI2440 362