Arm Linux 2.6.20编译

确保系统的arm linux tools版本在3.3以上(这里使用4.3.2),然后按下述步骤编译:

 

1,下载linux-2.6.20.tar.bz2,地址为ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2
2,tar jxvf linux-2.6.20.tar.bz2
      cd linux-2.6.20/
3,gedit Makefile &
      将ARCH  ?= $(SUBARCH)改成ARCH  ?= arm
      将CROSS_COMPILE ?=改成CROSS_COMPILE ?= arm-linux-
4,make s3c2410_defconfig
5,gedit scripts/mod/sumversion.c &
      添加#include "limits.h"
6,gedit include/asm-arm/arch-s3c2410/memory.h &
      将#define PHYS_OFFSET UL(0×30000000)改成#define PHYS_OFFSET UL(0xC0000000)
7,gedit include/asm-arm/arch-s3c2410/map.h &
      将#define S3C2410_CS6 (0×30000000)改成#define S3C2410_CS6 (0xC0000000)
8,gedit arch/arm/mach-s3c2410/time.c &
      将函数s3c2410_timer_setup中的if (tcnt > 0xffff) {改成if (tcnt > 0xffffffff) {
9,make menuconfig
      将Boot options->Default kernel command string改成mem=32M console=ttySAC0 root=/dev/ram initrd=0xC0800000,0x00800000 ramdisk_size=2048 rw
      选中Kernel Features->Use the ARM EABI to compile the kernel
      取消Device Drivers->Character devices->Serial drivers->8250/16550 and compatible serial support
      修改Device Drivers->Block devices下的几个值:
            (1) Default number of RAM disks
            (2048) Default RAM disk size (kbyte)
      取消Device Driver->Graphics support->S3C2410 LCD framebuffer support
10,make

 

至此,linux2.6.20编译完成,将其拷贝到skyeye.conf所在目录,并将文件系统镜像文件initrd.img也拷贝到此文件夹下即可在skyeye中运行此linux系统了。skyeye.conf的内容如下所示:

# skyeye config file for S3C2410X
arch: arm
cpu:  arm920t
mach: s3c2410x

# physical memory
mem_bank: map=M, type=RW, addr=0xc0000000, size=0x00800000
mem_bank: map=M, type=RW, addr=0xc0800000, size=0x00800000, file=./initrd.img
mem_bank: map=M, type=RW, addr=0xc1000000, size=0x01000000

# all peripherals I/O mapping area
mem_bank: map=I, type=RW, addr=0x48000000, size=0x20000000
mem_bank: map=I, type=RW, addr=0x19000300, size=0x00000020

net: type=cs8900a, base=0x19000300, size=0x20,int=9, mac=0:4:3:2:1:f, ethmod=tuntap, hostip=10.0.0.1

lcd: type=s3c2410x, mod=gtk
uart:mod=term
#dbct:state=on
#log: logon=0, logfile=./sk1.log, start=5000000, end=6000000

 

你可能感兴趣的:(c,linux,timer,command,File,makefile)