-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes to OpenJDK installation Fixes to IG60 firmware update script Add script to update EdgeIQ runtime Add script to update OpenJDK runtime components
- Loading branch information
1 parent
3fec5bf
commit 7d5b3c1
Showing
8 changed files
with
584 additions
and
139 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,16 @@ | ||
# Laird Connectivity IG60 EdgeIQ Support | ||
This folder contains various utilities for supporting the EdgeIQ Device Management service on the Laird Connectivity Sentrius™ IG60. | ||
|
||
## Software Update | ||
The script `ig60_update.sh` is used to perform a software update operation via the EdgeIQ cloud: | ||
## Firmware Update | ||
The script `ig60_update.sh` is used to perform a firmware update operation via the EdgeIQ cloud: | ||
|
||
1. In the "Software" page in the UI, create a Software Package and attach the update file (.SWU) and the script `ig60_update.sh`. | ||
2. Set the script to be `./ig60_update.sh UPDATE_FILE` where `UPDATE_FILE` is the name of the update .SWU file. | ||
1. In the "Software" page in the UI, create a Software Package and attach the update file (.SWU) and the script `ig60_update.sh` | ||
2. Set the script to be `./ig60_update.sh UPDATE_FILE` where `UPDATE_FILE` is the name of the update .SWU file | ||
3. Apply the update to one or more IG60 devices via the UI | ||
|
||
## Edge Update | ||
The script `update_edge.sh` is used to update the Edge agent to the latest version. | ||
|
||
1. In the "Software" page in the UI, create a Software Package and attach the script `update_edge.sh` | ||
2. Set the script to be `./update_edge.sh /gg /tmp` | ||
3. Apply the update to one or more IG60 devices via the UI |
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,72 @@ | ||
#!/bin/bash | ||
# Copyright 2022 Laird Connectivity | ||
# | ||
# IG60 helper script for updating the OpenJDK dependency components to support | ||
# GGv2 which are stored on the SD card | ||
# | ||
# Usage: ig60_ggv2_update_openjdk_components.sh path/to/openjdk.tar.gz | ||
# | ||
|
||
# Make verbose log, fail on uncaught errors | ||
set -xe | ||
|
||
OPENJDK_TARBALL_FILE=$1 | ||
|
||
programname=$(basename $0) | ||
|
||
# | ||
# Helper function to print out the script usage | ||
# | ||
show_usage() { | ||
echo -e "Usage: $programname path/to/openjdk.tar.gz\n" | ||
} | ||
|
||
# | ||
# Helper function to print an error message and exit with a failure code | ||
# | ||
cleanup_and_fail(){ | ||
echo $1 | ||
rm -f ${OPENJDK_TARBALL_FILE} | ||
exit 1 | ||
} | ||
|
||
if [ $# -ne 1 ]; then | ||
show_usage | ||
cleanup_and_fail "Invalid arguments" | ||
exit 1 | ||
fi | ||
|
||
SDCARD_ROOT="/var/media/mmcblk0p1" | ||
|
||
# Link in the FS key | ||
keyctl link @us @s | ||
|
||
# Stop GGv2 | ||
echo "Stopping Greengrass V2" | ||
systemctl stop ggv2runner | ||
|
||
# Since the 'ggv2sdmount' service is configured as 'PartOf' the main | ||
# 'ggv2runner' service, it must be "manually" started here in order to properly | ||
# re-mount the SD card. | ||
echo "Re-mounting SD card" | ||
systemctl start ggv2sdmount | ||
|
||
# Verify the SD card root exists | ||
if [ ! -d "${SDCARD_ROOT}" ]; then cleanup_and_fail "SD card not found"; fi | ||
|
||
# Delete existing OpenJDK files | ||
rm -rf $SDCARD_ROOT/jdk | ||
|
||
# Extract the tarball | ||
echo "Extracting the OpenJDK dependency components tarball" | ||
tar xzf ${OPENJDK_TARBALL_FILE} -C ${SDCARD_ROOT} --no-same-owner | ||
if [ ! $? -eq 0 ]; then cleanup_and_fail "Unable to extract OpenJDK dependency components tarball"; fi | ||
|
||
# Delete the OpenJDK dependency components tarball | ||
rm -f ${OPENJDK_TARBALL_FILE} | ||
|
||
# Restart GGv2 | ||
echo "Restarting Greengrass V2" | ||
systemctl start ggv2runner | ||
|
||
exit 0 |
Oops, something went wrong.