rk3288编译ota包总结

    rk3288打包otapackage过程:

  • 编译 kernel 和 Android,生成新的 boot.img、system.img 等。
  • 生成 ota 固件,在源码根目录执行下列命令:
./mkimage.sh ota
  • 获取ota升级包,继续执行:
make otapackage

    最终完整的升级包: out/target/product/rkxxx/rkxxx-ota-eng.root.zip

    其中 "rkxxx" 对应相应的自己的sdk,最终将包名更改为 update.zip 放入 TF 卡等存储介质的根目录中。

    可能会遇到的问题:

  1. 执行获取升级包命令时,出现以下情况:
    No RK Loader for TARGET_DEVICE rk3288 to otapackage
    package add resource.img to BOOT and RECOVERY
    No uboot for uboot/uboot.img to otapackage
    No trust for uboot/trust.img to otapackage
    No charge for uboot/charge.img to otapackage
    No parameter for TARGET_DEVICE rk3288 to otapackage
    Package target files: out/target/product/rk3288/obj/PACKAGING/target_files_intermediates/rk3288-target_files-eng.guochongxin.zip
    building image from target_files RECOVERY...
    Traceback (most recent call last):
    File "./build/tools/releasetools/make_recovery_patch", line 68, in
    main(sys.argv[1:])
    File "./build/tools/releasetools/make_recovery_patch", line 39, in main
    input_dir, "RECOVERY")
    File "/home/guochongxin/rk/rk3288_5.1/build/tools/releasetools/common.py", line 411, in GetBootableImage
    info_dict)
    File "/home/guochongxin/rk/rk3288_5.1/build/tools/releasetools/common.py", line 365, in BuildBootableImage
    p4 = Run(sign_cmd)
    File "/home/guochongxin/rk/rk3288_5.1/build/tools/releasetools/common.py", line 86, in Run
    return subprocess.Popen(args, kwargs)
    File "/usr/lib/python2.7/subprocess.py", line 679, in init
    errread, errwrite)
    File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
    OSError: [Errno 2] No such file or directory
    make: * [out/target/product/rk3288/obj/PACKAGING/target_files_intermediates/rk3288-target_files-eng.guochongxin.zip] Error 1

    可能是 drmsigntool 没有编译,执行下列命令:

    cd build/tools/drmtools
    mm -B

    再回到源码目录重新执行获取 ota 包命令,类似问题可以查看其他解决办法:这个? 这个?还是这个?

  2. 继续执行获取 ota 命令出现以下情况或者类似的:

    /bin/bash: javac command not found

    解决方法:先查看是否安装了jdk,然后查找到安装的位置,以下步骤:

    ###java -version
    java version "1.7.0_181"
    OpenJDK Runtime Environment (IcedTea 2.6.14) (7u181-2.6.14-0ubuntu0.1)
    OpenJDK 64-Bit Server VM (build 24.181-b01, mixed mode)
    ###
    ###which java
    /usr/bin/java
    ###
    ###ls -l /usr/bin/java
    /usr/bin/java -> /etc/alternatives/java
    ###
    ###ls -l /etc/alternatives/java
    /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
    ###
    

    最终确定在 /usr/lib/jvm 中,根据自己的实际情况。然后继续执行以下命令:

    ​​###sudo ln -s /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/javac /bin/javac

    将 javac 软链接至 /bin/javac。最好的解决方式是将 java 相关命令导入环境变量,避免出现其他类似的问题。

     打开 /etc/profile 文件,在末尾写入以下内容,"CLASSPATH = " 后面的 "." 不要忽略了:

    JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
    PATH=$JAVA_HOME/bin:$PATH
    CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
    export JAVA_HOME
    export PATH
    export CLASSPATH
    

     


欢迎讨论! 

你可能感兴趣的:(rockchip)