RP4418

    xiaoxiao2022-07-02  125

    概述:

    Cortex-A9 4核  S5P4418 处理器,运行主频可高达 1.4GHz,内部集成 Mali-400 MP 高性能图形引擎,支持 3D 图形流畅运行,并可播放 1080P 全高清视频、支持网卡、1080P HDMI 音视频同步输出等功能。支持 32 位内存总线,支持 1GB 内存,支持动态电源管理,支持 4GB、8GB、16GB、32GB INAND 存储。搭载  android5.1 系统。

     

    编译源码:

    搭建源码编译环境

    系统:Ubuntu desktop 16.04

    硬件:RP4418

    安装 OPENJDK

    交叉工具链:arm-eabi-4.6

    添加 android 镜像生成工具 mkimage

    设置环境变量:

    export JAVA_HOME=/usr/java/jdk1.7.0_79 export JRE_HOME=$JAVA_HOME/jre export CLASSPATH=$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH export PATH=$JAVA_HOME/bin:$PATH:$JRE_HOME/bin

    安装其它所需要的库

    sudo apt-get install git-core gnupg flex bison gperf

    sudo apt-get install build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev

    sudo apt-get install ia32-libs x11proto-core-dev libx11-dev

    sudo apt-get install lib32readline-gplv2-dev lib32z1-dev libgl1-mesa-dev gcc-multilib

    sudo apt-get install g++-multilib mingw32 tofrodos python-markdown libxml2-utils

    sudo apt-get install xsltproc sharutils

    sudo apt-get install realpath

    sudo apt-get install sharutils

    添加mkimage工具

    sudo cp mkimage /usr/bin

    sudo chmod 777 /usr/bin/mkimage

    编译错误:

    错误1:

    host C++: llvm-tblgen <= external/llvm/utils/TableGen/X86RecognizableInstr.cpp host StaticLib: libLLVMTableGen_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/libLLVMTableGen_intermediates/libLLVMTableGen.a) host StaticLib: libLLVMSupport_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/libLLVMSupport_intermediates/libLLVMSupport.a) host StaticLib: libbccRenderscript_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/libbccRenderscript_intermediates/libbccRenderscript.a) host StaticLib: libbccExecutionEngine_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/libbccExecutionEngine_intermediates/libbccExecutionEngine.a) host StaticLib: libbccCore_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/libbccCore_intermediates/libbccCore.a) host StaticLib: libbccSupport_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/libbccSupport_intermediates/libbccSupport.a) host StaticLib: librsloader_32 (out/host/linux-x86/obj32/STATIC_LIBRARIES/librsloader_intermediates/librsloader.a) host C++: dalvikvm_32 <= art/dalvikvm/dalvikvm.cc host SharedLib: libnativehelper_32 (out/host/linux-x86/obj32/lib/libnativehelper.so) prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JNIHelp.o: unsupported reloc 43 against global symbol std::string::_Rep::_S_empty_rep_storage prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JNIHelp.o: unsupported reloc 43 against global symbol std::string::_Rep::_S_empty_rep_storage prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6//x86_64-linux/bin/ld: error: out/host/linux-x86/obj32/SHARED_LIBRARIES/libnativehelper_intermediates/JNIHelp.o: unsupported reloc 43 against global symbol std::string::_Rep::_S_empty_rep_storage  

    查找资料看来是系统不兼容toolchain的原因,索性改成ubuntu desktop 14.04进行编译。

    重新开始编译

    ./make.sh modules

    错误2:

    Notice file: system/core/libutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib64/libutils.a.txt Notice file: system/core/libutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libutils.a.txt Notice file: system/core/libcutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib64/libcutils.a.txt Notice file: system/core/libcutils/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/libcutils.a.txt Notice file: system/core/liblog/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib64/liblog.a.txt Notice file: system/core/liblog/NOTICE -- out/host/linux-x86/obj/NOTICE_FILES/src//lib/liblog.a.txt Install: out/host/linux-x86/bin/validatekeymaps out/host/linux-x86/bin/acp: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory make: *** [out/host/linux-x86/bin/validatekeymaps] Error 127 root@ubuntu:/home/michael/Project/RP/lollipop_2nd_release#  回顾之前安装软件包的时候出现了一些安装不上的情况,所以重新解决安装包的问题。如下:

    apt-get install lib32z1 lib32ncurses5 apt-get install lib32stdc++6 

    错误3:

    target Java: ext (out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes) Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Copying: out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes-jarjar.jar Copying: out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/emma_out/lib/classes-jarjar.jar Copying: out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jar Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y prebuilts/misc/linux-x86/bison/bison -d  -o out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y prebuilts/misc/linux-x86/bison/bison: m4 subprocess failed make: *** [out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 1 root@ubuntu:/home/michael/Project/RP/lollipop_2nd_release#  修复:

    sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

    错误4:

    including ./vendor/nexell/apps/NxVideoPlayer/Android.mk ... including ./vendor/nexell/apps/SmartSync/Android.mk ... build/core/Makefile:36: warning: overriding commands for target `out/target/product/s5p4418_drone/system/bin/pppd' build/core/base_rules.mk:550: warning: ignoring old commands for target `out/target/product/s5p4418_drone/system/bin/pppd' build/core/Makefile:36: warning: overriding commands for target `out/target/product/s5p4418_drone/system/bin/chattr' build/core/base_rules.mk:550: warning: ignoring old commands for target `out/target/product/s5p4418_drone/system/bin/chattr' build/core/Makefile:36: warning: overriding commands for target `out/target/product/s5p4418_drone/system/xbin/su' build/core/base_rules.mk:550: warning: ignoring old commands for target `out/target/product/s5p4418_drone/system/xbin/su' No private recovery resources for TARGET_DEVICE s5p4418_drone Yacc: aidl <= frameworks/base/tools/aidl/aidl_language_y.y prebuilts/misc/linux-x86/bison/bison -d  -o out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp frameworks/base/tools/aidl/aidl_language_y.y prebuilts/misc/linux-x86/bison/bison: m4 subprocess failed make: *** [out/host/linux-x86/obj32/EXECUTABLES/aidl_intermediates/aidl_language_y.cpp] Error 1

    修复:

    sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386

    sudo apt-get install bison

    sudo apt-get install  g++-multilib gcc-multilib lib32ncurses5-dev lib32readline-gplv2-dev lib32z1-dev

    编译时卡住不动,随即增加VM虚拟机的内存增至4G,内核改为4,swap交换分区直接扩展至20G,继续编译。

    错误5:

    Gyp action: third_party_WebKit_Source_platform_platform_generated_gyp_make_platform_generated_target_RuntimeEnabledFeatures (out/target/product/s5p4418_drone/obj/GYP/shared_intermediates/blink/platform/RuntimeEnabledFeatures.cpp) Gyp action: third_party_WebKit_Source_platform_platform_generated_gyp_make_platform_generated_target_ColorData (out/target/product/s5p4418_drone/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp) /bin/bash: gperf: command not found Export includes file: external/chromium_org/GypAndroid.linux-arm.mk -- out/target/product/s5p4418_drone/obj/STATIC_LIBRARIES/third_party_WebKit_Source_platform_blink_arm_neon_gyp_intermediates/export_includes make: *** [out/target/product/s5p4418_drone/obj/GYP/shared_intermediates/blink/platform/ColorData.cpp] Error 127 make: *** Waiting for unfinished jobs.... out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src/android/animation/PropertyValuesHolder.java:10: warning: [unchecked] Possible heap pollution from parameterized vararg type V public static <V> android.animation.PropertyValuesHolder ofMultiInt(java.lang.String propertyName, android.animation.TypeConverter<V, int[]> converter, android.animation.TypeEvaluator<V> evaluator, V... values) { throw new RuntimeException("Stub!"); }                                                                                      ^   where V is a type-variable:     V extends Object declared in method <V>ofMultiInt(String,TypeConverter<V,int[]>,TypeEvaluator<V>,V...) out/target/common/obj/JAVA_LIBRARIES/android_system_stubs_current_intermediates/src/android/animation/PropertyValuesHolder.java:16: warning: [unchecked] Possible heap pollution from parameterized vararg type V public static <V> android.animation.PropertyValuesHolder ofMultiFloat(java.lang.String propertyName, android.animation.TypeConverter<V, float[]> converter, android.animation.TypeEvaluator<V> evaluator, V... values) { throw new RuntimeException("Stub!"); }  

    修复:

    apt-get install gperf

    错误6:

    Export includes file: external/tcpdump/Android.mk -- out/target/product/s5p4418_drone/obj/EXECUTABLES/tcpdump_intermediates/export_includes Copy: out/target/product/s5p4418_drone/system/usr/keylayout/keypad_s5p4418_drone.kl Copy: out/target/product/s5p4418_drone/system/usr/keychars/keypad_s5p4418_drone.kcm Copy: out/target/product/s5p4418_drone/system/usr/idc/ft5x06_ts.idc Copy: out/target/product/s5p4418_drone/system/usr/idc/gslX680.idc Copy xml: out/target/product/s5p4418_drone/system/etc/media_codecs_google_audio.xml Copy xml: out/target/product/s5p4418_drone/system/etc/tiny_hw.s5p4418_drone.xml Copy xml: out/target/product/s5p4418_drone/system/etc/media_codecs_google_video.xml /bin/bash: xmllint: command not found /bin/bash: xmllint: command not found make: *** [out/target/product/s5p4418_drone/system/etc/media_codecs_google_audio.xml] Error 127 make: *** Waiting for unfinished jobs.... make: *** [out/target/product/s5p4418_drone/system/etc/media_codecs_google_video.xml] Error 127 /bin/bash: xmllint: command not found make: *** [out/target/product/s5p4418_drone/system/etc/tiny_hw.s5p4418_drone.xml] Error 127 warning: string 'accessibility_service_no_apps_message' has no default translation. warning: string 'accessibility_service_no_apps_title' has no default translation. warning: string 'category_printers' has no default translation. warning: string 'cell_broadcast_settings_summary' has no default translation. warning: string 'credentials_install_gesture_prompt' has no default translation. warning: string 'crypt_keeper_cooldown' has no default translation. 修复:

     sudo apt-get install  libxml2-utils

     

    编译通过。

     

    Fastboot 烧写方式下的驱动安装

    WinImage 工具安装与使用

    WinImage工具是制作升级卡用的

     RP4418 SD 卡升级流程:

    ●制作 SD 卡;

    ●把升级文件拷到 SD 的升级目录里;

    ●开发板拨 SD 卡启动方式启动;

    ●插上 SD 卡启动;

    ●自动升级(升级完成后有提示);

    升级完成后会自动启动

    Fastboot 镜像烧写

    fastboot flash partmap 4418/partmap.txt

    fastboot flash 2ndboot 4418/2ndboot.bin

    fastboot flash bootloader 4418/u-boot.bin

    fastboot flash boot 4418/boot.img

    fastboot flash system 4418/system.img

    fastboot flash cache 4418/cache.img

    fastboot flash misc 4418/misc.img

    fastboot flash recovery 4418/recovery.img

    fastboot flash userdata 4418/userdata.img

     

     

     

    最新回复(0)