QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1842|回复: 1

2.6内核做到make linux 错误(问题已经解决)

[复制链接]
发表于 2006-5-10 17:03:13 | 显示全部楼层 |阅读模式
用uClinux-dist-20051110.tar.gz和arm-elf-tools-20040427.sh包构建uClinux开发和编译环境(2.6.12-uc0内核),目前做到make linux,请指教。
make linux
make ARCH=arm CROSS_COMPILE=arm-elf- -C linux-2.6.x  || exit 1
make[1]: Entering directory `/opt/uClinux-dist/linux-2.6.x'
  CHK     include/linux/version.h
  CC      arch/arm/kernel/asm-offsets.s
In file included from arch/arm/kernel/asm-offsets.c:17:
include/asm/memory.h:16: asm/arch/memory.h: No such file or directory
include/asm/memory.h:41: warning: `__pa' redefined
include/asm/page.h:134: warning: this is the location of the previous definitioninclude/asm/memory.h:42: warning: `__va' redefined
include/asm/page.h:135: warning: this is the location of the previous definitioninclude/asm/memory.h:70: warning: `page_to_pfn' redefined
include/asm/page.h:139: warning: this is the location of the previous definitioninclude/asm/memory.h:71: warning: `pfn_to_page' redefined
include/asm/page.h:138: warning: this is the location of the previous definitioninclude/asm/memory.h:72: warning: `pfn_valid' redefined
include/asm/page.h:140: warning: this is the location of the previous definitioninclude/asm/memory.h:74: warning: `virt_to_page' redefined
include/asm/page.h:142: warning: this is the location of the previous definitioninclude/asm/memory.h:75: warning: `virt_addr_valid' redefined
include/asm/page.h:144: warning: this is the location of the previous definitionmake[2]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 2
make[1]: Leaving directory `/opt/uClinux-dist/linux-2.6.x'
make: *** [linux] Error 1
debian:/opt/uClinux-dist# ln -s /opt/uClinux-dist/linux-2.6.x/arch /opt/uClinux-dist/linux-2.6.x/include/asm
debian:/opt/uClinux-dist# make linux make ARCH=arm CROSS_COMPILE=arm-elf- -C linux-2.6.x  || exit 1
make[1]: Entering directory `/opt/uClinux-dist/linux-2.6.x'
  CHK     include/linux/version.h
  CC      arch/arm/kernel/asm-offsets.s
In file included from arch/arm/kernel/asm-offsets.c:17:
include/asm/memory.h:16: asm/arch/memory.h: No such file or directory
include/asm/memory.h:41: warning: `__pa' redefined
include/asm/page.h:134: warning: this is the location of the previous definitioninclude/asm/memory.h:42: warning: `__va' redefined
include/asm/page.h:135: warning: this is the location of the previous definitioninclude/asm/memory.h:70: warning: `page_to_pfn' redefined
include/asm/page.h:139: warning: this is the location of the previous definitioninclude/asm/memory.h:71: warning: `pfn_to_page' redefined
include/asm/page.h:138: warning: this is the location of the previous definitioninclude/asm/memory.h:72: warning: `pfn_valid' redefined
include/asm/page.h:140: warning: this is the location of the previous definitioninclude/asm/memory.h:74: warning: `virt_to_page' redefined
include/asm/page.h:142: warning: this is the location of the previous definitioninclude/asm/memory.h:75: warning: `virt_addr_valid' redefined
include/asm/page.h:144: warning: this is the location of the previous definitionmake[2]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 2
make[1]: Leaving directory `/opt/uClinux-dist/linux-2.6.x'
make: *** [linux] Error 1
debian:/opt/uClinux-dist# make linux
make ARCH=arm CROSS_COMPILE=arm-elf- -C linux-2.6.x  || exit 1
make[1]: Entering directory `/opt/uClinux-dist/linux-2.6.x'
  CHK     include/linux/version.h
  CC      arch/arm/kernel/asm-offsets.s
In file included from arch/arm/kernel/asm-offsets.c:17:
include/asm/memory.h:41: warning: `__pa' redefined
include/asm/page.h:134: warning: this is the location of the previous definitioninclude/asm/memory.h:42: warning: `__va' redefined
include/asm/page.h:135: warning: this is the location of the previous definitioninclude/asm/memory.h:70: warning: `page_to_pfn' redefined
include/asm/page.h:139: warning: this is the location of the previous definitioninclude/asm/memory.h:71: warning: `pfn_to_page' redefined
include/asm/page.h:138: warning: this is the location of the previous definitioninclude/asm/memory.h:72: warning: `pfn_valid' redefined
include/asm/page.h:140: warning: this is the location of the previous definitioninclude/asm/memory.h:74: warning: `virt_to_page' redefined
include/asm/page.h:142: warning: this is the location of the previous definitioninclude/asm/memory.h:75: warning: `virt_addr_valid' redefined
include/asm/page.h:144: warning: this is the location of the previous definitionIn file included from include/asm/system.h:5,
                 from include/asm/processor.h:18,
                 from include/asm/thread_info.h:17,
                 from include/linux/thread_info.h:21,
                 from include/linux/spinlock.h:12,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/kernel.h:85: warning: `regparm' attribute directive ignored
include/linux/kernel.h:120: warning: `regparm' attribute directive ignored
include/linux/kernel.h:122: warning: `regparm' attribute directive ignored
In file included from include/asm/processor.h:18,
                 from include/asm/thread_info.h:17,
                 from include/linux/thread_info.h:21,
                 from include/linux/spinlock.h:12,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from arch/arm/kernel/asm-offsets.c:13:
include/asm/system.h:13: warning: `regparm' attribute directive ignored
include/asm/system.h: In function `__set_64bit':
include/asm/system.h:179: unknown register name `dx' in `asm'
include/asm/system.h:179: unknown register name `ax' in `asm'
In file included from include/asm/thread_info.h:17,
                 from include/linux/thread_info.h:21,
                 from include/linux/spinlock.h:12,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from arch/arm/kernel/asm-offsets.c:13:
