-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add static linked deb package for NVIDIA Jetson (Ubuntu 22.04) arm64
As the “NVIDIA JETPACK” is based on Ubuntu 22.04. the approach is to use the packages that are available (without adding some backport package soures list) and just compile the packages from source that are missing statically. Use that static libs to link gg-lite static, but also link against shared libs that are available in the correct version. To do this I did create a container especially for this use case. Also some CMakeLists improvements needs to be done to enable that static linking for just those libs that are not available with Ubuntu 22.04.
- Loading branch information
1 parent
c14fc18
commit 8fea9e7
Showing
9 changed files
with
302 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
name: Build static deb arm64 packages and put them in zip files | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
architecture: [aarch64-linux-gnu] | ||
build_type: [RelWithDebInfo, MinSizeRel] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Cache Podman image | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/podman-image.tar | ||
key: | ||
${{ runner.os }}-${{ matrix.architecture }}-podman-${{ | ||
hashFiles('misc/staticbuildtestcontainer/*') }} | ||
|
||
- name: Build and save container for aarch64-linux-gnu | ||
if: matrix.architecture == 'aarch64-linux-gnu' | ||
run: | | ||
if [ ! -f ~/podman-image.tar ]; then | ||
podman build --from=docker.io/arm64v8/ubuntu:22.04 --arch=arm64 misc/staticbuildtestcontainer -t container | ||
podman save container:latest > ~/podman-image.tar | ||
else | ||
podman load < ~/podman-image.tar | ||
fi | ||
- name: Run build in container | ||
shell: bash | ||
run: | | ||
podman run -v $PWD/.:/aws-greengrass-lite --replace --name ggl container:latest bash -c "\ | ||
cd /aws-greengrass-lite && \ | ||
rm -rf build/ && \ | ||
cmake -B build \ | ||
-DGGL_LOG_LEVEL=DEBUG \ | ||
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \ | ||
-DCMAKE_FIND_DEBUG_MODE=ON \ | ||
-DGGL_SYSTEMD_SYSTEM_USER=ggcore \ | ||
-DGGL_SYSTEMD_SYSTEM_GROUP=ggcore \ | ||
-DGGL_SYSTEMD_SYSTEM_DIR=/lib/systemd/system \ | ||
-DCMAKE_INSTALL_PREFIX=/usr && \ | ||
make -C build -j$(nproc) && \ | ||
cd build && cpack -v -G DEB && cd - \ | ||
" | ||
- name: Save package | ||
run: | | ||
mkdir ${{ github.workspace }}/zipfile/ | ||
cp ${{ github.workspace }}/build/*.deb ${{ github.workspace }}/zipfile/ | ||
- name: Generate readme / install file | ||
run: | | ||
cat ${{ github.workspace }}/.github/workflows/static-packaging/readme.template.txt >> ${{ github.workspace }}/zipfile/readme.txt | ||
cp ${{ github.workspace }}/.github/workflows/packaging/install-greengrass-lite.sh ${{ github.workspace }}/zipfile/ | ||
sed -i 's|{{ VERSION_LINK }}|${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}|g' ${{ github.workspace }}/zipfile/readme.txt | ||
sed -i 's|{{ UBUNTU_VERSION }}|22.04|g' ${{ github.workspace }}/zipfile/install-greengrass-lite.sh | ||
cat ${{ github.workspace }}/LICENSE >> ${{ github.workspace }}/zipfile/readme.txt | ||
- name: md5sums | ||
run: | | ||
md5sum ${{ github.workspace }}/zipfile/* | ||
- name: Save package | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: | ||
aws-greengrass-lite-ubuntu-${{ matrix.architecture || 'x86-64'}}_${{ | ||
matrix.build_type }}-static | ||
path: | | ||
${{ github.workspace }}/zipfile/* | ||
retention-days: 1 | ||
- name: | ||
Save arm64 package without build type - default package to download | ||
if: | ||
matrix.build_type == 'MinSizeRel' && matrix.architecture == | ||
'aarch64-linux-gnu' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: aws-greengrass-lite-ubuntu-arm64-static | ||
path: | | ||
${{ github.workspace }}/zipfile/* | ||
retention-days: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
############################################################################### | ||
# AWS Greengrass Lite | ||
############################################################################### | ||
|
||
AWS IoT Greengrass runtime for constrained devices. | ||
|
||
The Greengrass Lite nucleus provides a smaller alternative to the java nucleus | ||
for Greengrass v2 deployments. | ||
|
||
Greengrass Lite aims to maintain compatibility with the Classic nucleus, and | ||
implements a subset of its functionality. | ||
|
||
There is a arm64 and x86-64 version available of this zip file. For the latest | ||
version, as well as other install options check here: | ||
https://github.com/aws-greengrass/aws-greengrass-lite/releases | ||
|
||
This deb package only works with NVIDIA JetPack SDK 6.0 (based on Ubuntu 22.04.), | ||
because of library version package constraints! | ||
|
||
This package has been built from this source revision: | ||
{{ VERSION_LINK }} | ||
|
||
############################################################################### | ||
# INSTALLATION | ||
############################################################################### | ||
|
||
copy *.deb package and the install-greengrass-lite.sh from this zip onto your | ||
device | ||
|
||
copy ConnectionKit zip onto your device (e.g. scp, usb stick) | ||
|
||
The three files should be in the same folder on the device. | ||
|
||
On the device run installation script, this will automatically detect a *.deb | ||
and *.zip for installation in the same dir: | ||
|
||
sudo ./install-greengrass-lite.sh | ||
|
||
############################################################################### | ||
# UNINSTALLATION | ||
############################################################################### | ||
|
||
Add a parameter "-u" to the script. Be careful this will delete /etc/greengrass | ||
and /var/lib/greengrass! | ||
|
||
sudo ./install-greengrass-lite.sh -u | ||
|
||
############################################################################### | ||
# UPGRADE | ||
############################################################################### | ||
|
||
When a new version of greengrass lite is available and you want to keep your | ||
configuration and components. Install just the deb package from the zip, without | ||
using the (initial-) installation script. | ||
|
||
sudo apt install ./aws-greengrass-lite-x.x.x-Linux.deb | ||
|
||
############################################################################### | ||
# LICENSE | ||
############################################################################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.