Skip to content

Commit

Permalink
Release v1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
hefroy committed Jun 12, 2023
1 parent 161530e commit d0c4fad
Show file tree
Hide file tree
Showing 122 changed files with 4,945 additions and 1,267 deletions.
9 changes: 6 additions & 3 deletions .github/template/fwe-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ inputs:
required: true
cache-paths:
required: true
dist-files:
required: true

runs:
using: "composite"
Expand Down Expand Up @@ -40,9 +42,9 @@ runs:
shell: bash
run: |
./tools/build-fwe-${{ inputs.build-arch }}.sh
./tools/build-dist.sh build/src/executionmanagement/aws-iot-fleetwise-edge
./tools/build-dist.sh ${{ inputs.dist-files }}
# If the output file changes, make sure to update the upload-asset job below
mv build/aws-iot-fleetwise-edge.tar.gz aws-iot-fleetwise-edge-${{ inputs.upload-arch }}.tar.gz
mv build/aws-iot-fleetwise-edge.tar.gz build/aws-iot-fleetwise-edge-${{ inputs.upload-arch }}.tar.gz
- name: unit-test
shell: bash
Expand All @@ -57,6 +59,7 @@ runs:
name: build-${{ inputs.upload-arch }}
path: |
build/src/executionmanagement/aws-iot-fleetwise-edge
build/aws-iot-fleetwise-edge-${{ inputs.upload-arch }}.tar.gz
build/Testing/Temporary/
build/**/report-*.xml
Expand All @@ -65,4 +68,4 @@ runs:
shell: bash
run: |
RELEASE_VERSION="${GITHUB_REF/refs\/tags\//}"
gh release upload ${RELEASE_VERSION} aws-iot-fleetwise-edge-${{ inputs.upload-arch }}.tar.gz
gh release upload ${RELEASE_VERSION} build/aws-iot-fleetwise-edge-${{ inputs.upload-arch }}.tar.gz
65 changes: 64 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- run: sudo apt-get install expect
- run: pip install pre-commit
- run: unbuffer pre-commit run --all-files

build-amd64:
runs-on: ubuntu-20.04
steps:
Expand All @@ -37,6 +38,7 @@ jobs:
build-arch: "native"
upload-arch: "amd64"
cache-paths: /usr/local/x86_64-linux-gnu
dist-files: build/src/executionmanagement/aws-iot-fleetwise-edge:.

build-arm64:
runs-on: ubuntu-20.04
Expand All @@ -47,6 +49,7 @@ jobs:
build-arch: "cross-arm64"
upload-arch: "arm64"
cache-paths: /usr/local/aarch64-linux-gnu:/usr/local/x86_64-linux-gnu
dist-files: build/src/executionmanagement/aws-iot-fleetwise-edge:.

build-armhf:
runs-on: ubuntu-20.04
Expand All @@ -57,6 +60,66 @@ jobs:
build-arch: "cross-armhf"
upload-arch: "armhf"
cache-paths: /usr/local/arm-linux-gnueabihf:/usr/local/x86_64-linux-gnu
dist-files: build/src/executionmanagement/aws-iot-fleetwise-edge:.

