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
  • 2681

Ubuntu14.04编译Andorid源码

经过两天的努力,终于把andorid源码给编译成功了。抑制住兴奋,写个总结 首先要下载源码: 在就是要配置java环境,这两天主要是被java环境给坑了。之前在windows下用惯了jdk7,...
  • brian512
  • brian512
  • 2015年01月27日 15:12
  • 19372

NanoPi K2 (Amlogic S905) Ubuntu 16.04 编译Android 5.1系统源码

NanoPi K2 (Amlogic S905) 编译Android系统源码 下载源码 在这里下载https://www.mediafire.com/folder/8xn2iirciznqh/S90...
  • kangear
  • kangear
  • 2017年12月26日 21:34
  • 726

Andriod下Amlogic开发环境搭建

**搭建这个环境主要是由于需要在Linux下使用tinyalsa做些音频方面的处理,本人搭建过程中,让人有点头疼的可能就是最后的环境变量那块,因为刚开始还不了解,所以费了很多事才将整个环境搭建好,所以...
  • hlj_include
  • hlj_include
  • 2016年10月14日 10:56
  • 563

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

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

amlogic 编译 android

/***************************************************************************************************...
  • ttxgz
  • ttxgz
  • 2012年03月28日 16:11
  • 5720

NanoPi K2 (Amlogic S905)无法下载Android源码

根据http://wiki.friendlyarm.com/wiki/index.php/NanoPi_K2/zh下载Android源码的步骤如下:mkdir android && cd androi...
  • kangear
  • kangear
  • 2017年11月12日 21:59
  • 445

amlogic晶晨S905rom固件解包打包定制工具CustomizationTool_setup_v2.0.10

  • 2017年11月26日 20:00
  • 24.22MB
  • 下载

编译命令(amlogic open linux)----学习笔记

•所有编译调试命令都在ui_ref/trunk/bld_xxx下面执行,具体哪个bld要根据您使用的板子决定;•Make #编译全部,包括kernel, busybox, packages等;•Mak...
  • huyan1983
  • huyan1983
  • 2010年04月20日 12:08
  • 4165

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

     由于工作需要现在开始从头学习linux,下面先记录amlogic openlinux安装步骤。(前提是安装了虚拟机)Amlogic open linux 编译环境安装一、gcc工具的安装1、...
  • huyan1983
  • huyan1983
  • 2010年04月20日 11:01
  • 3397
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:amlogic 编译 android
举报原因:
原因补充:

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