• Linux 下 cs8900a 的移植说明


    cs8900a 建立编译菜单

    1. 拷贝到文件

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

    [arm@localhost cs8900a]$cp cs8900a.c $KERNEL/linux­2.6.14.1/drivers/net/ [arm@localhost cs8900a]$cp cs8900.h $KERNEL/linux­2.6.14.1/drivers/net/

    1. 修改 Kconfig 文件

    [arm@localhost 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 文件

    [arm@localhost cs8900a]$vi $KERNEL/linux­2.6.14.1/drivers/net/Makefile

    #加入如下内容

    obj­$(CONFIG_CS8900a)        += cs8900a.o

    修改 S3C2410 相关信息

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

    [arm@localhost 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 的物理地址到虚拟地址的映射

    [arm@localhost 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 */

    };

  • 相关阅读:
    一款React版本的excel插件(reactjexcel)
    如何评价微软的微服务构建框架Dapr?
    【优雅代码】深入浅出 妙用Javascript中apply、call、bind
    国内外最顶级的12大看板工具
    基于键盘钩子实现扫码枪输入
    中国有哪些比较出名的C#大佬。?
    一个数据驱动的高效 dotnet PDF 开源工具库
    Web前端:2022年最佳Javascript动画库
    分布式数据库的高可用性简史
    Vue项目首屏打开速度的优化
  • 原文地址:https://www.cnblogs.com/fanweisheng/p/11105654.html
Copyright © 2020-2023  润新知