build-android:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: "./.github/template/fwe-build"
with:
build-arch: "cross-android"
upload-arch: "android"
cache-paths: /usr/local/aarch64-linux-android:/usr/local/armv7a-linux-androideabi:/usr/local/x86_64-linux-gnu
dist-files:
build/armeabi-v7a/src/executionmanagement/libaws-iot-fleetwise-edge.so:armeabi-v7a
build/arm64-v8a/src/executionmanagement/libaws-iot-fleetwise-edge.so:arm64-v8a
- name: build-app
run: |
mkdir -p tools/android-app/app/src/main/jniLibs
cp -r build/dist/arm64-v8a build/dist/armeabi-v7a tools/android-app/app/src/main/jniLibs
cp THIRD-PARTY-LICENSES tools/android-app/app/src/main/assets
if [ "${GITHUB_REPOSITORY}" == "aws/aws-iot-fleetwise-edge" ]; then
curl -o tools/android-app/app/src/main/res/mipmap-xhdpi/ic_launcher.webp \
https://fleetwise-app.automotive.iot.aws.dev/ic_launcher.webp
fi
cd tools/android-app
unset ANDROID_SDK_ROOT
ANDROID_HOME=/usr/local/android_sdk ./gradlew assembleRelease
- uses: aws-actions/configure-aws-credentials@v2
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.ref_type == 'tag'
with:
role-to-assume: ${{ secrets.ANDROID_SIGNING_ROLE }}
aws-region: us-east-1
- name: sign-app
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.ref_type == 'tag'
run: |
source tools/install-deps-versions.sh
SIGNING_INFO=`aws secretsmanager get-secret-value --region us-east-1 --secret-id AndroidAppKeyStore | jq -r .SecretString`
echo "${SIGNING_INFO}" | jq -r .KeyStore | base64 --decode > ~/android-signing.jks
KEYSTORE_PASSWORD=`echo "${SIGNING_INFO}" | jq -r .KeyStorePassword`
cd tools/android-app
/usr/local/android_sdk/build-tools/${VERSION_ANDROID_BUILD_TOOLS}/zipalign -v -p 4 \
app/build/outputs/apk/release/app-release-unsigned.apk \
app/build/outputs/apk/release/app-release-unsigned-aligned.apk
/usr/local/android_sdk/build-tools/${VERSION_ANDROID_BUILD_TOOLS}/apksigner sign \
--ks ~/android-signing.jks \
--ks-pass "pass:${KEYSTORE_PASSWORD}" \
--out app/build/outputs/apk/release/aws-iot-fleetwise-edge.apk \
app/build/outputs/apk/release/app-release-unsigned-aligned.apk
shred -u ~/android-signing.jks
- name: upload-artifacts
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.ref_type == 'tag'
uses: actions/upload-artifact@v3
with:
name: build-android-app
path: |
tools/android-app/app/build/outputs/apk/release/aws-iot-fleetwise-edge.apk
- name: upload-asset
if: github.repository == 'aws/aws-iot-fleetwise-edge' && github.ref_type == 'tag'
run: |
RELEASE_VERSION="${GITHUB_REF/refs\/tags\//}"
gh release upload ${RELEASE_VERSION} tools/android-app/app/build/outputs/apk/release/aws-iot-fleetwise-edge.apk
build-docker:
runs-on: ubuntu-20.04
Expand All @@ -76,7 +139,7 @@ jobs:
find linux -name aws-iot-fleetwise-edge -exec chmod +x {} \;
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- uses: aws-actions/configure-aws-credentials@v1-node16
- uses: aws-actions/configure-aws-credentials@v2
if: github.ref_type == 'tag'
with:
role-to-assume: ${{ secrets.PUBLIC_ECR_PUSH_ROLE }}
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Change Log

## v1.0.6 (2023-06-12)

Features:

- Add Android support, including shared library and demonstration app.

Improvements:

- Change from `arn` to `sync_id` for campaign_arn and document_arns, the `sync_id` being the ARN
followed by the timestamp of the last update. The change is backwards compatible with older
versions of the edge agent.
- Ubuntu package mirror from system used, rather than `ports.ubuntu.com`.
- Add root CA and inline credentials support to static config file.
- Add extra metrics for AWS SDK heap usage, used signal buffer, MQTT messages sent out.
- Add support for in-process ingestion of external GPS, CAN and OBD PID values when FWE is compiled
as a shared library.
- Fix compiler warnings for armhf build.
- Update Protobuf to v3.21.12, AWS C++ SDK to v1.11.94.

## v1.0.5 (2023-05-11)

Bugfixes:
Expand Down
18 changes: 13 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cmake_minimum_required(VERSION 3.10.2)

project(iotfleetwise VERSION 1.0.5)
project(iotfleetwise VERSION 1.0.6)