include/asm/processor.h: At top level:
include/asm/processor.h:69: `CONFIG_X86_L1_CACHE_SHIFT' undeclared here (not in a function)
include/asm/processor.h:69: requested alignment is not a constant
include/asm/processor.h: In function `cpuid_eax':
include/asm/processor.h:172: unknown register name `dx' in `asm'
include/asm/processor.h:172: unknown register name `cx' in `asm'
include/asm/processor.h:172: unknown register name `bx' in `asm'
include/asm/processor.h: In function `cpuid_ebx':
include/asm/processor.h:182: unknown register name `dx' in `asm'
include/asm/processor.h:182: unknown register name `cx' in `asm'
include/asm/processor.h: In function `cpuid_ecx':
include/asm/processor.h:192: unknown register name `dx' in `asm'
include/asm/processor.h:192: unknown register name `bx' in `asm'
include/asm/processor.h: In function `cpuid_edx':
include/asm/processor.h:202: unknown register name `cx' in `asm'
include/asm/processor.h:202: unknown register name `bx' in `asm'
include/asm/processor.h: In function `set_in_cr4':
include/asm/processor.h:240: unknown register name `ax' in `asm'
include/asm/processor.h: In function `clear_in_cr4':
include/asm/processor.h:250: unknown register name `ax' in `asm'
In file included from include/linux/thread_info.h:21,
                 from include/linux/spinlock.h:12,
                 from include/linux/capability.h:45,
                 from include/linux/sched.h:7,
                 from arch/arm/kernel/asm-offsets.c:13:
