This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

参考SC-MCSDK文件编译TI 6614的Linux Image上遇到问题

目前在编译TI 6614的Linux Image上遇到问题,编译过程简列如下:

 

※参考http://software-dl.ti.com/sdoemb/sdoemb_public_sw/sc_mcsdk/latest/index_FDS.html 上User Guide文件

 

1. Prepared Ubuntu 10.04 LTS installed PC.

 

2. Install arm-2009q1-203-arm-none-linux-gnueabi.bin .

Install Linaro toolchain 2012.03

 

3. Set environment variables in $HOME/.profile .

export PATH=/root/CodeSourcery/Sourcery_G++_Lite/bin:$PATH

export PATH=/root/gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux/bin:$PATH

export CROSS_COMPILE=arm-none-linux-gnueabi-

export ARCH=arm

 

5. apt-get install git-core bitbake, and required tools...

 

6. And the followings.

$ mkdir $HOME/sc-mcsdk

$ cd $HOME/sc-mcsdk

$ git clone git://arago-project.org/git/arago-oe-dev.git

$ cd arago-oe-dev

$ git checkout 2011.09  # checkout'ed by my own preference

$ cd ..

$ git clone git://arago-project.org/git/arago-bitbake.git

$ cd arago-bitbake

$ git checkout 1.10.2-arago1  # ditto

$ cd ..

$ git clone git://arago-project.org/git/projects/arago-tci6614.git arago

$ cd arago

 

$ git checkout DEV.SC-MCSDK-02.01.00.01P2  # ditto

$ cd ..

 

7.

$ cd $HOME/sc-mcsdk

$ cp arago/setenv.sample arago/setenv

 

8. Edited arago/setenv to change OEBASE to $HOME/sc-mcsdk

 

9. And also

$ cp arago/conf/local.conf.sample arago/conf/local.conf

加入下列文字到local.conf的最后面

LINARO_PREFIX = "arm-linux-gnueabi-"

KERNEL_CC = "${LINARO_PREFIX}gcc ${HOST_CC_KERNEL_ARCH}"

KERNEL_LD = "${LINARO_PREFIX}ld ${HOST_LD_KERNEL_ARCH}"

KERNEL_NM = "${LINARO_PREFIX}nm ${HOST_NM_KERNEL_ARCH}"

KERNEL_AR = "${LINARO_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"

KERNEL_OBJCOPY = "${LINARO_PREFIX}objcopy ${HOST_OBJCOPY_KERNEL_ARCH}"

 

10. Start building image

$ cd $HOME/sc-mcsdk

$ source arago/setenv

$ MACHINE=tci6614-evm bitbake arago-sc-mcsdk-base-image

 

 

※在编译过程最后出现下列错误讯息,停止编译

---

 

--2013-07-11 19:03:06-- http://xorg.freedesktop.org/releases/individual/proto/xproto-7.0.20.tar.bz2 <http://xorg.freedesktop.org/releases/individual/proto/xproto-7.0.20.tar.bz2>

Resolving xorg.freedesktop.org... NOTE: package xproto-1_7.0.20-r2.0: task do_setscene: Succeeded

131.252.210.176

Connecting to xorg.freedesktop.org <http://xorg.freedesktop.org/> |131.252.210.176|:80... connected.

