• 编译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 语法吧。

    的确很方便的说。


  • 相关阅读:
    创建或者连接管道+++检查管道空间是否够写入本消息++++删除管道
    从instr中截取第一个delimiter之前的内容放到outstr中,返回第一个delimiter之后的位置
    把数字按网络顺序或主机顺序存放到字符串中++++把字符串按网络顺序转换成数字++++把字符串按主机顺序转换成数字
    压缩空格的函数以及BCD码与ASCII相互转换函数
    判断文件是否存在
    把指定长度字符串转换成数字
    找到特定串在源字符串中的位置
    FTP命令详解
    docker 学习路线
    云原生技术的了解
  • 原文地址:https://www.cnblogs.com/yuzaipiaofei/p/4124447.html
Copyright © 2020-2023  润新知