当前位置: 技术问答>linux和unix
编过2.6.36内核的先驱们请帮忙看看
来源: 互联网 发布时间:2016-10-12
本文导语: 2.6.36内核代码,首先执行了 make mx27_defconfig, 然后make menuconfig配置了我待移植的mx27目标板。 编译有下面的错误,请大家指点指点,谢谢! [root@localhost linux-2.6.36]# make ARCH=arm CROSS_COMPILE=arm-linux- uImage CHK ...
2.6.36内核代码,首先执行了 make mx27_defconfig,
然后make menuconfig配置了我待移植的mx27目标板。
编译有下面的错误,请大家指点指点,谢谢!
[root@localhost linux-2.6.36]# make ARCH=arm CROSS_COMPILE=arm-linux- uImage
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/irqflags.h:57,
from /usr/src/linux-2.6.36/arch/arm/include/asm/system.h:61,
from /usr/src/linux-2.6.36/arch/arm/include/asm/bitops.h:27,
from include/linux/bitops.h:22,
from include/linux/kernel.h:17,
from include/linux/sched.h:54,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/irqflags.h:11:5: warning: "__LINUX_ARM_ARCH__" is not defined
In file included from /usr/src/linux-2.6.36/arch/arm/include/asm/bitops.h:27,
from include/linux/bitops.h:22,
from include/linux/kernel.h:17,
from include/linux/sched.h:54,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/system.h:112:5: warning: "__LINUX_ARM_ARCH__" is not defined
/usr/src/linux-2.6.36/arch/arm/include/asm/system.h:118:5: warning: "__LINUX_ARM_ARCH__" is not defined
/usr/src/linux-2.6.36/arch/arm/include/asm/system.h:122:35: warning: "__LINUX_ARM_ARCH__" is not defined
In file included from include/linux/sched.h:57,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: division by zero in #if
In file included from /usr/src/linux-2.6.36/arch/arm/include/asm/page.h:26,
from include/linux/mm_types.h:15,
from include/linux/sched.h:63,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/glue.h:119:2: #error Unknown data abort handler type
/usr/src/linux-2.6.36/arch/arm/include/asm/glue.h:160:2: #error Unknown prefetch abort handler type
In file included from include/linux/mm_types.h:15,
from include/linux/sched.h:63,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/page.h:116:2: #error Unknown user operations model
In file included from /usr/src/linux-2.6.36/arch/arm/include/asm/page.h:202,
from include/linux/mm_types.h:15,
from include/linux/sched.h:63,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h: In function `virt_to_phys':
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:193: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:193: error: (Each undeclared identifier is reported only once
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:193: error: for each function it appears in.)
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h: In function `phys_to_virt':
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:198: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h: In function `virt_to_bus':
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:223: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h: In function `bus_to_virt':
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:228: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/mm.h:40,
from arch/arm/kernel/asm-offsets.c:14:
/usr/src/linux-2.6.36/arch/arm/include/asm/pgtable.h: In function `pmd_page_vaddr':
/usr/src/linux-2.6.36/arch/arm/include/asm/pgtable.h:354: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from arch/arm/kernel/asm-offsets.c:14:
include/linux/mm.h: In function `virt_to_head_page':
include/linux/mm.h:328: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from arch/arm/kernel/asm-offsets.c:14:
include/linux/mm.h: In function `lowmem_page_address':
include/linux/mm.h:603: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/dma-mapping.h:7,
from arch/arm/kernel/asm-offsets.c:15:
include/linux/scatterlist.h: In function `sg_set_buf':
include/linux/scatterlist.h:112: error: `PHYS_OFFSET' undeclared (first use in this function)
include/linux/scatterlist.h: In function `sg_phys':
include/linux/scatterlist.h:184: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h: In function `page_to_dma':
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h:20: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h: In function `dma_to_page':
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h:25: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h: In function `dma_to_virt':
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h:30: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h: In function `virt_to_dma':
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h:35: error: `PHYS_OFFSET' undeclared (first use in this function)
make[1]: *** [arch/arm/kernel/asm-offsets.s] 错误 1
然后make menuconfig配置了我待移植的mx27目标板。
编译有下面的错误,请大家指点指点,谢谢!
[root@localhost linux-2.6.36]# make ARCH=arm CROSS_COMPILE=arm-linux- uImage
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: “include/generated/mach-types.h”是最新的。
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/irqflags.h:57,
from /usr/src/linux-2.6.36/arch/arm/include/asm/system.h:61,
from /usr/src/linux-2.6.36/arch/arm/include/asm/bitops.h:27,
from include/linux/bitops.h:22,
from include/linux/kernel.h:17,
from include/linux/sched.h:54,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/irqflags.h:11:5: warning: "__LINUX_ARM_ARCH__" is not defined
In file included from /usr/src/linux-2.6.36/arch/arm/include/asm/bitops.h:27,
from include/linux/bitops.h:22,
from include/linux/kernel.h:17,
from include/linux/sched.h:54,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/system.h:112:5: warning: "__LINUX_ARM_ARCH__" is not defined
/usr/src/linux-2.6.36/arch/arm/include/asm/system.h:118:5: warning: "__LINUX_ARM_ARCH__" is not defined
/usr/src/linux-2.6.36/arch/arm/include/asm/system.h:122:35: warning: "__LINUX_ARM_ARCH__" is not defined
In file included from include/linux/sched.h:57,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: warning: "CLOCK_TICK_RATE" is not defined
include/linux/jiffies.h:257:31: division by zero in #if
include/linux/jiffies.h:257:31: division by zero in #if
In file included from /usr/src/linux-2.6.36/arch/arm/include/asm/page.h:26,
from include/linux/mm_types.h:15,
from include/linux/sched.h:63,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/glue.h:119:2: #error Unknown data abort handler type
/usr/src/linux-2.6.36/arch/arm/include/asm/glue.h:160:2: #error Unknown prefetch abort handler type
In file included from include/linux/mm_types.h:15,
from include/linux/sched.h:63,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/page.h:116:2: #error Unknown user operations model
In file included from /usr/src/linux-2.6.36/arch/arm/include/asm/page.h:202,
from include/linux/mm_types.h:15,
from include/linux/sched.h:63,
from arch/arm/kernel/asm-offsets.c:13:
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h: In function `virt_to_phys':
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:193: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:193: error: (Each undeclared identifier is reported only once
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:193: error: for each function it appears in.)
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h: In function `phys_to_virt':
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:198: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h: In function `virt_to_bus':
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:223: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h: In function `bus_to_virt':
/usr/src/linux-2.6.36/arch/arm/include/asm/memory.h:228: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/mm.h:40,
from arch/arm/kernel/asm-offsets.c:14:
/usr/src/linux-2.6.36/arch/arm/include/asm/pgtable.h: In function `pmd_page_vaddr':
/usr/src/linux-2.6.36/arch/arm/include/asm/pgtable.h:354: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from arch/arm/kernel/asm-offsets.c:14:
include/linux/mm.h: In function `virt_to_head_page':
include/linux/mm.h:328: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from arch/arm/kernel/asm-offsets.c:14:
include/linux/mm.h: In function `lowmem_page_address':
include/linux/mm.h:603: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/dma-mapping.h:7,
from arch/arm/kernel/asm-offsets.c:15:
include/linux/scatterlist.h: In function `sg_set_buf':
include/linux/scatterlist.h:112: error: `PHYS_OFFSET' undeclared (first use in this function)
include/linux/scatterlist.h: In function `sg_phys':
include/linux/scatterlist.h:184: error: `PHYS_OFFSET' undeclared (first use in this function)
In file included from include/linux/dma-mapping.h:93,
from arch/arm/kernel/asm-offsets.c:15:
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h: In function `page_to_dma':
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h:20: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h: In function `dma_to_page':
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h:25: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h: In function `dma_to_virt':
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h:30: error: `PHYS_OFFSET' undeclared (first use in this function)
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h: In function `virt_to_dma':
/usr/src/linux-2.6.36/arch/arm/include/asm/dma-mapping.h:35: error: `PHYS_OFFSET' undeclared (first use in this function)
make[1]: *** [arch/arm/kernel/asm-offsets.s] 错误 1
|
arch/arm/mm/Kconfig里有几个地方要添加|| ARCH_MX27
那再试试
make clean distclean
make ARCH=arm CROSS_COMPILE=arm-linux- mx27_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-
那再试试
make clean distclean
make ARCH=arm CROSS_COMPILE=arm-linux- mx27_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-
|
你生成.config文件了吗?
|
有没有把 || ARCH_MX27添加到arch/arm/mm/Kconfig对应的处理器中
或试试make menuconfig菜单里选择架构和编译器
或试试make menuconfig菜单里选择架构和编译器