HTTP request sent, awaiting response... NOTE: Running task 410 of 2306 (ID: 2208, /home/chiching/sc-mcsdk/arago-oe-dev/recipes/xorg-proto/xproto_7.0.20.bb <http://xproto_7.0.20.bb/> , do_fetch)

NOTE: package xproto-1_7.0.20-r2.0: task do_fetch: Started

NOTE: fetch http://xorg.freedesktop.org/releases/individual/proto/xproto-7.0.20.tar.bz2 <http://xorg.freedesktop.org/releases/individual/proto/xproto-7.0.20.tar.bz2>

200 OK

Length: 277229 (271K) [application/x-bzip2] Saving to: `/home/chiching/sc-mcsdk/downloads/xproto-7.0.20.tar.bz2'

 

0K .......... .......... .......... .......... .......... 18% 50.0K 4s 50K .......... .......... .......... .......... .......... 36% 220K 2s 100K .......... .......... .......... .......... .......... 55% 116K 1s 150K .......... .......... .......... .......... .......... 73% 104K 1s 200K .......... .......... .......... .......... .......... 92% 100K 0s 250K .......... .......... 100% 110K=2.8s

 

2013-07-11 19:03:10 (95.8 KB/s) - `/home/chiching/sc-mcsdk/downloads/xproto-7.0.20.tar.bz2' saved [277229/277229]

 

NOTE: package xproto-1_7.0.20-r2.0: task do_fetch: Succeeded

NOTE: Running task 411 of 2306 (ID: 2201, /home/chiching/sc-mcsdk/arago-oe-dev/recipes/xorg-proto/xproto_7.0.20.bb <http://xproto_7.0.20.bb/> , do_unpack)

NOTE: package xproto-1_7.0.20-r2.0: task do_unpack: Started

NOTE: Unpacking downloads/xproto-7.0.20.tar.bz2 to arago-tmp/work/armv7a-none-linux-gnueabi/xproto-1_7.0.20-r2.0/

NOTE: package xproto-1_7.0.20-r2.0: task do_unpack: Succeeded

NOTE: Running task 412 of 2306 (ID: 122, /home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> , do_qa_configure)

NOTE: package linux-tci6614-evm-3.3-r0: task do_qa_configure: Started

NOTE: package linux-tci6614-evm-3.3-r0: task do_qa_configure: Succeeded

NOTE: Running task 413 of 2306 (ID: 123, /home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> , do_compile)

NOTE: package linux-tci6614-evm-3.3-r0: task do_compile: Started

ERROR: TaskFailed event exception, aborting

ERROR: Build of /home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> do_compile failed

ERROR: Task 123 (/home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> , do_compile) failed with exit code 1

ERROR: '/home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> ' failed

ERROR: Function do_compile failed

NOTE: Task failed: ('function do_compile failed', '/home/chiching/sc-mcsdk/arago-tmp/work/tci6614-evm-none-linux-gnueabi/linux-tci6614-evm-3.3-r0/temp/log.do_compile.7666')

ERROR: Logfile of failure stored in: /home/chiching/sc-mcsdk/arago-tmp/work/tci6614-evm-none-linux-gnueabi/linux-tci6614-evm-3.3-r0/temp/log.do_compile.7666

Log data follows:

| NOTE: make KALLSYMS_EXTRA_PASS=1 EXTRAVERSION=-02.01.00.01-p2

| include/linux/version.h AR=arm-none-linux-gnueabi-ar

| CC=arm-none-linux-gnueabi-gcc -mno-thumb-interwork -mno-thumb

| LD=arm-none-linux-gnueabi-ld

| --sysroot=/home/chiching/sc-mcsdk/arago-tmp/sysroots/armv7a-none-linux

| -gnueabi NM=arm-none-linux-gnueabi-nm

| OBJCOPY=arm-none-linux-gnueabi-objcopy

| CHK include/linux/version.h

| UPD include/linux/version.h

| NOTE: make KALLSYMS_EXTRA_PASS=1 EXTRAVERSION=-02.01.00.01-p2 dep

| AR=arm-none-linux-gnueabi-ar CC=arm-none-linux-gnueabi-gcc

| -mno-thumb-interwork -mno-thumb LD=arm-none-linux-gnueabi-ld

| --sysroot=/home/chiching/sc-mcsdk/arago-tmp/sysroots/armv7a-none-linux

| -gnueabi NM=arm-none-linux-gnueabi-nm

| OBJCOPY=arm-none-linux-gnueabi-objcopy

| scripts/kconfig/conf --silentoldconfig Kconfig

| *** Warning: make dep is unnecessary now.

| NOTE: make KALLSYMS_EXTRA_PASS=1 EXTRAVERSION=-02.01.00.01-p2 uImage

| AR=arm-none-linux-gnueabi-ar CC=arm-none-linux-gnueabi-gcc

| -mno-thumb-interwork -mno-thumb LD=arm-none-linux-gnueabi-ld

| --sysroot=/home/chiching/sc-mcsdk/arago-tmp/sysroots/armv7a-none-linux

| -gnueabi NM=arm-none-linux-gnueabi-nm

| OBJCOPY=arm-none-linux-gnueabi-objcopy

| WRAP arch/arm/include/generated/asm/auxvec.h

| WRAP arch/arm/include/generated/asm/bitsperlong.h

| WRAP arch/arm/include/generated/asm/cputime.h

| WRAP arch/arm/include/generated/asm/emergency-restart.h

| WRAP arch/arm/include/generated/asm/errno.h

| WRAP arch/arm/include/generated/asm/ioctl.h

| WRAP arch/arm/include/generated/asm/irq_regs.h

| WRAP arch/arm/include/generated/asm/kdebug.h

| WRAP arch/arm/include/generated/asm/local.h

| WRAP arch/arm/include/generated/asm/local64.h

| WRAP arch/arm/include/generated/asm/percpu.h

| WRAP arch/arm/include/generated/asm/poll.h

| WRAP arch/arm/include/generated/asm/resource.h

| WRAP arch/arm/include/generated/asm/sections.h

| WRAP arch/arm/include/generated/asm/siginfo.h

| WRAP arch/arm/include/generated/asm/sizes.h

| CHK include/linux/version.h

| CHK include/generated/utsrelease.h

| UPD include/generated/utsrelease.h

| Generating include/generated/mach-types.h CC kernel/bounds.s GEN

| include/generated/bounds.h CC arch/arm/kernel/asm-offsets.s GEN

| include/generated/asm-offsets.h CALL scripts/checksyscalls.sh HOSTCC

| scripts/dtc/checks.o HOSTCC scripts/dtc/data.o SHIPPED

| scripts/dtc/dtc-lexer.lex.c SHIPPED scripts/dtc/dtc-parser.tab.h

| HOSTCC scripts/dtc/dtc-lexer.lex.o SHIPPED

| scripts/dtc/dtc-parser.tab.c HOSTCC scripts/dtc/dtc-parser.tab.o

| HOSTCC scripts/dtc/dtc.o HOSTCC scripts/dtc/flattree.o HOSTCC

| scripts/dtc/fstree.o HOSTCC scripts/dtc/livetree.o HOSTCC

| scripts/dtc/srcpos.o HOSTCC scripts/dtc/treesource.o HOSTCC

| scripts/dtc/util.o HOSTLD scripts/dtc/dtc HOSTCC

| scripts/genksyms/genksyms.o SHIPPED scripts/genksyms/lex.lex.c SHIPPED

| scripts/genksyms/keywords.hash.c SHIPPED scripts/genksyms/parse.tab.h

| HOSTCC scripts/genksyms/lex.lex.o SHIPPED scripts/genksyms/parse.tab.c

| HOSTCC scripts/genksyms/parse.tab.o HOSTLD scripts/genksyms/genksyms

| CC scripts/mod/empty.o HOSTCC scripts/mod/mk_elfconfig MKELF

| scripts/mod/elfconfig.h HOSTCC scripts/mod/file2alias.o HOSTCC

| scripts/mod/modpost.o HOSTCC scripts/mod/sumversion.o HOSTLD

| scripts/mod/modpost HOSTCC scripts/kallsyms HOSTCC scripts/bin2c CC

| init/main.o CHK include/generated/compile.h UPD

| include/generated/compile.h CC init/version.o CC init/do_mounts.o CC

| init/do_mounts_initrd.o LD init/mounts.o CC init/initramfs.o CC

| init/calibrate.o LD init/built-in.o HOSTCC usr/gen_init_cpio GEN

| usr/initramfs_data.cpio AS usr/initramfs_data.o LD usr/built-in.o CC

| arch/arm/vfp/vfpmodule.o AS arch/arm/vfp/entry.o AS

| arch/arm/vfp/vfphw.o CC arch/arm/vfp/vfpsingle.o CC

| arch/arm/vfp/vfpdouble.o LD arch/arm/vfp/vfp.o LD

| arch/arm/vfp/built-in.o CC arch/arm/kernel/elf.o AS

| arch/arm/kernel/entry-armv.o AS arch/arm/kernel/entry-common.o CC

| arch/arm/kernel/irq.o CC arch/arm/kernel/opcodes.o CC

| arch/arm/kernel/process.o CC arch/arm/kernel/ptrace.o CC

| arch/arm/kernel/return_address.o

| arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"

| arch/arm/kernel/return_address.c:62:2: warning: #warning "TODO: return_address should use unwind tables"

| CC arch/arm/kernel/setup.o

| CC arch/arm/kernel/signal.o

| CC arch/arm/kernel/sys_arm.o

| CC arch/arm/kernel/stacktrace.o

| CC arch/arm/kernel/time.o

| CC arch/arm/kernel/traps.o

| CC arch/arm/kernel/armksyms.o

| CC arch/arm/kernel/module.o

| CC arch/arm/kernel/machine_kexec.o

| /tmp/ccn2PUtd.s: Assembler messages:

| /tmp/ccn2PUtd.s:199: Warning: value stored for r4 is UNPREDICTABLE AS

| arch/arm/kernel/relocate_kernel.o

| arch/arm/kernel/relocate_kernel.S: Assembler messages:

| arch/arm/kernel/relocate_kernel.S:10: Error: invalid offset, value too

| big (0xFFFFFFFC)

| arch/arm/kernel/relocate_kernel.S:11: Error: invalid offset, value too

| big (0xFFFFFFFC)

| arch/arm/kernel/relocate_kernel.S:58: Error: invalid offset, value too

| big (0xFFFFFFFC)

| arch/arm/kernel/relocate_kernel.S:59: Error: invalid offset, value too

| big (0xFFFFFFFC)

| make[1]: *** [arch/arm/kernel/relocate_kernel.o] Error 1

| make: *** [arch/arm/kernel] Error 2

| FATAL: oe_runmake failed

| ERROR: Function do_compile failed

NOTE: package linux-tci6614-evm-3.3-r0: task do_compile: Failed

ERROR: TaskFailed event exception, aborting

ERROR: Build of /home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> do_compile failed

ERROR: Task 123 (/home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> , do_compile) failed with exit code 1

ERROR: '/home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> ' failed

ERROR: '/home/chiching/sc-mcsdk/arago/recipes/linux/linux-tci6614-evm_git.bb <http://linux-tci6614-evm_git.bb/> ' failed chiching@ubuntu:~/sc-mcsdk$

 

----

 

看起来是在编译Kernel出问题了,请教各位高手如何解决,谢谢!!

  • 您好:

     

    看您的帖子里面主要有3个问题:

     

    1)您Git的arago上的TCI6614的Linux Kernel路径不对,正确路径请您参考下载SC-MCSDK链接中的Release Note,里面有具体用于TCI6614EVM的Linux Kernel在arago上的路径:

    http://arago-project.org/git/projects/?p=u-boot-tci6614.git;a=summary

    2)不知道您为何要安装两个交叉编译链?因为安装完交叉编译链之后,交叉编译链定义当前正在使用的也只有一个,export CROSS_COMPILE=arm-none-linux-gnueabi- 这一定义就定义了您正在使用的编译链,使用Linaro时需要将该定义改为Linaro相应的编译链前缀。您在一开始定义时使用的arm-none-linux-gnueabi-是CodeSourcery前缀,之后又添加了LINARO_PREFIX = "arm-linux-gnueabi-",这两点是矛盾的。

    3)您的编译过程也不是很正确,您下载并安装完SC-MCSDK之后,在相关doc文件夹下有SC-MSCDK的User Guide,里面应该有具体安装及编译说明,或者参考附件中的文档进行编译操作。

     

     

    Building TCI6614 U-Boot and Linux Kernel.pdf
  • 您好,按照您的文件,的确可以编译出6614的Linux Kernel(uImage,zImage),

    看起来接近SC-MCSDK_User_Guide.pdf文件中第14页提到的Building Linux Kernel outside Arago方式。

     

    请问如果想用SC-MCSDK_User_Guide.pdf文件中第九页到第十二页,

    提到的用Arago环境编译出Linux Kernel, Uboot与UBIFS image (类似sc_mcsdk_2_01_00_01_setuplinux.bin安装后的tci6614-evm-ubifs.ubi),

    有没有类似的比较清楚的文件,因为我是完全按文件上第九页讲的,

    安装两种交叉编译,底下列出文件上的文字:

     

    • Install Code Sourcery: Install Code Sourcery 2009 q1 tool chain for cross compiling. You can download

    CS2009q1 from here[13].

    • Install Linaro toolchain 2012.03 for cross compiling (for thumb2 mode enabled kernel).

    • wget https:/   /   launchpad.   net/   linaro-toolchain-binaries/   trunk/   2012.   03/   +   download/

    gcc-linaro-arm-linux-gnueabi-2012.   03-20120326_linux.   tar.   bz2

    • tar -jxf gcc-linaro-arm-linux-gnueabi-2012.03-20120326_linux.tar.bz2

    • Configure environment variables for toolchain and architecture. These may be added to your .bashrc or

    shell initialization script:

    export PATH=<path-to-code-sourcery-bin>:$PATH

    export PATH=<path-to-linaro-toolchain-bin>:$PATH

    export CROSS_COMPILE=arm-none-linux-gnueabi-

    export ARCH=arm

     

     

    再抓取Arago的相关档案,

    • Create the SC-MCSDK repository directory:

    $ mkdir $HOME/sc-mcsdk;

    cd $HOME/sc-mcsdk

    • Clone Arago repositories

    $ git clone git://arago-project.org/git/arago-oe-dev.git

    $ cd arago-oe-dev

    $ git reset --hard 2011.09

    $ cd ..

    $ git clone git://arago-project.org/git/arago-bitbake.git

    $ cd arago-bitbake

    $ git reset --hard 1.10.2-arago1

    $ cd ..

    $ git clone git://arago-project.org/git/projects/arago-tci6614.git arago

    $ cd arago

    $ git reset --hard DEV.SC-MCSDK-02.01.00.01

    $ cd ..

     

    设定Arago

    $ cp arago/setenv.sample arago/setenv

    Edit arago/setenv and modified as follows: export OEBASE=$HOME/sc-mcsdk

    $ cp arago/conf/local.conf.sample arago/conf/local.conf

    paste the following lines to the end of file: arago/conf/local.conf

    LINARO_PREFIX = "arm-linux-gnueabi-"

    KERNEL_CC = "${LINARO_PREFIX}gcc ${HOST_CC_KERNEL_ARCH}"

    KERNEL_LD = "${LINARO_PREFIX}ld ${HOST_LD_KERNEL_ARCH}"

    KERNEL_NM = "${LINARO_PREFIX}nm ${HOST_NM_KERNEL_ARCH}"

    KERNEL_AR = "${LINARO_PREFIX}ar ${HOST_AR_KERNEL_ARCH}"

    KERNEL_OBJCOPY = "${LINARO_PREFIX}objcopy ${HOST_OBJCOPY_KERNEL_ARCH}"

     

    最后编译:

    $ cd $HOME/sc-mcsdk

    $ source arago/setenv

    $ MACHINE=tci6614-evm bitbake arago-sc-mcsdk-base-image

     

    最后还是会出现一样的问题,请问您有另外用Arago环境来编译较详细的文件吗? 因为我想要一起编译出UBI file system的Image,多谢!

     

    参考User Guide文件:

    http://software-dl.ti.com/sdoemb/sdoemb_public_sw/sc_mcsdk/latest/exports/SC-MCSDK_User_Guide.pdf