-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add default thin-edge.io firmware support (using dev thin-edge.…
…io version) (#10) * add thin-edge firmware workflow definition and script * add overlay persistence recipe * move tedge config persistence to thin-edge.io recipe * include firmware update recipe in all images * fixup! add overlay persistence recipe * fixup! add overlay persistence recipe * fix permissions on health check folders * add publish image task to build * refactor workflow to use justfile task * refactor build tasks to support profiles and variants * disable manual downloads by default in favor of streaming * improve c8y url detection * fix handling of stream downloads * configure priority given recipe dependency * add logging to thin-edge.io install script (to debug sporadic build issue)
- Loading branch information
1 parent
add4197
commit dccf8ac
Showing
30 changed files
with
641 additions
and
262 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
boot_flow = "u-boot" | ||
|
||
include_firmware = "none" |
This file was deleted.
Oops, something went wrong.
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 @@ | ||
boot_flow = "tryboot" | ||
|
||
# Include firmware as some older pi4 need a firmware update before tryboot will work | ||
include_firmware = "pi4" |
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,26 +1,4 @@ | ||
recipes = [ | ||
# "set-hostname", | ||
"persist-root-home", | ||
"ssh", | ||
"zsh", | ||
] | ||
boot_flow = "tryboot" | ||
|
||
# Make image generic so it can be used for pi4 and pi5 | ||
# So to either pi4 or pi5 if you want to build pi specific images which include the given firmware (EEPROM) | ||
include_firmware = "none" | ||
|
||
boot_flow = "tryboot" | ||
|
||
[parameters.set-hostname] | ||
hostname = "tedge-rugpi" | ||
|
||
[parameters.apt-cleanup] | ||
autoremove = true | ||
|
||
[parameters.ssh] | ||
root_authorized_keys = """ | ||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfhQGWWw73ponAokdNSRZ5cQc9/CIX1TLQgYlr+BtObKoO4UNFP1YSbgK03GjhjeUid+QPmV+UURqxQTqLQoYWqUFP2CYkILFccVPmTvx9HLwupI+6QQKWfMDx9Djfph9GzInymaA5fT7hKppqittFrC/l3lkKgKTX5ohEOGshIbRgtgOYIaW3ByTx3urnaBbYCIgOyOZzSIyS0dUkwsiLu3XjPspgmn3Fs/+vofT/yhBe1carW0UM3ivV0JFfJzrxbCl/F7I2qwfjZXsypjkwlpNupUMuo3xPMi8YvNvyEu4d+IEAqO1dCcdGcxlkiHxrdITIpVLt5mjJ2LauHE/H bootstrap | ||
""" | ||
|
||
[parameters.rugpi-ctrl] | ||
rugpi_admin = true # Enable Rugpi Admin. |
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 @@ | ||
overlay = "persist" |
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,2 @@ | ||
description = "Persist general overaly across reboots" | ||
default = false |
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,3 @@ | ||
#!/bin/sh | ||
set -eu | ||
install -D -m 644 "${RECIPE_DIR}/files/ctrl.toml" -t /etc/rugpi/ |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
#!/bin/sh | ||
# | ||
# Wait for network to be ready but don't block if still not available as the mender commit | ||
# might be used to restore network connectivity. | ||
# | ||
|
||
set -e | ||
|
||
OK=0 | ||
|
||
log() { | ||
echo "$*" >&2 | ||
} | ||
|
||
attempt=0 | ||
max_attempts=10 | ||
|
||
# Network ready: 0 = no, 1 = yes | ||
ready=0 | ||
log "Waiting for network to be ready, and time to be synced" | ||
|
||
while [ "$attempt" -lt "$max_attempts" ]; do | ||
TIME_IN_SYNC=$(timedatectl | awk '/System clock synchronized/{print $NF}') | ||
case "${TIME_IN_SYNC}" in | ||
yes) | ||
ready=1 | ||
break | ||
;; | ||
esac | ||
attempt=$((attempt + 1)) | ||
log "Network not ready yet (attempt: $attempt from $max_attempts)" | ||
sleep 30 | ||
done | ||
|
||
# Duration can only be based on uptime since the device's clock might not be synced yet, so 'date' will not be monotonic | ||
duration=$(awk '{print $1}' /proc/uptime) | ||
|
||
log "Network: ready=$ready (after ${duration}s)" | ||
if [ "$ready" = "1" ]; then | ||
log "Network is ready after ${duration}s (from startup)" | ||
else | ||
# Don't fail, as the downstream checks might still work | ||
log "WARNING: System time is still not in sync but continuing anyway" | ||
fi | ||
|
||
exit ${OK} |
File renamed without changes.
Oops, something went wrong.