# AWS IoT FleetWise Edge uses C++14 for compatibility reasons with
# Automotive middlewares ( Adaptive AUTOSAR, ROS2)
Expand All @@ -21,15 +21,23 @@ option(FWE_CODE_COVERAGE "Enables code coverage" OFF)
option(FWE_VALGRIND "Enable valgrind tests" OFF)
option(FWE_BUILD_DOC "Build documentation" ON)
option(FWE_STRIP_SYMBOLS "Strips symbols from output binaries" OFF)
option(FWE_FEATURE_CAMERA "Enable Camera Data Collection feature" OFF)
option(FWE_TEST_CLANG_TIDY "Add clang-tidy test" ON)
option(FWE_TEST_FAKETIME "Enable tests that use the faketime library" OFF)
option(FWE_WERROR "Enable -Werror compiler flag" OFF)
option(FWE_SECURITY_COMPILE_FLAGS "Add security related compile options" OFF)
option(FWE_AWS_SDK_SHARED_LIBS "Use AWS SDK shared libs. Needs to be set to the same value of BUILD_SHARED_LIBS that the SDK was compiled with." OFF)
option(FWE_AWS_SDK_EXTRA_LIBS "Extra libs required to link with the AWS SDK. When FWE_STATIC_LINK is ON, setting this to ON will automatically find the standard libs. Can be a space-separated list of libs." ON)
option(FWE_EXAMPLE_IWAVEGPS "Include the IWave GPS example for a custom data source" OFF)
if(FWE_EXAMPLE_IWAVEGPS)
add_compile_options("-DFWE_EXAMPLE_IWAVEGPS")
option(FWE_FEATURE_CAMERA "Enable Camera Data Collection feature" OFF)
option(FWE_FEATURE_CUSTOM_DATA_SOURCE "Include the custom data source interface" OFF)
option(FWE_FEATURE_IWAVE_GPS "Include the IWave GPS example for a custom data source" OFF)
option(FWE_FEATURE_EXTERNAL_GPS "Include the external GPS example for a custom data source" OFF)
option(FWE_BUILD_EXECUTABLE "Build the FleetWise Edge executable" ON)
option(FWE_BUILD_ANDROID_SHARED_LIBRARY "Build the android shared library" OFF)
if(FWE_FEATURE_IWAVE_GPS)
add_compile_options("-DFWE_FEATURE_IWAVE_GPS")
endif()
if(FWE_FEATURE_EXTERNAL_GPS)
add_compile_options("-DFWE_FEATURE_EXTERNAL_GPS")
endif()

# Define the default build type
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Reference Implementation for AWS IoT FleetWise

