Skip to content

Commit a0bd1a0

Browse files
author
tro
authored
2025 09 30 master next improvements (#277)
1 parent 3847034 commit a0bd1a0

8 files changed

Lines changed: 32 additions & 4 deletions

File tree

meta-aws-demos/recipes-core/images/aws-iot-greengrass-lite-demo-image/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,6 @@ Manifests:
267267
echo Bootstrap
268268
BUCKET=rauc-adaptive-test
269269
UPDATEFILE=aws-iot-greengrass-lite-demo-bundle-raspberrypi-armv8.raucb
270-
271270
REGION=$(aws s3api get-bucket-location --bucket "$BUCKET" --query LocationConstraint --output text)
272271
echo $REGION
273272
BUNDLE_URL=$(aws s3 presign "s3://$BUCKET/$UPDATEFILE" --expires-in 3600 --endpoint-url "https://s3.$REGION.amazonaws.com")

meta-aws-demos/recipes-iot/aws-iot-greengrass/greengrass-config-init.bb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ SRC_URI = "\
77
file://greengrass-config-init.service \
88
file://greengrass-config-init.sh \
99
file://wlan.network \
10+
file://systemd-networkd-wait-online.service.d-override.conf \
1011
"
1112

1213
FILES:${PN} += "\
1314
${systemd_unitdir}/system/greengrass-config-init.service \
1415
${sysconfdir}/systemd/network/wlan.network \
16+
${systemd_unitdir}/system/systemd-networkd-wait-online.service.d/override.conf \
1517
"
1618

1719
RDEPENDS:${PN} += "\
@@ -39,5 +41,9 @@ do_install() {
3941
install -d -m 0755 ${D}${sysconfdir}/systemd/network
4042
install -m 0644 ${WORKDIR}/wlan.network ${D}${sysconfdir}/systemd/network/
4143

44+
# Install systemd override for networkd-wait-online
45+
install -d ${D}${systemd_unitdir}/system/systemd-networkd-wait-online.service.d/
46+
install -m 0644 ${WORKDIR}/systemd-networkd-wait-online.service.d-override.conf ${D}${systemd_unitdir}/system/systemd-networkd-wait-online.service.d/override.conf
47+
4248
install -d ${D}${sysconfdir}/wpa_supplicant
4349
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[Service]
2+
ExecStart=
3+
ExecStart=/lib/systemd/systemd-networkd-wait-online --any
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Unit]
2+
After=ggl.gg_fleetprovisioning.service
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[Unit]
2+
After=ggl.gg_fleetprovisioning.service

meta-aws-demos/recipes-iot/aws-iot-greengrass/greengrass-lite/ggl.gg_fleetprovisioning.service

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ Before=ggl.core.iotcored.service
55
After=systemd-time-wait-sync.service
66
# Only run if device is not already provisioned
77
ConditionPathExists=!/var/lib/greengrass/provisioned-cert/certificate.pem.crt
8-
StartLimitBurst=3
98

109
[Service]
1110
Type=oneshot
@@ -15,7 +14,8 @@ ExecStartPre=/bin/sh -c '\
1514
ExecStart=/usr/bin/fleet-provisioning
1615
Restart=on-failure
1716
RestartSec=10s
18-
TimeoutSec=300
17+
# try forever
18+
TimeoutSec=0
1919
# Consider exit codes 0, 1 as successful completion
2020
SuccessExitStatus=0 1
2121
User=root

meta-aws-demos/recipes-iot/aws-iot-greengrass/greengrass-lite/ggl.gg_pre-fleetprovisioning.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ConditionPathExists=!/var/lib/greengrass/provisioned-cert
1010
[Service]
1111
Type=oneshot
1212
ExecStart=/bin/sh -c '\
13-
default_iface=$(ip route | grep default | awk "{print \$5}" | head -n1); \
13+
default_iface=$(ip route | grep default | cut -d" " -f5 | head -n1); \
1414
mac_address=$(cat /sys/class/net/"$default_iface"/address | tr ":" "_"); \
1515
sed -i "s/<unique>/$mac_address/g" "/etc/greengrass/config.d/fleetprovisioning.yaml";'
1616
Restart=on-failure

