-
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.
cmake-multiplatform: fix for others than x86-64
- Loading branch information
1 parent
e1e4c10
commit 76ba070
Showing
8 changed files
with
275 additions
and
45 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
16 changes: 16 additions & 0 deletions
16
.github/workflows/cmake-multi-platform/install-greengrass-lite.sh
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,16 @@ | ||
#!/bin/bash | ||
|
||
WIP | ||
|
||
|
||
install -d ${D}/${gg_rundir} | ||
chown ${gg_user}:${gg_group} ${D}/${gg_rundir} | ||
|
||
install -d ${D}/${sysconfdir}/greengrass | ||
install -d ${D}/${sysconfdir}/greengrass/config.d | ||
|
||
install -m 0644 ${WORKDIR}/greengrass-lite.yaml ${D}/${sysconfdir}/greengrass/config.d | ||
sed -i -e 's,@GG_WORKING_DIR@,${gg_workingdir},g' \ | ||
-e 's,@GG_USER@,${gg_user},g' \ | ||
-e 's,@GG_GROUP@,${gg_group},g' \ | ||
${D}/${sysconfdir}/greengrass/config.d/greengrass-lite.yaml |
58 changes: 58 additions & 0 deletions
58
.github/workflows/cmake-multi-platform/readme.template.txt
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,58 @@ | ||
This readme file will be generated by the build process, done now for the bug bash manually. | ||
|
||
################## | ||
|
||
SOME GENERAL INFO about gg-lite | ||
|
||
|
||
################## | ||
|
||
INSTALLATION: | ||
################## | ||
|
||
copy *.deb package from zip onto your device (e.g. scp) | ||
|
||
copy ConnectionKit zip onto your device (e.g. scp) | ||
|
||
sudo apt update | ||
|
||
sudo apt install aws-greengrass-lite-0.1.1-Linux.deb | ||
|
||
sudo apt install zip | ||
|
||
sudo mkdir /etc/greengrass/ | ||
|
||
sudo unzip -jo connectionKit.zip -d /etc/greengrass/ | ||
|
||
sudo sed -i -e s:{{config_dir}}:\/etc\/greengrass:g -e s:{{data_dir}}:\/var\/lib\/aws-greengrass-v2:g -e s:{{nucleus_component}}:aws.greengrass.Nucleus-Lite:g /etc/greengrass/config.yaml | ||
|
||
add greengrass lite config fragment to /etc/greengrass/config.d/greengrass-lite.yaml | ||
|
||
replace @GG_WORKING_DIR@ with the directory you want to run it - can be the Desktop for testing: e.g. /home/ubuntu/Desktop | ||
replace @GG_USER@ and @GG_GROUP@ with user and group you want to run it - e.g. ubuntu or the user you created. | ||
|
||
--- | ||
system: | ||
rootPath: "@GG_WORKING_DIR@" | ||
services: | ||
aws.greengrass.Nucleus-Lite: | ||
componentType: "NUCLEUS" | ||
configuration: | ||
runWithDefault: | ||
posixUser: "@GG_USER@:@GG_GROUP@" | ||
greengrassDataPlanePort: "8443" | ||
tesCredUrl: "http://127.0.0.1:8080/" | ||
|
||
|
||
run_nucleus | ||
|
||
################## | ||
|
||
|
||
SOME ADDITIONAL INFO | ||
|
||
|
||
################## | ||
|
||
|
||
SOME LICENSE TEXT HERE |
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,46 @@ | ||
FROM ubuntu:24.04 | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y install --no-install-recommends \ | ||
systemd systemd-sysv dbus ca-certificates sudo nano bash-completion \ | ||
build-essential pkg-config cmake git curl file gdb \ | ||
libssl-dev libcurl4-openssl-dev libsqlite3-dev libyaml-dev \ | ||
libsystemd-dev liburiparser-dev uuid-dev libevent-dev libzip-dev \ | ||
&& apt-get clean | ||
|
||
COPY ./aarch64.cmake \ | ||
/aarch64.cmake | ||
|
||
RUN apt-get remove -y libcurl4-openssl-dev \ | ||
cmake | ||
|
||
RUN apt-get install --no-install-recommends -y dpkg-dev | ||
|
||
RUN sudo rm -rf /etc/apt/sources.list.d/* | ||
|
||
COPY ./cross-packages.list \ | ||
/etc/apt/sources.list.d/cross-packages.list | ||
|
||
RUN sudo dpkg --add-architecture arm64 && \ | ||
sudo apt clean && sudo apt update && \ | ||
sudo apt-get -y install \ | ||
binutils-aarch64-linux-gnu \ | ||
g++-aarch64-linux-gnu \ | ||
gcc-aarch64-linux-gnu \ | ||
libzip-dev:arm64 \ | ||
libcurl4-openssl-dev:arm64 \ | ||
libevent-dev:arm64 \ | ||
libssl-dev:arm64 \ | ||
libsqlite3-dev:arm64 \ | ||
libsystemd-dev:arm64 \ | ||
liburiparser-dev:arm64 \ | ||
libyaml-dev:arm64 \ | ||
uuid-dev:arm64 \ | ||
cmake | ||
|
||
RUN sudo apt-get -y install --no-install-recommends \ | ||
qemu-user-static | ||
|
||
|
||
ENV PKG_CONFIG_PATH=/usr/lib/aarch64-linux-gnu/pkgconfig |
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,20 @@ | ||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(CMAKE_SYSTEM_PROCESSOR aarch64) | ||
set(CMAKE_SYSTEM_VERSION 1) | ||
set(CMAKE_C_COMPILER_TARGET aarch64-linux-gnu) | ||
set(CMAKE_CXX_COMPILER_TARGET aarch64-linux-gnu) | ||
set(CMAKE_CROSSCOMPILING TRUE) | ||
set(CMAKE_CROSSCOMPILING_EMULATOR qemu-aarch64-static -L /usr/aarch64-linux-gnu/) | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
find_program(C_COMPILER_FULL_PATH NAMES aarch64-linux-gnu-gcc) | ||
if(NOT C_COMPILER_FULL_PATH) | ||
message(FATAL_ERROR "Cross-compiler for ${CMAKE_C_COMPILER_TARGET} not found") | ||
endif() | ||
set(CMAKE_C_COMPILER ${C_COMPILER_FULL_PATH}) | ||
find_program(CXX_COMPILER_FULL_PATH NAMES aarch64-linux-gnu-g++) | ||
if(NOT CXX_COMPILER_FULL_PATH) | ||
message(FATAL_ERROR "C++ Cross-compiler for ${CMAKE_C_COMPILER_TARGET} not found") | ||
endif() | ||
set(CMAKE_CXX_COMPILER ${CXX_COMPILER_FULL_PATH}) |
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,4 @@ | ||
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ noble main restricted universe multiverse | ||
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ noble-updates main restricted universe multiverse | ||
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ noble-backports main restricted universe multiverse | ||
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ noble-security main restricted universe multiverse |
Oops, something went wrong.