include/asm/thread_info.h: At top level:
include/asm/thread_info.h:96: invalid register name for `current_stack_pointer'
In file included from include/linux/string.h:24,
                 from include/linux/bitmap.h:8,
                 from include/linux/cpumask.h:82,
                 from include/linux/sched.h:15,
                 from arch/arm/kernel/asm-offsets.c:13:
include/asm/string.h: In function `strcpy':
include/asm/string.h:39: warning: asm operand 0 probably doesn't match constraints
include/asm/string.h: In function `strncpy':
include/asm/string.h:58: warning: asm operand 0 probably doesn't match constraints
include/asm/string.h: In function `strcat':
include/asm/string.h:75: warning: asm operand 0 probably doesn't match constraints
include/asm/string.h: In function `strncat':
include/asm/string.h:98: warning: asm operand 0 probably doesn't match constraints
include/asm/string.h: In function `strcmp':
include/asm/string.h:119: warning: asm operand 0 probably doesn't match constraints
include/asm/string.h: In function `strncmp':
include/asm/string.h:142: warning: asm operand 0 probably doesn't match constraints
include/asm/string.h: In function `strchr':
include/asm/string.h:161: warning: asm operand 0 probably doesn't match constraints
include/asm/string.h: In function `strrchr':
include/asm/string.h:178: warning: asm operand 1 probably doesn't match constraints
include/asm/string.h: In function `__memcpy':
include/asm/string.h:210: warning: asm operand 3 probably doesn't match constraints
include/asm/string.h: In function `__constant_memcpy':
include/asm/string.h:249: warning: asm operand 2 probably doesn't match constraints
include/asm/string.h:253: warning: asm operand 1 probably doesn't match constraints
include/asm/string.h:255: warning: asm operand 1 probably doesn't match constraints
include/asm/string.h:257: warning: asm operand 1 probably doesn't match constraints
include/asm/string.h:259: warning: asm operand 1 probably doesn't match constraints
include/asm/string.h:265: warning: asm operand 1 probably doesn't match constraints
include/asm/string.h:268: warning: asm operand 1 probably doesn't match constraints
include/asm/string.h:271: warning: asm operand 1 probably doesn't match constraints
In file included from include/linux/bitmap.h:8,
                 from include/linux/cpumask.h:82,
                 from include/linux/sched.h:15,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/string.h: At top level:
include/linux/string.h:85: warning: conflicting types for built-in function `__builtin_memcmp'
In file included from include/linux/list.h:7,
                 from include/linux/wait.h:23,
                 from include/asm/semaphore.h:41,
                 from include/linux/sched.h:20,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/prefetch.h: In function `prefetch_range':
include/linux/prefetch.h:64: `CONFIG_X86_L1_CACHE_SHIFT' undeclared (first use in this function)
include/linux/prefetch.h:64: (Each undeclared identifier is reported only once
include/linux/prefetch.h:64: for each function it appears in.)
In file included from include/asm/semaphore.h:41,
                 from include/linux/sched.h:20,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/wait.h: At top level:
include/linux/wait.h:115: warning: `regparm' attribute directive ignored
include/linux/wait.h:116: warning: `regparm' attribute directive ignored
include/linux/wait.h:117: warning: `regparm' attribute directive ignored
include/linux/wait.h:139: warning: `regparm' attribute directive ignored
include/linux/wait.h:140: warning: `regparm' attribute directive ignored
include/linux/wait.h:141: warning: `regparm' attribute directive ignored
include/linux/wait.h:142: warning: `regparm' attribute directive ignored
include/linux/wait.h:143: warning: `regparm' attribute directive ignored
include/linux/wait.h:144: warning: `regparm' attribute directive ignored
include/linux/wait.h:145: warning: `regparm' attribute directive ignored
include/linux/wait.h:146: warning: `regparm' attribute directive ignored
include/linux/wait.h:147: warning: `regparm' attribute directive ignored
include/linux/wait.h:148: warning: `regparm' attribute directive ignored
include/linux/wait.h:367: warning: `regparm' attribute directive ignored
include/linux/wait.h:369: warning: `regparm' attribute directive ignored
include/linux/wait.h:370: warning: `regparm' attribute directive ignored
include/linux/wait.h:372: warning: `regparm' attribute directive ignored
include/linux/wait.h:378: warning: `regparm' attribute directive ignored
include/linux/wait.h:380: warning: `regparm' attribute directive ignored
include/linux/wait.h:381: warning: `regparm' attribute directive ignored
In file included from include/linux/rwsem.h:25,
                 from include/asm/semaphore.h:42,
                 from include/linux/sched.h:20,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/rwsem-spinlock.h:55: warning: `regparm' attribute directive ignored
include/linux/rwsem-spinlock.h:56: warning: `regparm' attribute directive ignored
include/linux/rwsem-spinlock.h:57: warning: `regparm' attribute directive ignored
include/linux/rwsem-spinlock.h:58: warning: `regparm' attribute directive ignored
include/linux/rwsem-spinlock.h:59: warning: `regparm' attribute directive ignored
include/linux/rwsem-spinlock.h:60: warning: `regparm' attribute directive ignored
include/linux/rwsem-spinlock.h:61: warning: `regparm' attribute directive ignored
include/linux/rwsem-spinlock.h:62: warning: `regparm' attribute directive ignored
In file included from include/linux/sched.h:20,
                 from arch/arm/kernel/asm-offsets.c:13:
