This repository has been archived by the owner on Feb 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6209dab
commit 7b237fa
Showing
14 changed files
with
220 additions
and
22 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
30 changes: 30 additions & 0 deletions
30
...rage-file-upload-utility/azure-blob-storage-sdk/azure-blob-storage-file-upload-utility.bb
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,30 @@ | ||
# Build and install the azure-blob-storage-file-upload-utility | ||
|
||
DESCRIPTION = "Microsoft Azure Blob Storage File Upload Utility" | ||
AUTHOR = "Microsoft Corporation" | ||
HOMEPAGE = "https://github.com/Azure/azure-blob-storage-file-upload-utility" | ||
LICENSE = "MIT" | ||
LIC_FILES_CHKSUM = "file://LICENSE;md5=d4a904ca135bb7bc912156fee12726f0" | ||
|
||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
|
||
SRC_URI = "gitsm://github.com/Azure/azure-blob-storage-file-upload-utility.git;branch=main" | ||
|
||
SRCREV = "${AUTOREV}" | ||
PV = "1.0+git${SRCPV}" | ||
|
||
S = "${WORKDIR}/git" | ||
|
||
# util-linux for uuid-dev | ||
# libxml2 for libxml2-dev | ||
DEPENDS = "util-linux azure-iot-sdk-c azure-sdk-for-cpp curl openssl libxml2" | ||
|
||
inherit cmake | ||
|
||
sysroot_stage_all_append () { | ||
sysroot_stage_dir ${D}${exec_prefix}/cmake ${SYSROOT_DESTDIR}${exec_prefix}/cmake | ||
} | ||
|
||
FILES_${PN}-dev += "${exec_prefix}/cmake" | ||
|
||
BBCLASSEXTEND = "native nativesdk" |
15 changes: 8 additions & 7 deletions
15
recipes-azure-device-update/adu-agent-service/files/adu-agent.service
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
9 changes: 9 additions & 0 deletions
9
recipes-azure-device-update/adu-register-extensions/files/register-adu-extensions.service
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,9 @@ | ||
[Unit] | ||
Description=Register Device Update extensions upon first boot | ||
|
||
[Service] | ||
Type=simple | ||
ExecStart=/bin/sh -c 'sleep 5 ; /usr/sbin/register-adu-extensions.sh' | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
34 changes: 34 additions & 0 deletions
34
recipes-azure-device-update/adu-register-extensions/files/register-adu-extensions.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,34 @@ | ||
#!/bin/sh | ||
|
||
AGENT="AducIotAgent" | ||
STATFILE="/adu/default-extensions-registered" | ||
|
||
logger "Start initializing Device Update extensions" | ||
|
||
# Register a default update manifest handler. | ||
/usr/bin/${AGENT} --update-type "microsoft/update-manifest" -C /var/lib/adu/extensions/sources/libmicrosoft_steps_1.so | ||
|
||
# Register an update manifest v4 handler. | ||
/usr/bin/${AGENT} --update-type "microsoft/update-manifest:4" -C /var/lib/adu/extensions/sources/libmicrosoft_steps_1.so | ||
|
||
# Register swupdate content handler. | ||
logger "Register an update content handler for 'microsoft/swupdate:1" | ||
|
||
/usr/bin/${AGENT} --update-type "microsoft/script:1" -C /var/lib/adu/extensions/sources/libmicrosoft_script_1.so | ||
/usr/bin/${AGENT} --update-type "microsoft/steps:1" -C /var/lib/adu/extensions/sources/libmicrosoft_steps_1.so | ||
/usr/bin/${AGENT} --update-type "microsoft/swupdate:1" -C /var/lib/adu/extensions/sources/libmicrosoft_swupdate_1.so | ||
/usr/bin/${AGENT} --update-type "microsoft/update-manifest" -C /var/lib/adu/extensions/sources/libmicrosoft_steps_1.so | ||
/usr/bin/${AGENT} --update-type "microsoft/update-manifest:4" -C /var/lib/adu/extensions/sources/libmicrosoft_steps_1.so | ||
|
||
# Register a script handler. | ||
/usr/bin/${AGENT} --update-type "microsoft/script:1" -C /var/lib/adu/extensions/sources/libmicrosoft_script_1.so | ||
|
||
# Register Delivery Optimization content downloader extension. | ||
logger "Register a content downloader (Delivery Optimization agent)" | ||
/usr/bin/${AGENT} -D /var/lib/adu/extensions/sources/libdeliveryoptimization-content-downloader.so | ||
|
||
logger "Device Update extensions registration completed" | ||
|
||
# Job done, remove it from systemd services | ||
systemctl disable register-adu-extensions.service | ||
|
29 changes: 29 additions & 0 deletions
29
recipes-azure-device-update/adu-register-extensions/register-adu-extensions.bb
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,29 @@ | ||
SUMMARY = "Register Device Update extensions upon first boot" | ||
DESCRIPTION = "Perform first boot initialization, started as a systemd service which removes itself once finished" | ||
LICENSE = "CLOSED" | ||
|
||
SRC_URI = " \ | ||
file://register-adu-extensions.sh \ | ||
file://register-adu-extensions.service \ | ||
" | ||
|
||
do_compile () { | ||
} | ||
|
||
do_install () { | ||
install -d ${D}/${sbindir} | ||
install -m 0755 ${WORKDIR}/register-adu-extensions.sh ${D}/${sbindir} | ||
|
||
install -d ${D}${systemd_unitdir}/system/ | ||
install -m 0644 ${WORKDIR}/register-adu-extensions.service ${D}${systemd_unitdir}/system | ||
} | ||
|
||
DEPENDS_${PN} += "azure-device-update" | ||
|
||
RDEPENDS_${PN} += "azure-device-update" | ||
|
||
NATIVE_SYSTEMD_SUPPORT = "1" | ||
SYSTEMD_PACKAGES = "${PN}" | ||
SYSTEMD_SERVICE_${PN} = "register-adu-extensions.service" | ||
|
||
inherit allarch systemd |
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
42 changes: 42 additions & 0 deletions
42
recipes-azure-sdk-for-cpp/azure-sdk-for-cpp/azure-sdk-for-cpp_git.bb
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,42 @@ | ||
# Build and install the azure-blob-storage-file-upload-utility | ||
|
||
DESCRIPTION = "Microsoft Azure SD for CPP" | ||
AUTHOR = "Microsoft Corporation" | ||
HOMEPAGE = "https://github.com/Azure/azure-sdk-for-cpp" | ||
LICENSE = "MIT" | ||
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e74f78882cab57fd1cc4c5482b9a214a" | ||
|
||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
|
||
SRC_URI = "gitsm://github.com/Azure/azure-sdk-for-cpp.git;branch=main" | ||
|
||
SRCREV = "${AUTOREV}" | ||
PV = "1.0+git${SRCPV}" | ||
|
||
S = "${WORKDIR}/git" | ||
|
||
# util-linux for uuid-dev | ||
# libxml2 for libxml2-dev | ||
DEPENDS = "util-linux curl openssl libxml2" | ||
|
||
inherit cmake | ||
|
||
sysroot_stage_all_append () { | ||
sysroot_stage_dir ${D}${exec_prefix}/cmake ${SYSROOT_DESTDIR}${exec_prefix}/cmake | ||
} | ||
|
||
FILES_${PN}-dev += "${exec_prefix}/cmake" | ||
|
||
FILES_${PN} = "/usr/share/azure-storage-blobs-cpp \ | ||
/usr/share/azure-storage-queues-cpp \ | ||
/usr/share/azure-storage-common-cpp \ | ||
/usr/share/azure-storage-files-shares-cpp \ | ||
/usr/share/azure-security-keyvault-secrets-cpp \ | ||
/usr/share/azure-security-keyvault-certificates-cpp \ | ||
/usr/share/azure-security-keyvault-keys-cpp \ | ||
/usr/share/azure-identity-cpp \ | ||
/usr/share/azure-template-cpp \ | ||
/usr/share/azure-core-cpp \ | ||
/usr/share/azure-storage-files-datalake-cpp" | ||
|
||
BBCLASSEXTEND = "native nativesdk" |
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