/******************************************************************************************************************/
               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
       [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
       [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
       [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
       [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
       [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.

                                                                                                                                                               



更多相关文章

  1. Android文件存储
  2. Android 播放资源文件视频
  3. Activity com.avcit.conference.MainActivity has leaked window
  4. android 日志文件输出
  5. android studio gradle编译时的jar冲突错误
  6. gradle 配置文件 build.gradle 属性详解
  7. android文件缓存,并SD卡创建目录未能解决和bitmap内存溢出解决
  8. android 布局文件 layout_weight用法
  9. android Context错误使用引发的内存泄露

随机推荐

  1. C语言怎么换行
  2. sqrt在c语言中怎么用
  3. 字符数组表示字符串的注意事项是什么
  4. C语言的特点与创建的基本步骤是什么
  5. 一个include命令可以指定多个被包含的文
  6. c语言如何求两个数的最大公约数
  7. 在switch语句中,case后的标号只能是什么?
  8. c语言中1e-6什么意思
  9. 在c语言中,引用数组元素时,其数组下标的数
  10. C++隐式类型转换是什么?