amlogic 编译 android

原创 2012年03月28日 16:11:00
/******************************************************************************************************************/
               SDK Enviroment config
/******************************************************************************************************************/
1. download cross compile toolchains from the following:
        http://openlinux.amlogic.com/wiki/index.php/Arm/Development_Tools

2. tar -xvjf arm-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
   cp -rf arm-2010q1 /usr/local/arm/

   add the following to /etc/bash.bashrc

        #add arm tool chain to PATH by liaowm
        if [ -d /usr/local/arm/arm-2010q1 ];then
        export PATH=/usr/local/arm/arm-2010q1/bin:$PATH
        fi  

3. download arc tools from the following:
        http://openlinux.amlogic.com/wiki/index.php/Arc/Development_Tools

4. tar -xvjf gnutools-arc2.3-p0-ubuntu-9.04-2010-5-10.tar.bz2
   cp to /opt/gnutools/arc2.3-p0
   add the following to /etc/bash.bashrc

        SET_PATH=$( echo "$PATH" | grep elf32)
        if [  "$SET_PATH" = "" ]; then
        ARC_PREFIX=/opt/gnutools/arc2.3-p0
        PATH=$PATH:${ARC_PREFIX}/elf32-4.2.1/bin:${ARC_PREFIX}/uclibc-4.2.1/bin:
        fi  

5. if encount pthread error, install gcc 4.4

        apt-get install gcc-4.4
        update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.5 40
        update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 30
        update-alternatives --config gcc


6. if encount the following error:

        target Generated: libwebcore <= external/webkit/WebCore/css/CSSCharsetRule.idl
        gcc: error trying to exec 'cc1plus': execvp: 没有那个文件或目录
        Can't call method "fileName" without a package or object reference at external/webkit/WebCore/bindings/scripts/IDLParser.pm line 112.
        make: *** [out/target/product/imx51_BBG/obj/STATIC_LIBRARIES/libwebcore_intermediates/WebCore/css/JSCSSCharsetRule.h] 错误 255

        that means g++ and gcc version are not the same, install gcc 4.4 and g++ 4.4

        apt-get install g++-4.4
        update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.5 40
        update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.4 30
        update-alternatives --config g++

7. if encount the following error:

    host Executable: acp (out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp)
    host SharedLib: libneo_cgi (out/host/linux-x86/obj/lib/libneo_cgi.so)
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/libstdc++.so when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/libstdc++.a when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/libstdc++.so when searching for -lstdc++
    /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.3.3/libstdc++.a when searching for -lstdc++
    /usr/bin/ld: cannot find -lstdc++
    collect2: ld 返回 1
    make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp] 错误 1
    make: *** 正在等待未完成的任务....

        or

        /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libz.so when searching for -lz
        /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.4.3/../../../libz.a when searching for -lz
        /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz
        /usr/bin/ld: skipping incompatible /usr/lib/libz.a when searching for -lz
        /usr/bin/ld: cannot find -lz
        collect2: ld returned 1 exit status
        make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1

    that means some libs of gcc and g++ (we have download a new version of gcc/g++, but no coresponding libs, remember?)  are not installed well, use the following:

        apt-get install gcc-4.4-multilib
        apt-get install g++-4.4-multilib

        so remember next time, when install a new version of gcc/g++, you should also install the coresponding multilib.

8. if encount the following error of FBReader

        for repeatable builds
       [javac] Compiling 333 source files to /Users/zhangcy/Desktop/Eclipse workspace/FBReaderJ/bin/classes
       [javac] /Users/zhangcy/Desktop/Eclipse workspace/FBReaderJ/src/org/geometerplus/android/fbreader/TOCActivity.java:79: inconvertible types
       [javac] found   : org.geometerplus.zlibrary.core.tree.ZLTree<capture#147 of ?>
       [javac] required: org.geometerplus.fbreader.bookmodel.TOCTree
       [javac]         final TOCTree tree = (TOCTree)myAdapter.getItem(position);
       [javac]                                                        ^
       [javac] /Users/zhangcy/Desktop/Eclipse workspace/FBReaderJ/src/org/geometerplus/android/fbreader/TOCActivity.java:99: inconvertible types
       [javac] found   : org.geometerplus.zlibrary.core.tree.ZLTree<capture#134 of ?>
       [javac] required: org.geometerplus.fbreader.bookmodel.TOCTree
       [javac]             final TOCTree tree = (TOCTree)getItem(position);
       [javac]                                                  ^
       [javac] /Users/zhangcy/Desktop/Eclipse workspace/FBReaderJ/src/org/geometerplus/android/fbreader/TOCActivity.java:112: inconvertible types
       [javac] found   : org.geometerplus.zlibrary.core.tree.ZLTree<capture#255 of ?>
       [javac] required: org.geometerplus.fbreader.bookmodel.TOCTree
       [javac]             final TOCTree tree = (TOCTree)getItem(position);
       [javac]                                                  ^
       [javac] /Users/zhangcy/Desktop/Eclipse workspace/FBReaderJ/src/org/geometerplus/android/fbreader/TOCActivity.java:113: incomparable types: org.geometerplus.fbreader.bookmodel.TOCTree and org.geometerplus.zlibrary.core.tree.ZLTree<capture#940 of ?>
       [javac]             view.setBackgroundColor((tree == mySelectedItem) ? 0xff808080 : 0);
       [javac]                                           ^
       [javac] /Users/zhangcy/Desktop/Eclipse workspace/FBReaderJ/src/org/geometerplus/android/fbreader/TOCActivity.java:135: inconvertible types
       [javac] found   : org.geometerplus.zlibrary.core.tree.ZLTree<capture#384 of ?>
       [javac] required: org.geometerplus.fbreader.bookmodel.TOCTree
       [javac]             openBookText((TOCTree)tree);
       [javac]                                   ^
       [javac] Note: Some input files use unchecked or unsafe operations.
       [javac] Note: Recompile with -Xlint:unchecked for details.
       [javac] 5 errors
