Linux 下 cs8900a 的移植说明

Posted fanweisheng

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Linux 下 cs8900a 的移植说明相关的知识,希望对你有一定的参考价值。

cs8900a 建立编译菜单

1. 拷贝到文件

把 cs8900a 的压缩包拷贝到 arm 用户下的 dev_home/localapps/ [[email protected] localapps]$ tar ­xzvf cs8900a.tar.gz [[email protected] localapps]$cd cs8900a

[[email protected] cs8900a]$cp cs8900a.c $KERNEL/linux­2.6.14.1/drivers/net/ [[email protected] cs8900a]$cp cs8900.h $KERNEL/linux­2.6.14.1/drivers/net/

 

  1. 修改 Kconfig 文件

[[email protected] cs8900a]$vi $KERNEL/linux­2.6.14.1/drivers/net/Kconfig

#加入如下内容

config CS8900a

tristate "CS8900a support"

depends on NET_ETHERNET && ARM && ARCH_SMDK2410

­­­help­­­

Support for CS8900A chipset based Ethernet cards. If you have a network (Ether net) card of this type, say Y and read the Ethernet­HOWTO, available from as well as.

To compile this driver as a module, choose M here and read. The module will be called cs8900.o.

 

  1. 修改 Makefile 文件

[[email protected] cs8900a]$vi $KERNEL/linux­2.6.14.1/drivers/net/Makefile

#加入如下内容

obj­$(CONFIG_CS8900a)        += cs8900a.o

 

修改 S3C2410 相关信息

1. 加入 CS8900A 在内存中的起始位置

 

[[email protected] cs8900a]$cp reg­cs8900.h $KERNEL/linux­2.6.14.1/include/asm­arm/arch­s3c2410/ cs8900.h 的内容如下:

#ifndef _INCLUDE_CS8900A_H_

#define _INCLUDE_CS8900A_H_

 

#include <linux/config.h>

 

#define pSMDK2410_ETH_IO                 0x19000000 /* S3C2410_CS3 0x18000000 */

#define vSMDK2410_ETH_IO                 0xE0000000

#define SMDK2410_ETH_IRQ                 IRQ_EINT9

 

#endif

 

2. 加入 cs8900A 的物理地址到虚拟地址的映射

[[email protected] cs8900a]$vi $KERNEL/linux­2.6.14.1/arch/arm/mach­s3c2410/mach­smdk2410.c

/* 加入如下内容 */

static struct map_desc smdk2410_iodesc[]     initdata =

vSMDK2410_ETH_IO, 0x19000000, SZ_1M, MT_DEVICE /* Add this line */

;

以上是关于Linux 下 cs8900a 的移植说明的主要内容,如果未能解决你的问题,请参考以下文章

Linux3.4.2移植CS8900网卡驱动到优龙FS2410开发板

ubuntu下linux移植到开发板(持续更新)

移植Linux-5.4+内核到4412开发板

图像识别DM8127开发攻略——KERNEL的移植说明

为AM335x移植Linux内核主线代码

Linux系统移植:Kernel 顶层 Makefile(下)