include/asm/semaphore.h:90: warning: `regparm' attribute directive ignored
include/asm/semaphore.h:91: warning: `regparm' attribute directive ignored
include/asm/semaphore.h:92: warning: `regparm' attribute directive ignored
include/asm/semaphore.h:93: warning: `regparm' attribute directive ignored
include/asm/semaphore.h: In function `down':
include/asm/semaphore.h:115: unknown register name `ax' in `asm'
include/asm/semaphore.h: In function `up':
include/asm/semaphore.h:190: unknown register name `ax' in `asm'
In file included from include/linux/signal.h:6,
                 from include/linux/sched.h:28,
                 from arch/arm/kernel/asm-offsets.c:13:
include/asm/signal.h: At top level:
include/asm/signal.h:198: warning: `regparm' attribute directive ignored
In file included from include/linux/sched.h:32,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/completion.h:30: warning: `regparm' attribute directive ignored
include/linux/completion.h:31: warning: `regparm' attribute directive ignored
include/linux/completion.h:33: warning: `regparm' attribute directive ignored
include/linux/completion.h:35: warning: `regparm' attribute directive ignored
include/linux/completion.h:37: warning: `regparm' attribute directive ignored
include/linux/completion.h:38: warning: `regparm' attribute directive ignored
In file included from include/linux/sched.h:33,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/pid.h:29: warning: `regparm' attribute directive ignored
include/linux/pid.h:31: warning: `regparm' attribute directive ignored
include/linux/pid.h:37: warning: `regparm' attribute directive ignored
include/linux/pid.h:40: warning: `regparm' attribute directive ignored
In file included from include/linux/slab.h:15,
                 from include/linux/percpu.h:4,
                 from include/linux/sched.h:34,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/gfp.h:85: warning: `regparm' attribute directive ignored
