Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2210069
  • 博文数量: 1058
  • 博客积分: 10018
  • 博客等级: 上将
  • 技术积分: 12641
  • 用 户 组: 普通用户
  • 注册时间: 2007-05-23 19:24
文章分类

全部博文(1058)

文章存档

2010年(108)

2009年(736)

2008年(214)

我的朋友

分类: LINUX

2009-01-06 21:45:24

(1)cygwin 2009:集成gcc-4.3.2,rxvt,非常适合一般的编程开发,集成iso仅58M
(2)i686-elf的cygwin toolchain,工具链版本:gcc-4.3.2, binutils-2.19, glibc-2.7,测试正常工作
以此工具链编译最新的linux内核2.6.28工作正常,kernel打一些补丁:
    cd linux-2.6.28
    sed -i 's/R_386_32/1/' ./scripts/mod/modpost.c
    sed -i 's/R_386_PC32/2/' ./scripts/mod/modpost.c
    sed -i 's/R_ARM_ABS32/2/' ./scripts/mod/modpost.c
    sed -i 's/R_ARM_PC24/1/' ./scripts/mod/modpost.c
    sed -i 's/R_MIPS_HI16/5/' ./scripts/mod/modpost.c
    sed -i 's/R_MIPS_LO16/6/' ./scripts/mod/modpost.c
    sed -i 's/R_MIPS_26/4/' ./scripts/mod/modpost.c
    sed -i 's/R_MIPS_32/2/' ./scripts/mod/modpost.c

    sed -i 's/STT_COMMON/5/g' ./arch/x86/boot/compressed/relocs.c

    sed -i 's/STV_DEFAULT/0/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/STV_INTERNAL/1/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/STV_HIDDEN/2/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/STV_PROTECTED/3/g' ./arch/x86/boot/compressed/relocs.c

    sed -i 's/R_386_NONE/0/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_32/1/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_PC32/2/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_GOT32/3/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_PLT32/4/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_COPY/5/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_GLOB_DAT/6/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_JMP_SLOT/7/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_RELATIVE/8/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_GOTOFF/9/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_GOTPC/10/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/R_386_NUM/11/g' ./arch/x86/boot/compressed/relocs.c

    sed -i 's/ELF32_ST_VISIBILITY(sym->st_other)/sym->st_other \& 0x03/g' ./arch/x86/boot/compressed/relocs.c
    sed -i 's/else rm -f $(@D)\/.tmp_$(@F); exit 1;/else mv -f $(@D)\/.tmp_$(@F) $@;/' ./arch/x86/vdso/Makefile

menuconfig中把netfilter去掉,里面有一些文件名一样(大小写不一样),ipv6也去掉,编译的elf文件正常。
 
下载地址:
阅读(1276) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~