当前位置: 首页 > news >正文

Android车机DIY开发之软件篇(九) NXP AutomotiveOS编译

Android车机DIY开发之软件篇(十一) NXP AutomotiveOS编译

Google 在汽车上也提供了用于汽车的 Google 汽车服务(GAS,Google Automotive Service),包含有 Google 地图、应用市场、Google 汽车助理等等。Google 汽车服务同样没有开源,而是以软件包的形式提供给制造商。 目前国内汽车搭载的 Android 系统都是在标准的 Android Automotive OS 基础上对架构重新进行了定制及应用的本地化适配。

SystemUI 位置 /frameworks/base/packages/SystemUI

CarSystemUI 位置 packages/apps/Car/SystemUI

CarLuncher 位置packages/apps/Car/Launcher

CarServices 位置packages/services/Car/service

CarAPI 位置packages/Car/car-lib car-support-lib

编译镜像文件位置 device/generic/car/XXX.mk

Android Studio for Platform

1. 下载地址

nxp下载地址
解压automotive-14.0.0_2.1.0.tar.gz 到 ~/.

2.在HOME执行

sudo rm -rf /usr/bin/python
sudo ln -s /usr/bin/python2 /usr/bin/python
git config --global user.name “赵川”
git config --global user.email"zc1508890767@gmail.com"

sudo apt-get install libqt5x11extras5
sudo dpkg -i nekoray-3.26-2023-12-09-debian-x64.deb
设置代理
git config --global http.proxy http://127.0.0.1:2081
git config --global https.proxy https://127.0.0.1:2081

浏览器登录https://android.googlesource.com/new-password,并用gmail帐号登录;

按网页上指示运行

  谷歌镜像

mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
export PATH=${PATH}:~/bin
source ~/imx-automotive-14.0.0_2.1.0/imx_android_setup.sh

