为Ok6410板编译android内核

时间:2012-02-10 10:39:13

标签: android compilation embedded kernel

Ok6410主板附带android 2.3源代码(包括内核),我想自定义内核然后使用它但是在编译期间我遇到了奇怪的错误,我现在从我的朋友那里得到了Ok6410 board问题是(官方支持是中文的),我按照文档中的编写过程(我通过google翻译翻译了文档),但我仍然遇到一些错误,我使用的是Ubuntu 11.04。 以下是我遵循的步骤(它们与手册中的步骤完全相同,我正在重写它,以便没有人需要查看文档)。

在桌面上创建一个文件夹android。

  1. cd Desktop / android
  2. sudo su
  3. tar jxvf arm-none-linux-gnueabi-arm-2008q3-72-for-linux.tar.bz2 -C /
  4. tar zxvf arm-linux-gcc-4.3.2.tgz -C /
  5. ls / usr / local / arm / -l <​​/ li>

    [ 上述命令的输出与手册中的相同:

    root @ ubuntu:/ home / usama / Desktop / android #ls / usr / local / arm / -l <​​/ p> 总共8

    drwxr-xr-x 7 root  root  4096 2009-03-25 12:08 4.3.2 
    drwxr-xr-x 8 usama usama 4096 2009-02-25 15:30 arm-none-linux-gnueabi
    

    6 tar zxvf android_boot-android2.3-128M.tar.gz

    7 cd android_boot-android2.3-128M

    MakeFile中存在问题,CROSS_COMPILE的路径错误,以前是

    CROSS_COMPILE = / usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-
    

    这是错的,我把它改为

    CROSS_COMPILE = / usr/local/arm/4.3.2/bin/arm-linux-
    

    [当路径没有改变时,我收到了错误,

    make: /usr/local/arm/4.2.2-eabi/usr/bin/arm-linux-gcc: Command not found 
    

    更改路径会删除此错误,

    root@ubuntu:/home/usama/Desktop/android/android_boot-android2.3-128M# gedit Makefile 
    
    (gedit:6888): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.X6LD9V': No such file or directory 
    (gedit:6888): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory 
    (gedit:6888): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.MT0E9V': No such file or directory 
    (gedit:6888): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory 
    (gedit:6888): Gtk-WARNING **: Attempting to store changes into `/root/.local/share/recently-used.xbel', but failed: Failed to create file '/root/.local/share/recently-used.xbel.MFVT9V': No such file or directory 
    (gedit:6888): Gtk-WARNING **: Attempting to set the permissions of `/root/.local/share/recently-used.xbel', but failed: No such file or directory 
    

    [在MakeFile中更改路径后建议使用clean,但会导致下面显示的错误]

    8 make clean

    root@ubuntu:/home/usama/Desktop/android/android_boot-android2.3-128M# make clean
    make: execvp: /: Permission denied 
    find /home/usama/Desktop/android/android_boot-android2.3-128M -type f \ 
        \( -name 'core' -o -name '*.bak' -o -name '*~' \ 
        -o -name '*~' -o -name '.depend*' \ 
        -o -name '*.o'  -o -name '*.a'  \) -print \ 
        | xargs rm -f 
    rm -f u-boot* 
    rm -f examples/hello_world examples/timer \ 
          examples/eepro100_eeprom examples/sched \ 
          examples/mem_to_mem_idma2intr examples/82559_eeprom \ 
          examples/smc91111_eeprom examples/interrupt \ 
          examples/test_burst 
    rm -f tools/img2srec tools/mkimage tools/envcrc \ 
        tools/gen_eth_addr 
    rm -f tools/mpc86x_clk tools/ncb 
    rm -f tools/easylogo/easylogo tools/bmp_logo 
    rm -f tools/gdb/astest tools/gdb/gdbcont tools/gdb/gdbsend 
    rm -f tools/env/fw_printenv tools/env/fw_setenv 
    rm -f board/cray/L1/bootscript.c board/cray/L1/bootscript.image 
    rm -f board/netstar/eeprom board/netstar/crcek board/netstar/crcit 
    rm -f board/netstar/*.srec board/netstar/*.bin 
    rm -f board/trab/trab_fkt board/voiceblue/eeprom 
    rm -f board/integratorap/u-boot.lds board/integratorcp/u-boot.lds 
    rm -f include/bmp_logo.h 
    rm -f nand_spl/u-boot-spl nand_spl/u-boot-spl.map 
    

    注意:execvp似乎是一些错误来源,但我不知道它是什么。

    9 export PATH = / usr / local / arm / 4.3.2 / bin /:$ PATH

    10 make

    root@ubuntu:/home/usama/Desktop/android/android_boot-android2.3-128M# make 
    make: execvp: /: Permission denied 
    for dir in tools examples post post/cpu ; do make -C $dir _depend ; done 
    make[1]: execvp: /: Permission denied 
    make[1]: Entering directory `/home/usama/Desktop/android/android_boot-android2.3-128M/tools' 
    make[1]: Leaving directory `/home/usama/Desktop/android/android_boot-android2.3-128M/tools' 
    make[1]: execvp: /: Permission denied 
    make[1]: Entering directory `/home/usama/Desktop/android/android_boot-android2.3-128M/tools' 
    make[1]: Nothing to be done for `_depend'. 
    make[1]: Leaving directory `/home/usama/Desktop/android/android_boot-android2.3-128M/tools' 
    make[1]: execvp: /: Permission denied 
    make[1]: Entering directory `/home/usama/Desktop/android/android_boot-android2.3-128M/examples' 
    /bin/sh: /: Permission denied 
    dirname: missing operand 
    Try `dirname --help' for more information. 
    /bin/sh: /: Permission denied 
    dirname: missing operand 
    Try `dirname --help' for more information. 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
     make[1]: *** No rule to make target `.depend', needed by `_depend'.  Stop. 
     make[1]: Leaving directory `/home/usama/Desktop/android/android_boot-android2.3-128M/examples' 
     make[1]: execvp: /: Permission denied 
     make[1]: Entering directory `/home/usama/Desktop/android/android_boot-android2.3-128M/post' 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    make[1]: *** No rule to make target `.depend', needed by `_depend'.  Stop. 
    make[1]: Leaving directory `/home/usama/Desktop/android/android_boot-android2.3-128M/post' 
    make[1]: execvp: /: Permission denied 
    make[1]: Entering directory `/home/usama/Desktop/android/android_boot-android2.3-128M/post/cpu' 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    /bin/sh: /: Permission denied 
    make[1]: *** No rule to make target `.depend', needed by `_depend'.  Stop. 
    make[1]: Leaving directory `/home/usama/Desktop/android/android_boot-android2.3-128M   /post/cpu' 
    make: *** [depend] Error 2 
    

    现在,如果有人能分辨出问题是什么以及如何解决问题:

    我试图在witech(销售这个董事会的公司)的论坛中提出这个问题,但我甚至无法在这些论坛上记账,因为所有这些(注册等)的说明都是中文和谷歌翻译的效果不是很好。

    我知道很多人可能没有在Ok6410上试过Android,但是任何有Linux和Android编译专业知识的人都可以找到问题。

    注意:

    这是在内核编译的最初步骤中发生的,所有这些错误都是在编译uboot时发生的,实际的内核源代码编译还没有开始。

    感谢您的帮助。

    问候

    乌萨马

1 个答案:

答案 0 :(得分:2)

使用此命令:

make smdk6410_config 
在给出make命令之前

。我认为它可能有用。