• 编译MTK6516脚本


    #! /bin/sh
    
    # add arm-eabi-gcc to PATH
    ARM_EABI_GCC_BIN_DIR=`pwd`/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin
    chmod u+x $ARM_EABI_GCC_BIN_DIR/*
    JAVA_HOME=/usr/local/jdk1.5.0_22
    export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    export PATH=`pwd`:$JAVA_HOME/bin:/usr/local/python2.5.6/bin:/usr/local/perl5.8.8/bin:$ARM_EABI_GCC_BIN_DIR:$PATH
    echo $PATH
    
    echo 'java -version'
    echo building env is ready for you !
    #need gtk environment  
    #if ! [ $1 = "-c" ]; then
     #   gnome-terminal
    #fi
    
    

    这句就是加入当前工程的ARM的交叉编译器。

    注意 ·pwd·就是取得当前路径。
    (标点打不出来。。。微笑,是TAB上面那个按键。 知道了吧?2个反的那种点号,名字不晓得) 


    yuanwei@mt6516-desktop:~/Workspace/alps$ source setupenv
    /home/yuanwei/Workspace/alps:/usr/local/jdk1.5.0_22/bin:/usr/local/python2.5.6/bin:/usr/local/perl5.8.8/bin:/home/yuanwei/Workspace/alps/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin:/usr/local/jdk1.5.0_22/bin:/usr/local/jdk1.5.0_22/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/yuanwei/Workspace/alps/prebuilt/linux-x86/toolchain:/home/yuanwei/Workspace/alps/prebuilt/linux-x86/toolchain
    java -version
    building env is ready for you !
    yuanwei@mt6516-desktop:~/Workspace/alps$ ar
    ar                  arm-eabi-g++        arm-eabi-objdump
    arch                arm-eabi-gcc        arm-eabi-ranlib
    arecord             arm-eabi-gcc-4.4.0  arm-eabi-readelf
    arecordmidi         arm-eabi-gccbug     arm-eabi-run
    arm2hpdl            arm-eabi-gcov       arm-eabi-size
    arm-eabi-addr2line  arm-eabi-gdb        arm-eabi-strings
    arm-eabi-ar         arm-eabi-gdbtui     arm-eabi-strip
    arm-eabi-as         arm-eabi-gprof      arp
    arm-eabi-c++        arm-eabi-ld         arpd
    arm-eabi-c++filt    arm-eabi-nm         arping
    arm-eabi-cpp        arm-eabi-objcopy

    之后再运行一个脚本编译了,内容如下:


    #! /bin/sh
    DST_DIR=`pwd`/"moba_out"
    if [ $1 = "copyout" ]; then
        if ! [ -d $DST_DIR ]; then
            mkdir $DST_DIR
        fi
         echo "begining copy all the img&bin to your dst-dir........................................"
        cp `pwd`/mtk/src/misc/MT6516_Android_scatter.txt $DST_DIR
        cp `pwd`/bootable/bootloader/preloader/preloader_moba16_a10y.bin $DST_DIR
        cp `pwd`/bootable/bootloader/uboot/uboot_moba16_a10y.bin $DST_DIR
        cp `pwd`/out/target/product/moba16_a10y/boot.img $DST_DIR
        cp `pwd`/out/target/product/moba16_a10y/recovery.img $DST_DIR
        cp `pwd`/out/target/product/moba16_a10y/secro.img $DST_DIR
        cp `pwd`/out/target/product/moba16_a10y/system.img $DST_DIR
        cp `pwd`/kernel/Download/flash/logo.bin $DST_DIR
        cp `pwd`/out/target/product/moba16_a10y/userdata.img $DST_DIR
    else
        echo  "starting to build your mtk-moba-project .! Waiting for done!"
        
        ./makeMtk moba16_a10y $1
    fi




    下面开始编译

    yuanwei@mt6516-desktop:~/Workspace/alps$ ./moba new
    starting to build your mtk-moba-project .! Waiting for done!
    
    **********checking Env************
    Your building environment is OK
    The detail information is in "checkenv.log"!
    *********************************
     "all" Dependency Checking...
    2011/08/01 10:10:45 custgening ...
                        LOG: out/target/product/moba16_a10y_custgen.log
                        ==> [OK]    2011/08/01 10:10:45
    2011/08/01 10:10:46 cleaning preloader...
                        LOG: out/target/product/moba16_a10y_preloader.log

    这2个脚本根据自己的情况修改,当然你要会点shell 语法吧。

    的确很方便的说。


  • 相关阅读:
    2021年年度总结——命运与轮回思考
    Kafka消费端数据过滤方案
    Vue.js知识点汇集
    The POM for is missing .....no dependency information available
    Knife4j 自定义参数解析
    Java List<String> IndexOf(object e)坑
    ES6获取对象数组属性最大最小值
    VM虚拟机(Windows server 2019)分区
    uniapp本地文件的路径
    JS墨卡托坐标与经纬度互转
  • 原文地址:https://www.cnblogs.com/yuzaipiaofei/p/4124448.html
Copyright © 2020-2023  润新知