全部博文(92)
分类: 嵌入式
2009-09-22 18:42:06
$/source/kernel/linux2.6.26.5# cp arch/arm/configs/s3c2314_defconfig .config
/source/kernel/linux2.6.26.5:In this directory to modify or edit something.
2.Modify Makefile
Modify the root directory of the kernel Makefile, identify cross-cutting Editor:
#vim Makefile
Find ARCH and CROSS_COMPILE, modifying as following
ARCH = arm
CROSS_COMPILE = arm-softfloat-linux-gnu-
wq!
Setting PATH environment variable so that it can find your cross-editing tool chain:
#export PATH=$PATH:/home/linux/crosstool/gcc-3.4.5-glibc-2.3.6/arm-softfloat-linux-gnu/bin
3.Adding NIC drivers to the kernel
#cp /mnt/hgfs/share/cs8900a.* drivers/net
4.Modify Makefile
#vim drivers/net/Makefile
Adding one line in the file:
obj-$(CONFIG_CS8900a) += cs8900a.o
Saving and quit
5.Modify Kconfig
#vim drivers/net/Kconfig
Find the content as following:
config DM9000
Adding content beneath that code:
config CS8900a
6.Configuring the kernel support for Ethernet CS8900A
#make menuconfig
Device Drivers
Saving and quit, then generating config file
7.Compiling the kernel and then generating zImage
#make zImage
# cp /source/kernel/linux2.6.26/arch/arm/boot/zImage /tftpboot
8.Start super-terminal, there is some problem
FS2410#boot
mount: server 192.168.1.110 not responding, timed out
Root-NFS: Server returned error -5 while mounting /source/rootfs
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
1f00
1f01
1f02
1f03
1f04
1f05
1f06
1f07
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
This kernel is compiled for ARM13bc-2410, however what we use is FS2410, through comparing two boards, we finally find the difference of IRQ
/source/kernel/linux-2.6.26.5/drivers/net# vim cs8900a.c
Find IQR18,change into IRQ9.
#boot
succeed!