/Users/xxxx/android-sdk-mac_x86/tools/ant/main_rules.xml:384: Compile failed; see the compiler error output for details.

                check your jdk version, it may be not the newest(java -version), download jdk-6u31-linux-x64.bin from oracle offical website.

                ./jdk-6u31-linux-x64.bin
                export JAVA_HOME=/home/liaowm/m3/tool/jdk1.6.0_31


                that means your jdk is not new enough. download


9. build process:
        a.      Build rootfs:
                   $. build/envsetup.sh
                   $ lunch ref04-user
                   $make
        b.      Build kernel:
        $make meson_reff04_defconfig
        $make menuconfig
        enable General setup->Initial RAM filesystem and RAM disk
                set "Initramfs source file" to root dir(../out/target/product/refb17/root)
        $make uImage
        copy uImage to out/target/product/reff04
        c.       build uImage_recovery
        $make menuconfig
        set General setup->”Initramfs source file” to recovery root dir(../out/target/product/reff04/recovery/root)
          $make uImage
          rename uImage into uImage_recovery
          copy uImage_recovery to out/target/product/reff04
        d.       build reff04-ota-eng.username.zip
        $cd ..
          $make otapackage
        e.      flash image into nand
          cp ref-ota-eng.username.zip uImage uImage_recovery into sdcard

10. update system

        a. Put u-boot-aml.bin uImage uImage_recovery and *.zip to SD card
        b. insert the SD to MID
        c. Power on ,and press vol+ at the same time , release vol+ while you can see some update options display on the panel
        d. press vol+ or vol- to move the focus on wipe media partition("wipe media partition"),then press menu select "yes".
        e. press vol+ or vol- to move the focus on wipe data/factory reset ("wipe data/factory reset"),then press menu select "yes".
        f. press vol+ or vol- to move the focus on the second option(apply update from sdcard’, then press menu ,select"b17ref-ota-eng.username.zip".the update process will start
        g. wait for the complete of the update and reboot

11. if you find that the system can not run because the root filesystem is mount in NFS, that may be the kernel problem. make clean kernel, then make again, it may be good.

                                                                                                                                                               



相关文章推荐

Android 系统移植与调试(二)Android系统编译 amlogic RK 全志系统编译

Amlogic RK  全志 等等都会提供源码编译说明的文档,照着文档编译即可。拿Android 5.1 为例。amlogic 编译大概如下 1、设置当前SDK源码编译环境: 命令主...
  • capeng
  • capeng
  • 2016年05月18日 16:53
  • 2373

Amlogic open linux 编译环境安装 ---学习笔记

     由于工作需要现在开始从头学习linux,下面先记录amlogic openlinux安装步骤。(前提是安装了虚拟机)Amlogic open linux 编译环境安装一、gcc工具的安装1、...

深入浅出 - Android系统移植与平台开发(十三)- Android的对象管理

第六章、Android的对象管理在Java中,不再使用的对象会通过gc机制来自动回收,而Android系统运行时库层代码是由C++编写的,在C++中创建的对象通常使用指针来操作,一旦使用不当,轻则造成...

Android ART Runtime (2) – dex2oat

篇文章中我们介绍了 Android 4.4 新开发的运行时 ART 项目,其中的一个重要模快是 dex2oat,简单讲就是使用 LLVM 把 dex 文件编译成 oat 文件(Optimized AR...

amlogic平台android 系统linux内核中添加i2c设备实现i2c的读写

上一篇,我介绍了如何在uboot中添加i2c设备,以及移植i2c的读写接口。简单来说uboot阶段使用i2c设备和平台关联性比较大,但不同平台套路是差不多的。你可以将uboot阶段看作是引导andro...

NanoPi K2 (Amlogic 905) 自行编译内核启动不起来

目前盒子较多使用Amlogic的方案,在网上找Amlogic 905开发板,看到友善之臂居然也出了一款名字叫NanoPi K2,内核和系统都已经开源,但是却遇到编译的自己的编译的内核无法运行的问题。完...
  • kangear
  • kangear
  • 2017年10月26日 09:03
  • 417

Amlogic编译

  • 2014年03月06日 14:11
  • 17KB
  • 下载

amlogic平台android uboot中添加i2c设备实现i2c的读写

最近因为项目项目需求,要把MTK平台的一个设备移植到amlogic平台。需要分别在uboot阶段和android系统起来以后的阶段,使用i2c来通知这个设备进行操作。这其中就涉及到两点: 1. 在ub...

android APP集成系统详细步骤及注意事项(amlogic平台)

此说明用于amlogic平台集成不签名的apk。(如何判断集成的apk需不需要签名。简单来说使用U盘安装后,能正常打开使用的就可以不签名方式集成。) 各平台的文件系统有差异,但整体大同小异。其他平台的...

amlogic ap6210 wifi bt驱动移植

外设配置 - wifi SDIO wifi: AP6210 1 配置 kernel 配置 deconfig 文件 AP6210 kernel 的配置主要是修改 com...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:amlogic 编译 android
举报原因:
原因补充:

(最多只允许输入30个字)