FL2440移植内核Linux-3.0过程。

1解压缩文件

tar -jxf linux-3.0.tar.bz2

cd linux-3.0

2修改makefile,配置CPU类型和交叉编译器(195,196行)

ARCH        ?= arm

CROSS_COMPILE   ?= /opt/buildroot-2012.08/arm920t/usr/bin/arm-linux-

注意:在配置交叉编译器路径的时候,不要多加多余的空格,否则编译器不会被找到,我刚刚修改的cross_compile的时候,就是因为在arm-linux-后面多加了一个空格,然后编译器找不到,害得我搞了很久才发现。

添加zImage头制作(559行后面)

    cp arch/arm/boot/zImage . -f

    ../u-boot-2010.09.bak/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

该段是在linux编译的内核的前面,加上一个64字节的头,让u-boot能够引导内核启动

3拷贝 arch/arm/configs/s3c2410_defconfig作为.config的模板,

make menuconfig

System Type  --->

       [*] SMDK2440   

       [*] SMDK2440 with S3C2440 CPU module      

Kernel Features  --->

       [*]UsetheARMEABItocompilethekernel                                                     

       [*]   Allow old ABI binaries to run with this kernel (EXPERIMENTAL)

 

4修改时钟和串口

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",

5修改arch/arm/tools/mach-types,将machine_ID配置为如下

s3c2440         ARCH_S3C2440        S3C2440         1999

mini2440        MACH_MINI2440       MINI2440        362 

6 开始编译:make 

编译好了之后,把linxurom-s3c2440.bin 下载到开发板的30008000地址下,启动,这时候我们发现,我们的开发板已经跑起来了,可以进入内核了。

7配置内核

make menuconfig

General setup --->

[*] Prompt for development and/or incomplete code/drivers

[*] System V IPC

<*> Kernel .config support

[*]   Enable access to .config through /proc/config.gz

[*] Optimize for size

-*- Configure standard kernel features (expert users)  --->

[*] Embedded system 

[*] Enable VM event counters for /proc/vmstat

[*] Disable heap randomization  

[*] Enable loadable module support --->

[*]  Module unloading  

 

[*] MMU-based Paged Memory Management Support

ARM system type (Samsung S3C2410, S3C2412, S3C2413, S3C2416, S3C2440, S3C2442, S3C2443, S3C2

[*] Force UART FIFO on during boot process

S3C2440 and S3C2442 Machines --->

[*] SMDK2440

[*] SMDK2440 with S3C2440 CPU module

 

[*] Use the ARM EABI to compile the kernel 

[*]  Allow old ABI binaries to run with this kernel (EXPERIMENTAL)

Boot options --->

(console=ttyS0,115200 mem=64M rw loglevel=7 init=/init) Default kernel command string

Floating point emulation --->    

[*] NWFPE math emulation

Userspace binary formats ---> 

[*] Kernel support for ELF binaries

Power management options --->

[*] Suspend to RAM and standby 

[*] Networking support ---> 

     Networking options  --->

<*> Packet socket

<*> Unix domain sockets

[*] TCP/IP networking 

[*]  IP: multicasting 

[*]  IP: kernel level autoconfiguration 

[*]    IP: DHCP support

[*]    IP: BOOTP support

[*]    IP: RARP support

[*]  IP: multicast routing

<*>  INET: socket monitoring interface

[*] Network packet filtering framework (Netfilter) --->

-*- DNS Resolver support

Device Drivers --->

[*] Network device support --->

[*]  Ethernet (10 or 100Mbit)  ---> 

<*>  DM9000 support 



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值