include/linux/gfp.h:117: warning: `regparm' attribute directive ignored
include/linux/gfp.h:118: warning: `regparm' attribute directive ignored
include/linux/gfp.h:126: warning: `regparm' attribute directive ignored
include/linux/gfp.h:127: warning: `regparm' attribute directive ignored
include/linux/gfp.h:128: warning: `regparm' attribute directive ignored
include/linux/gfp.h:129: warning: `regparm' attribute directive ignored
In file included from include/linux/percpu.h:4,
                 from include/linux/sched.h:34,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/slab.h:119: warning: `regparm' attribute directive ignored
include/linux/slab.h:120: warning: `regparm' attribute directive ignored
In file included from arch/arm/kernel/asm-offsets.c:13:
include/linux/sched.h:185: warning: `regparm' attribute directive ignored
include/linux/sched.h:186: warning: `regparm' attribute directive ignored
In file included from include/linux/aio.h:5,
                 from include/linux/sched.h:195,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/workqueue.h:60: warning: `regparm' attribute directive ignored
include/linux/workqueue.h:61: warning: `regparm' attribute directive ignored
include/linux/workqueue.h:62: warning: `regparm' attribute directive ignored
include/linux/workqueue.h:64: warning: `regparm' attribute directive ignored
include/linux/workqueue.h:65: warning: `regparm' attribute directive ignored
In file included from include/linux/sched.h:195,
                 from arch/arm/kernel/asm-offsets.c:13:
include/linux/aio.h:157: warning: `regparm' attribute directive ignored
include/linux/aio.h:158: warning: `regparm' attribute directive ignored
include/linux/aio.h:159: warning: `regparm' attribute directive ignored
include/linux/aio.h:160: warning: `regparm' attribute directive ignored
include/linux/aio.h:161: warning: `regparm' attribute directive ignored
include/linux/aio.h:163: warning: `regparm' attribute directive ignored
include/linux/aio.h:166: warning: `regparm' attribute directive ignored
include/linux/aio.h:171: warning: `regparm' attribute directive ignored
In file included from arch/arm/kernel/asm-offsets.c:13:
include/linux/sched.h:903: warning: `regparm' attribute directive ignored
include/linux/sched.h:904: warning: `regparm' attribute directive ignored
include/linux/sched.h:906: warning: `regparm' attribute directive ignored
include/linux/sched.h:912: warning: `regparm' attribute directive ignored
include/linux/sched.h:913: warning: `regparm' attribute directive ignored
include/linux/sched.h:1000: warning: `regparm' attribute directive ignored
include/linux/sched.h:1076: warning: `regparm' attribute directive ignored
include/linux/sched.h:1192: warning: `regparm' attribute directive ignored
In file included from include/linux/dcache.h:10,
                 from include/linux/fs.h:208,
                 from include/linux/mm.h:15,
                 from arch/arm/kernel/asm-offsets.c:14:
include/linux/rcupdate.h:280: warning: `regparm' attribute directive ignored
include/linux/rcupdate.h:282: warning: `regparm' attribute directive ignored
In file included from arch/arm/kernel/asm-offsets.c:14:
include/linux/mm.h:309: warning: `regparm' attribute directive ignored
include/linux/mm.h:608: warning: `regparm' attribute directive ignored
include/linux/mm.h:609: warning: `regparm' attribute directive ignored
include/linux/mm.h:610: warning: `regparm' attribute directive ignored
include/linux/mm.h:611: warning: `regparm' attribute directive ignored
include/linux/mm.h:626: warning: `regparm' attribute directive ignored
In file included from arch/arm/kernel/asm-offsets.c:17:
include/asm/memory.h: In function `virt_to_phys':
include/asm/memory.h:33: warning: implicit declaration of function `__virt_to_phys'
include/asm/memory.h: In function `phys_to_virt':
include/asm/memory.h:38: warning: implicit declaration of function `__phys_to_virt'
arch/arm/kernel/asm-offsets.c: In function `main':
arch/arm/kernel/asm-offsets.c:59: structure has no member named `cpu_domain'
arch/arm/kernel/asm-offsets.c:60: structure has no member named `cpu_context'
arch/arm/kernel/asm-offsets.c:61: structure has no member named `used_cp'
arch/arm/kernel/asm-offsets.c:62: structure has no member named `tp_value'
arch/arm/kernel/asm-offsets.c:63: structure has no member named `fpstate'
arch/arm/kernel/asm-offsets.c:64: structure has no member named `vfpstate'
arch/arm/kernel/asm-offsets.c:65: structure has no member named `fpstate'
arch/arm/kernel/asm-offsets.c:67: structure has no member named `ARM_r0'
arch/arm/kernel/asm-offsets.c:68: structure has no member named `ARM_r1'
arch/arm/kernel/asm-offsets.c:69: structure has no member named `ARM_r2'
arch/arm/kernel/asm-offsets.c:70: structure has no member named `ARM_r3'
arch/arm/kernel/asm-offsets.c:71: structure has no member named `ARM_r4'
arch/arm/kernel/asm-offsets.c:72: structure has no member named `ARM_r5'
arch/arm/kernel/asm-offsets.c:73: structure has no member named `ARM_r6'
arch/arm/kernel/asm-offsets.c:74: structure has no member named `ARM_r7'
arch/arm/kernel/asm-offsets.c:75: structure has no member named `ARM_r8'
arch/arm/kernel/asm-offsets.c:76: structure has no member named `ARM_r9'
arch/arm/kernel/asm-offsets.c:77: structure has no member named `ARM_r10'
arch/arm/kernel/asm-offsets.c:78: structure has no member named `ARM_fp'
arch/arm/kernel/asm-offsets.c:79: structure has no member named `ARM_ip'
arch/arm/kernel/asm-offsets.c:80: structure has no member named `ARM_sp'
arch/arm/kernel/asm-offsets.c:81: structure has no member named `ARM_lr'
arch/arm/kernel/asm-offsets.c:82: structure has no member named `ARM_pc'
arch/arm/kernel/asm-offsets.c:83: structure has no member named `ARM_cpsr'
arch/arm/kernel/asm-offsets.c:84: structure has no member named `ARM_ORIG_r0'
make[2]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 2
make[1]: Leaving directory `/opt/uClinux-dist/linux-2.6.x'
 楼主| 发表于 2006-5-12 16:12:45 | 显示全部楼层
终于编译成功。
用2.6.14内核和补丁,一下子就好了,出现错误几乎没有。
debian:/opt/uClinux-dist# ls images/ -la
total 2820
drwxr-xr-x   2 root root    4096 2006-05-12 16:04 .
drwxr-xr-x  19 root root    4096 2006-05-12 15:57 ..
-rw-r--r--   1 root root 1637376 2006-05-12 16:04 romfs.img
-rwxr-xr-x   1 root root  612455 2006-05-12 16:04 uclinux_ram.bin.gz
-rw-r--r--   1 root root  612519 2006-05-12 16:04 uclinux_rom.bin
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-23 07:57 , Processed in 0.156836 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表