meta-aws-demos/recipes-iot/aws-iot-greengrass/greengrass-lite_git.bb

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ SRC_URI = "\
4444
${@bb.utils.contains('PACKAGECONFIG','localdeployment','file://ggl-deploy-image-components','',d)} \
4545
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','file://ggl.gg_pre-fleetprovisioning.service','',d)} \
4646
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','file://ggl.gg_fleetprovisioning.service','',d)} \
47+
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','file://ggl.core.tesd.service.d-fleet-provisioning.conf','',d)} \
48+
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','file://ggl.aws.greengrass.TokenExchangeService.service.d-fleet-provisioning.conf','',d)} \
4749
"
4850

4951
SRCREV_ggl = "c116286afaee26736dbcf3ed0a7a897c3bb2f921"
@@ -89,6 +91,8 @@ FILES:${PN}:append = " \
8991
${@bb.utils.contains('PACKAGECONFIG','localdeployment','${bindir}/ggl-deploy-image-components','',d)} \
9092
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','${systemd_unitdir}/system/ggl.gg_fleetprovisioning.service','',d)} \
9193
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','${systemd_unitdir}/system/ggl.gg_pre-fleetprovisioning.service','',d)} \
94+
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','${systemd_unitdir}/system/ggl.core.tesd.service.d/fleet-provisioning.conf','',d)} \
95+
${@bb.utils.contains('PACKAGECONFIG','fleetprovisioning','${systemd_unitdir}/system/ggl.aws.greengrass.TokenExchangeService.service.d/fleet-provisioning.conf','',d)} \
9296
/usr/components/* \
9397
/usr/share/greengrass-image-components/* \
9498
${sysconfdir}/sudoers.d/${BPN} \
@@ -123,6 +127,10 @@ EXTRA_OECMAKE:append = " -DGGL_LOG_LEVEL=INFO"
123127
# No warnings should be in commited code, not enabled yet
124128
# CFLAGS:append = " -Werror"
125129

130+
# Disable -D_FORTIFY_SOURCE=2 as we set it to -D_FORTIFY_SOURCE=3
131+
TARGET_CFLAGS:remove = "-D_FORTIFY_SOURCE=2"
132+
OECMAKE_C_FLAGS:remove = "-D_FORTIFY_SOURCE=2"
133+
126134
SYSTEMD_SERVICE:${PN} = "\
127135
ggl.aws_iot_mqtt.socket \
128136
ggl.aws_iot_tes.socket \
@@ -191,6 +199,14 @@ do_install:append() {
191199
install -m 0644 ${WORKDIR}/ggl.gg_pre-fleetprovisioning.service ${D}${systemd_unitdir}/system/
192200
install -m 0644 ${WORKDIR}/ggl.gg_fleetprovisioning.service ${D}${systemd_unitdir}/system/
193201

202+
# Install systemd override for tesd service
203+
install -d ${D}${systemd_unitdir}/system/ggl.core.tesd.service.d/
204+
install -m 0644 ${WORKDIR}/ggl.core.tesd.service.d-fleet-provisioning.conf ${D}${systemd_unitdir}/system/ggl.core.tesd.service.d/fleet-provisioning.conf
205+
206+
# Install systemd override for TokenExchangeService
207+
install -d ${D}${systemd_unitdir}/system/ggl.aws.greengrass.TokenExchangeService.service.d/
208+
install -m 0644 ${WORKDIR}/ggl.aws.greengrass.TokenExchangeService.service.d-fleet-provisioning.conf ${D}${systemd_unitdir}/system/ggl.aws.greengrass.TokenExchangeService.service.d/fleet-provisioning.conf
209+
194210
# Replace variables in the config file using a temporary file to ensure proper expansion
195211
cat > ${D}/${sysconfdir}/greengrass/config.d/fleetprovisioning.yaml << EOF
196212
---

0 commit comments

Comments
 (0)