Chinaunix首页 | 论坛 | 博客
  • 博客访问: 135569
  • 博文数量: 30
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 550
  • 用 户 组: 普通用户
  • 注册时间: 2013-09-08 20:28
个人简介

永远不要放弃学习,放弃学习就是放弃了勇敢生活下去的动力!

文章分类

全部博文(30)

文章存档

2014年(30)

我的朋友

分类: 嵌入式

2014-05-21 19:52:54

auto.sh

点击(此处)折叠或打开

  1. #!/bin/bash
  2. tar jxvf linux-2.6.14.7.tar.bz2
  3. cd linux-2.6.14.7
  4. sed -i 's/$(SUBARCH)/arm/g' Makefile
  5. sed -i 's/CROSS_COMPILE ?=/CROSS_COMPILE ?=\/usr\/local\/arm\/3.4.1\/bin\/arm-linux-/g' Makefile
  6. cd ..
  7. tar zxvf cs8900.tar.gz
  8. cp cs8900.c cs8900.h linux-2.6.14.7/drivers/net/arm
  9. cd linux-2.6.14.7
  10. echo "config ARM_CS8900
  11.         tristate \"CS8900 support\"
  12.         depends on NET_ETHERNET && ARM && ARCH_SMDK2410
  13.         help
  14.           Support for CS8900A chipset based Ethernet cards. If you have a network
  15.           (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available
  16.           from as well as .To compile this driver as a module, choose M here and read.
  17.           The module will be called cs8900.o.">>drivers/net/arm/Kconfig
  18. echo -e "obj-\$(CONFIG_ARM_CS8900)\0011+= cs8900.o">>drivers/net/arm/Makefile
  19. cp ../auto2.sh ./
  20. chmod +x auto2.sh
  21. ./auto2.sh
  22. make
auto2.sh

点击(此处)折叠或打开

  1. #!/bin/bash
  2. sed -i "50 s/^/#include /" arch/arm/mach-s3c2410/mach-smdk2410.c
  3. sed -i "57 s/^/{ vSMDK2410_ETH_IO, pSMDK2410_ETH_IO, SZ_1M, MT_DEVICE }/" arch/arm/mach-s3c2410/mach-smdk2410.c
  4. sed -i 's/&s3c_device_iis,/& \&s3c_device_nand,/g' arch/arm/mach-s3c2410/mach-smdk2410.c
  5. sed -i 's/NAND_ECC_SOFT/NAND_ECC_NONE/g' drivers/mtd/nand/s3c2410.c

  6. sed -i -e '876 s/^/\/\//' -i -e '1210 s/^/\/\//' drivers/mtd/nand/nand_base.c
  7. sed '/^menu "Pseudo filesystems"/a\
  8. config DEVFS_FS\
  9.         bool "/dev file system support (OBSOLETE)"\
  10.         default y\
  11. config DEVFS_MOUNT\
  12.         bool "Automatically mount at boot"\
  13.         default y\
  14.         depends on DEVFS_FS/g' fs/Kconfig >>fs/Kconfigbak
  15. mv fs/Kconfig fs/Kconfigbak2
  16. mv fs/Kconfigbak fs/Kconfig
  17. mv arch/arm/mach-s3c2410/devs.c arch/arm/mach-s3c2410/devs.cbak
  18. cp ../devs.c arch/arm/mach-s3c2410/
  19. cp ../.config .config

  20. touch include/asm-arm/arch-s3c2410/smdk2410.h

  21. echo "#ifndef _INCLUDE_SMDK2410_H_
  22. #define _INCLUDE_SMDK2410_H_
  23. #include
  24. #define pSMDK2410_ETH_IO 0x19000000
  25. #define vSMDK2410_ETH_IO 0xE0000000
  26. #define SMDK2410_ETH_IRQ IRQ_EINT9
  27. #endif // _INCLUDE_SMDK2410_H_
  28. " >>include/asm-arm/arch-s3c2410/smdk2410.h
有人会说为什么不把它写成一个文档,我也想,可是我把它写到一个里面就出错,

点击(此处)折叠或打开

  1. cc1: 错误:无法识别的命令行选项“-mlittle-endian”
  2. cc1: 错误:无法识别的命令行选项“-mapcs”
  3. cc1: 错误:无法识别的命令行选项“-mno-sched-prolog”
  4. cc1: 错误:无法识别的命令行选项“-mabi=apcs-gnu”
  5. arch/arm/kernel/asm-offsets.c:1: 错误:-march= switch所带参数(armv4)不正确
  6. arch/arm/kernel/asm-offsets.c:1: 错误:-mtune=switch所带参数(arm9tdmi)不正确
  7. make[1]: *** [arch/arm/kernel/asm-offsets.s] 错误 1
  8. make: *** [prepare0] 错误 2
我不知道为什么所以就想出这样的方法。
完整安装包:

阅读(1599) | 评论(0) | 转发(0) |
0

上一篇:shell脚本之u-boot

下一篇:shell脚本之Skyeye

给主人留下些什么吧!~~