Skip to content

Commit

Permalink
Fix tedge install on default targets (#13)
Browse files Browse the repository at this point in the history
* fix: use default install script when not building for armv6

* build pi 2,3,4,5 images by default
  • Loading branch information
reubenmiller authored Dec 3, 2023
1 parent 2c8d61f commit 5d10f52
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ publish:
cd {{justfile_directory()}} && ./scripts/upload-c8y.sh

build-all-variants: extract customize
# just VARIANT=pi023 bake
just VARIANT=pi023 bake
# just VARIANT=pi4 bake
just VARIANT=pi45 bake
17 changes: 14 additions & 3 deletions recipes/thin-edge.io/steps/00-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,21 @@ echo "uname -a: $(uname -a)" | tee -a "${RECIPE_DIR}/build.log"
echo "uname -m: $(uname -m)" | tee -a "${RECIPE_DIR}/build.log"
echo

curl -1sLf 'https://dl.cloudsmith.io/public/thinedge/community/gpg.2E65716592E5C6D4.key' | gpg --no-default-keyring --dearmor > /usr/share/keyrings/thinedge-community-archive-keyring.gpg

# install thin-edge.io
"${RECIPE_DIR}/files/thin-edge.io.sh" --channel main --arch armv6 2>&1 | tee -a "${RECIPE_DIR}/build.log"
arch=$(uname -m)
case "$arch" in
*arm7*)
# Due to differences between the build process and the target device, the arch
# used for installation needs to be forced to armv6.
echo "Using armv6 workaround" | tee -a "${RECIPE_DIR}/build.log"
curl -1sLf 'https://dl.cloudsmith.io/public/thinedge/community/gpg.2E65716592E5C6D4.key' | gpg --no-default-keyring --dearmor > /usr/share/keyrings/thinedge-community-archive-keyring.gpg
"${RECIPE_DIR}/files/thin-edge.io.sh" --channel main --arch armv6 2>&1 | tee -a "${RECIPE_DIR}/build.log"
;;
*)
wget -O - thin-edge.io/install.sh | sh -s -- --channel main | tee -a "${RECIPE_DIR}/build.log"
;;
esac


# Install collectd
apt-get install -y -o DPkg::Options::=--force-confnew --no-install-recommends \
Expand Down

0 comments on commit 5d10f52

Please sign in to comment.