拉取仓库
- 打开应用商店搜索Visual Studio Code,找到vscode 并安装,之后建议安装c++和cmake的插件
- mkdir Work
- chmod 777 Work/
- cd Work/
- sudo apt install git
{
如果报了这个错:
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
则执行:
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock
sudo apt install git
} - git clone https://gitlab.landmark-shcx.com:1080/lei.zhang/ap_incubator.git
- mv ap_incubator/ AP_Incubator
- cd AP_Incubator/4_Autosar_App/
- git clone https://gitlab.landmark-shcx.com:1080/bigdata-taskforce/bigdata_collection.git
- mv bigdata_collection BigDataCollect
- code ./
-
解开最后一行的注释,如下
1653643738(1).jpg
编译代码(也可参考AP的readme)
- sudo apt-get upgrade
- sudo apt-get update
- sudo apt install gcc
- sudo apt install g++
- sudo apt install make
- wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add -
- sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
- sudo apt-get update
- sudo apt install cmake
- cd /home/osboxes/Work/AP_Incubator/2_Build/script
- sudo apt-get install libssl-dev
(12到27步也可参考磊哥的攻略) - ./build.sh all
- sudo apt install python
- ./build.sh install
- cd /usr/local/lib
- sudo cp ~/Work/AP_Incubator/1_Prebuilt/boost/lib/* ./ -rf
- sudo cp ~/Work/AP_Incubator/1_Prebuilt/gtest/lib/* ./ -rf
- sudo cp ~/Work/AP_Incubator/1_Prebuilt/vector/AUTOSAR_MIDDLEWARE_SDK/lib/* ./ -rf
- cd ~/Work/AP_Incubator/1_Prebuilt/vector/AUTOSAR_MIDDLEWARE_SDK/opt
- cp ~/Work/AP_Incubator/1_Prebuilt/application/BigDataCollect ./ -rf
- cd BigDataCollect/bin
- sudo chmod 777 *
- 删除不需要的包
- amsr_vector_fs_passthroughmanager
- amsr_vector_fs_phm_healthmanager
-
修改someipd配置文件 someipd-posix.json
1653653303(1).jpg -
主要修改someip监听的ip地址相关信息:建议用本机loopback地址(ifconfig 查看)或是以太网网卡地址。
1653653360(1).jpg -
修改AA的执行配置文件 exec_config.json
1653653407(1).jpg - export LD_LIBRARY_PATH=/home/osboxes/Work/AP_Incubator/1_Prebuilt/vector/AUTOSAR_MIDDLEWARE_SDK/lib:$LD_LIBRARY_PATH
- sudo ldconfig
- cd ~/Work/AP_Incubator/1_Prebuilt/vector/AUTOSAR_MIDDLEWARE_SDK/
- sudo ./sbin/amsr_vector_fs_em_executionmanager -a ./opt -m ./etc/machine_exec_config.json -l ./etc/logging_config.json
网友评论