mkdir ~/bin 
curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo 
chmod a+x ~/bin/repo   
export PATH=${PATH}:~/bin 
export REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo/'
source ~/imx-automotive-12.0.0_1.1/imx_android_setup.sh
基于清华大学镜像服务器,修改 android_build/.repo/manifests/ 目录下 .xml 文件,如下所示:
fetch="https://android.googlesource.com/"改为fetch="https://aosp.tuna.tsinghua.edu.cn"review="https://android-review.googlesource.com/"/>  <defaultrevision="refs/tags/android-14.0.0.2.1.0"  上面这条命令会执行很长时间~~~~~~   下载A内核交叉编译工具链
[下载网页](https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads/12-3-rel1)
AArch32   arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi.tar.xz
AArch64   arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu.tar.xz
AArch32 :```bash
sudo tar -xvJf arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi.tar.xz -C /opt
export AARCH32_GCC_CROSS_COMPILE=/opt/arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-eabi/bin/arm-none-eabi-
```
AArch64:```bash
sudo tar -xvJf arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linuxgnu.tar.xz -C /opt
export AARCH64_GCC_CROSS_COMPILE=/opt/arm-gnu-toolchain-12.3.rel1-x86_64-
aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-
```
运行:
```bash
sudo git clone -b main-kernel-build-2024 --single-branch --depth 1 https://
android.googlesource.com/platform/prebuilts/clang/host/linux-x86 /opt/
prebuilt-android-clang
cd /opt/prebuilt-android-clang
sudo git fetch origin 3bd47139ac0e3593d4707ac0eeb2d45aa7411b67
sudo git checkout 3bd47139ac0e3593d4707ac0eeb2d45aa7411b67
export CLANG_PATH=/opt/prebuilt-android-clang
export LIBCLANG_PATH=/opt/prebuilt-android-clang/clang-r510928/lib
``````bash
sudo git clone -b main-kernel-build-2024 --single-branch --depth 1 https://
android.googlesource.com/kernel/prebuilts/build-tools /opt/prebuilt-androidkernel-build-tools
cd /opt/prebuilt-android-kernel-build-tools
sudo git fetch origin ae85d23af20f61220b114fc3f7bb6f77cc140365
sudo git checkout ae85d23af20f61220b114fc3f7bb6f77cc140365
export PATH=/opt/prebuilt-android-kernel-build-tools/linux-x86/bin:$PATH
```
/etc/profile下载Arm Cortex-M4内核交叉编译工具链
[下载网页](https://developer.arm.com/downloads/-/gnu-rm)```bash
sudo tar -jxvf gcc-arm-none-eabi-7-2018-q2-update-linux.tar.bz2 -C /opt
export ARMGCC_DIR=/opt/gcc-arm-none-eabi-7-2018-q2-update
``````bash
wget https://github.com/Kitware/CMake/releases/download/v3.13.2/
cmake-3.13.2.tar.gz
tar -xzvf cmake-3.13.2.tar.gz; cd cmake-3.13.2;
sudo ./bootstrap
sudo make
sudo make install
```## 3.编译source build/envsetup.sh
lunch1. aosp_arm-eng2. aosp_arm64-eng3. aosp_barbet-userdebug4. aosp_bluejay-userdebug5. aosp_bluejay_car-userdebug6. aosp_bramble-userdebug7. aosp_bramble_car-userdebug8. aosp_car_arm-userdebug9. aosp_car_arm64-userdebug10. aosp_car_x86-userdebug11. aosp_car_x86_64-userdebug12. aosp_cf_arm64_auto-userdebug13. aosp_cf_arm64_phone-userdebug14. aosp_cf_x86_64_foldable-userdebug15. aosp_cf_x86_64_pc-userdebug16. aosp_cf_x86_64_phone-userdebug17. aosp_cf_x86_64_tv-userdebug18. aosp_cf_x86_auto-userdebug19. aosp_cf_x86_phone-userdebug20. aosp_cf_x86_tv-userdebug21. aosp_cheetah-userdebug22. aosp_cloudripper-userdebug23. aosp_coral-userdebug24. aosp_coral_car-userdebug25. aosp_flame-userdebug26. aosp_flame_car-userdebug27. aosp_oriole-userdebug28. aosp_oriole_car-userdebug29. aosp_panther-userdebug30. aosp_raven-userdebug31. aosp_raven_car-userdebug32. aosp_ravenclaw-userdebug33. aosp_redfin-userdebug34. aosp_redfin_car-userdebug35. aosp_redfin_vf-userdebug36. aosp_slider-userdebug37. aosp_sunfish-userdebug38. aosp_sunfish_car-userdebug39. aosp_trout_arm64-userdebug40. aosp_trout_x86-userdebug41. aosp_whitefin-userdebug42. aosp_x86-eng43. aosp_x86_64-eng44. arm_krait-eng45. arm_v7_v8-eng46. armv8-eng47. armv8_cortex_a55-eng48. armv8_kryo385-eng49. beagle_x15-userdebug50. beagle_x15_auto-userdebug51. car_ui_portrait-userdebug52. car_x86_64-userdebug53. db845c-userdebug54. evk_6sl-user55. evk_6sl-userdebug56. evk_7ulp-user57. evk_7ulp-userdebug58. evk_7ulp_revb-user59. evk_7ulp_revb-userdebug60. evk_8mm-user61. evk_8mm-userdebug62. evk_8mn-user63. evk_8mn-userdebug64. evk_8mp-user65. evk_8mp-userdebug66. evk_8mq-user67. evk_8mq-userdebug68. evk_8ulp-user69. evk_8ulp-userdebug70. evk_93-user71. evk_93-userdebug72. gsi_car_arm64-userdebug73. gsi_car_x86_64-userdebug74. hikey-userdebug75. hikey64_only-userdebug76. hikey960-userdebug77. hikey960_tv-userdebug78. hikey_tv-userdebug79. mek_8q-user80. mek_8q-userdebug81. mek_8q_car-user82. mek_8q_car-userdebug83. mek_8q_car2-user84. mek_8q_car2-userdebug85. poplar-eng86. poplar-user87. poplar-userdebug88. qemu_trusty_arm64-userdebug89. rb5-userdebug90. sabreauto_6q-user91. sabreauto_6q-userdebug92. sabresd_6dq-user93. sabresd_6dq-userdebug94. sabresd_6dq_car-user95. sabresd_6dq_car-userdebug96. sabresd_6sx-user97. sabresd_6sx-userdebug98. sabresd_7d-user99. sabresd_7d-userdebug100. sdk_car_arm-userdebug101. sdk_car_arm64-userdebug102. sdk_car_portrait_x86_64-userdebug103. sdk_car_x86-userdebug104. sdk_car_x86_64-userdebug105. sdk_pc_x86_64-userdebug106. silvermont-eng107. uml-userdebug108. watch_8ulp-user109. watch_8ulp-userdebug110. yukawa-userdebug111. yukawa_sei510-userdebug./imx-make.sh -j4 2>&1 | tee build-log.txt编译选项                                                         
| mek_8q_car-trunk_staginguserdebug | i.MX 8QuadXPlus/8QuadMax MEK Board with the EVSfunction enabled on the Arm Cortex-M4 CPU   core|
|--|--|
| mek_8q_car2-trunk_staginguserdebug | i.MX 8QuadMax/8QuadXPlus MEK Board with the EVS function enabled on the Arm Cortex-A CPU cores (Power mode switch demo is running on the Cortex-M4 core in thisconfiguration) |
|--|--|
|  |   |
http://www.lryc.cn/news/532062.html

相关文章:

  • 嵌入式工程师必学(143):模拟信号链基础
  • 《LLM大语言模型深度探索与实践:构建智能应用的新范式,融合代理与数据库的高级整合》
  • e2studio开发RA2E1(5)----GPIO输入检测
  • Spring @Lazy:延迟初始化,为应用减负
  • 将OneDrive上的文件定期备份到移动硬盘
  • 从0开始,来看看怎么去linux排查Java程序故障
  • DeepSeek-V3:开源多模态大模型的突破与未来
  • Deep Sleep 96小时:一场没有硝烟的科技保卫战
  • Redis地理散列GeoHash
  • JAVA安全—反射机制攻击链类对象成员变量方法构造方法
  • 专业学习|一文了解并实操自适应大邻域搜索(讲解代码)
  • 9. k8s二进制集群之kube-controller-manager部署
  • 轮转数组-三次逆置
  • 3 卷积神经网络CNN
  • 穷举vs暴搜vs深搜vs回溯vs剪枝系列一>黄金矿工
  • java基础1(黑马)
  • ES6 对象扩展:对象简写,对象属性 表达式,扩展运算符 ...,Object.assign,Object.is,用法和应用场景
  • 2025 持续防范 GitHub 投毒,通过 Sharp4SuoExplorer 分析 Visual Studio 隐藏文件
  • PCB走线宽度与过流能力参考
  • 电商项目-分布式事务(四)基于消息队列实现分布式事务
  • g++ -> make -> cmake(草稿)
  • JSON常用的工具方法
  • 【Kubernetes Pod间通信-第2篇】使用BGP实现Pod到Pod的通信
  • [权限提升] Windows 提权 维持 — 系统错误配置提权 - Trusted Service Paths 提权
  • 8. k8s二进制集群之Kubectl部署
  • 初学 Xvisor 之理解并跑通 Demo
  • 深度内容运营与开源AI智能名片2+1链动模式S2B2C商城小程序在打造种草社区中的应用研究
  • RNN/LSTM/GRU 学习笔记
  • 音频录制一般在什么情况下会选择保存为PCM?什么情况会选择保存为WAV?
  • C#常用744单词