> :information_source: To quickly get started, jump to the
> [Developer Guide](./docs/dev-guide/edge-agent-dev-guide.md) or the
> [Developer Guide](./docs/dev-guide/edge-agent-dev-guide.md), the
> [Android Guide](./tools/android-app/README.md), or the
> [Raspberry Pi Tutorial](./docs/rpi-tutorial/raspberry-pi-tutorial.md)
AWS IoT FleetWise is a service that makes it easy for Automotive OEMs, Fleet operators, Independent
Expand All @@ -10,7 +11,7 @@ Agent Reference Implementation for AWS IoT FleetWise (the “Reference Implement
libraries that can be run with simulated vehicle data on certain supported vehicle hardware or that
can help you develop an Edge Agent to run an application on your vehicle that integrates with AWS
IoT FleetWise. You can then use AWS IoT FleetWise's to process the collected data, gain insights
about the vehicle's health and use the services visual interface to help diagnose and troubleshoot
about the vehicle's health and use the service's visual interface to help diagnose and troubleshoot
potential issues with your vehicles. Furthermore, AWS IoT FleetWise's capability to collect ECU data
and store them on cloud databases enables you to utilize different AWS services (Analytics Services,
ML, etc.) to develop novel use-cases that augment your existing vehicle functionality. In
Expand Down Expand Up @@ -70,7 +71,7 @@ where they can deploy their Edge Agent binary. Possible options include (if pres
and
[Renesas R-Car S4](https://www.renesas.com/jp/en/products/automotive-products/automotive-system-chips-socs/rtp8a779f0askb0sp2s-r-car-s4-reference-boardspider)
2. Vehicle Head-Unit
3. Vehicles High Performance Computer
3. Vehicle's High Performance Computer
4. Telecommunication Control Unit

Edge Agent Reference Implementation for AWS IoT FleetWise was built and tested on 64-bit
Expand Down Expand Up @@ -109,13 +110,13 @@ See [SECURITY](./SECURITY.md) for more information
Edge Agent Reference Implementation for AWS IoT FleetWise depends on the following open source
libraries. Refer to the corresponding links for more information.

- [AWS SDK for C++: v1.11.46](https://github.com/aws/aws-sdk-cpp)
- [AWS SDK for C++: v1.11.94](https://github.com/aws/aws-sdk-cpp)
- [Curl: v7.58.0](https://github.com/curl/curl)
- [OpenSSL: v1.1.1](https://github.com/openssl/openssl)
- [zlib: v1.2.11](https://github.com/madler/zlib)
- [GoogleTest: v1.10.0](https://github.com/google/googletest)
- [Google Benchmark: v1.6.1](https://github.com/google/benchmark)
- [Protobuf: v3.21.7](https://github.com/protocolbuffers/protobuf)
- [Protobuf: v3.21.12](https://github.com/protocolbuffers/protobuf)
- [Boost: v1.71.1](https://github.com/boostorg/boost)
- [JsonCpp: v1.9.5](https://github.com/open-source-parsers/jsoncpp)
- [Snappy: v1.1.8](https://github.com/google/snappy)
Expand Down
4 changes: 2 additions & 2 deletions THIRD-PARTY-LICENSES
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AWS IoT FleetWise Edge includes the following third-party software/licensing:

** AWS SDK for C++: v1.11.46 - https://github.com/aws/aws-sdk-cpp
** AWS SDK for C++: v1.11.94 - https://github.com/aws/aws-sdk-cpp
** Fast-DDS: v2.3.3 - https://github.com/eProsima/Fast-DDS
** Fast-CDR: v1.0.21 - https://github.com/eProsima/Fast-CDR
** Foonathan Memory Vendor: v1.1.0 - https://github.com/eProsima/foonathan_memory_vendor
Expand Down Expand Up @@ -213,7 +213,7 @@ AWS IoT FleetWise Edge includes the following third-party software/licensing:
----------------

** GoogleTest: v1.10.0 - https://github.com/google/googletest
** Protobuf: v3.21.7 - https://github.com/protocolbuffers/protobuf
** Protobuf: v3.21.12 - https://github.com/protocolbuffers/protobuf

Copyright 2008, Google Inc.
All rights reserved.
Expand Down
7 changes: 6 additions & 1 deletion cmake/compiler_gcc.cmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -Werror will be eventually added when target toolchain is decided
add_compile_options(-Wconversion -Wall -Wextra -pedantic -ffunction-sections -fdata-sections)
link_libraries(
-Wl,--gc-sections # Remove all unreferenced sections
Expand All @@ -16,6 +15,12 @@ if(FWE_CODE_COVERAGE)
link_libraries("-lgcov" "--coverage")
endif()

# Only add -Werror when explicitly asked to avoid compilation errors when someone tries a compiler
# different from the ones we use on CI.
if(FWE_WERROR)
add_compile_options(-Werror)
endif()

# optimization -O3 is added by default by CMake when build type is RELEASE
add_compile_options(
$<$<CONFIG:DEBUG>:-O0> # Debug: Optimize for debugging
Expand Down
18 changes: 9 additions & 9 deletions docs/dev-guide/edge-agent-dev-guide-nxp-s32g.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,28 +65,28 @@ required by AWS IoT FleetWise Edge Agent, an updated version of the `canutils` p
## Flash the SD-Card Image

1. Download and install Balena Etcher _on your local machine_: https://www.balena.io/etcher/
1. Run Balena Etcher, choose Select image and select the compressed SD-card image
1. Run Balena Etcher, choose 'Select image' and select the compressed SD-card image
`fsl-image-ubuntu-s32g274ardb2.sdcard.gz`
1. Insert the SD-card supplied with the S32G-VNP-RDB2 into your local machines SD-card reader
1. Choose Select target and select the SD-card
1. Choose Flash!
1. Insert the SD-card supplied with the S32G-VNP-RDB2 into your local machine's SD-card reader
1. Choose 'Select target' and select the SD-card
1. Choose 'Flash!'
## Specify Initial Board Configuration
1. Insert the SD-card into the S32G-VNP-RDB2s SD-card slot.
1. Connect the S32G-VNP-RDB2s power supply.
1. Insert the SD-card into the S32G-VNP-RDB2's SD-card slot.
1. Connect the S32G-VNP-RDB2's power supply.
1. Connect an Ethernet cable from port P3A of the S32G-VNP-RDB2 to the internet router.
![](./images/s32g_golden_box.png)
1. Connect your local machine to the internet router, for example via WiFi or via Ethernet.
1. Connect to the S32G-VNP-RDB2 via SSH, entering password `bluebox`:
`ssh bluebox@ubuntu-s32g274ardb2`
1. If you cant connect using the hostname `ubuntu-s32g274ardb2`, you will need to connect to the
1. If you can't connect using the hostname `ubuntu-s32g274ardb2`, you will need to connect to the
administration webpage of the internet router to obtain the IP address assigned to the
S32G-VNP-RDB2. Use this IP address in place of `ubuntu-s32g274ardb2` used throughout this
guide.
1. Once connected via SSH, check the boards internet connection by running: `ping amazon.com`.
1. Once connected via SSH, check the board's internet connection by running: `ping amazon.com`.
There should be 0% packet loss.
## Provision AWS IoT Credentials
Expand Down Expand Up @@ -156,7 +156,7 @@ mkdir -p ~/aws-iot-fleetwise-deploy && cd ~/aws-iot-fleetwise-deploy \
## Collect OBD Data
1. Run the following _on the development machine_ to deploy a heartbeat campaign that periodically
1. Run the following _on the development machine_ to deploy a 'heartbeat' campaign that periodically
collects OBD data:
```bash
Expand Down
6 changes: 3 additions & 3 deletions docs/dev-guide/edge-agent-dev-guide-renesas-rcar-s4.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ on the Ubuntu variant of the Renesas Linux BSP version 5.10.41.

## Specify Initial Board Configuration

1. Insert the micro SD-card into the R-Car S4 Spider boards micro SD-card slot.
1. Insert the micro SD-card into the R-Car S4 Spider board's micro SD-card slot.
1. Connect an Ethernet cable.
1. Connect develop machine to R-Car S4 Spider board USB port.
Expand Down Expand Up @@ -95,7 +95,7 @@ on the Ubuntu variant of the Renesas Linux BSP version 5.10.41.
1. Connect to the R-Car S4 Spider board via SSH, entering password `rcar`:
`ssh rcar@<R-Car Ip address>`
1. Once connected via SSH, check the boards internet connection by running: `ping amazon.com`.
1. Once connected via SSH, check the board's internet connection by running: `ping amazon.com`.
There should be 0% packet loss.

## Provision AWS IoT Credentials
Expand Down Expand Up @@ -168,7 +168,7 @@ mkdir -p ~/aws-iot-fleetwise-deploy && cd ~/aws-iot-fleetwise-deploy \

## Collect OBD Data

1. Run the following _on the development machine_ to deploy a heartbeat campaign that periodically
1. Run the following _on the development machine_ to deploy a 'heartbeat' campaign that periodically
collects OBD data:

```bash
Expand Down
Loading

0 comments on commit d0c4fad

Please sign in to comment.