diff --git a/COPYING.MIT b/LICENSE similarity index 83% rename from COPYING.MIT rename to LICENSE index 89de3547..52f1e28f 100644 --- a/COPYING.MIT +++ b/LICENSE @@ -1,3 +1,9 @@ +The MIT License (MIT) + +Copyright (c) Common Horizon Community and Contributors + +All rights reserved. + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -5,13 +11,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README b/README deleted file mode 100644 index a5ad7e23..00000000 --- a/README +++ /dev/null @@ -1,25 +0,0 @@ -OpenEmbedded/Yocto DISTRO Layer for TorizonCore -=============================================== - -TorizonCore is an embedded Linux distribution for the Torizon platform. It -features, among other essential services, a container runtime and components -for secure remote over-the-air (OTA) updates. - -This layer provides the necessary metadata to build the TorizonCore Linux -distribution on top of Toradex's BSP Linux reference image. - -Building -======== - -To build TorizonCore, see the following article: - -https://developer.toradex.com/knowledge-base/build-torizoncore - -License -======= - -All metadata is MIT licensed unless otherwise stated. Source code and -binaries included in tree for individual recipes is under the LICENSE -stated in each recipe (.bb file) unless otherwise stated. - -This README document is Copyright (C) 2019 Toradex AG. diff --git a/README.md b/README.md new file mode 100644 index 00000000..ce4c589f --- /dev/null +++ b/README.md @@ -0,0 +1,46 @@ +# Common Torizon OS + +![Common Torizon cover image](https://github.com/commontorizon/Documentation/blob/main/assets/img/commonTorizonCore800.png?raw=true) + +Common Torizon OS is an embedded Linux distribution for the [Torizon Cloud](https://app.torizon.io/). It +features, among other essential services, a container runtime and components +for secure remote over-the-air (OTA) updates. + +This layer provides the necessary metadata to build the Common Torizon OS Linux +distribution. + +> ⚠️ **DISCLAIMER:** this is a derivative work from Torizon OS open source project. Torizon™ is a registered trademark of Toradex Group AG. This derivative work have not been reviewed or approved by Toradex. Common Torizon community does not talk on behalf of Toradex. +> +>⚠️ **This software is provided experimentally as-is.** + +## Building + +General documentation for the community can be found here: + +## Feature Support + +Our goal is to have Common Torizon OS in feature parity with Torizon OS. The table below shows the current status of each key feature: + +| Feature | Toradex SoM | Rpi3 | Rpi4 | Nezha D1 | x86-64 | Beagle Bone Black | +| ---------------------------- | ----------- | ---- | ---- | -------- | ------ | ----------------- | +| OTA Update OS Image | ✅ | | ✅ | | | | +| OTA Update Container App | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| OTA Update Bootloader | ✅ | | | | | | +| Device Monitoring | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| LTS Hardware & BSP | ✅ | | | | | | +| Free Technical Support | ✅ | | | | | | +| Prebuilt Torizon OS Image | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | +| QA Approved Releases | ✅ | | | | | | +| Provisioning with TEZI* | ✅ | | | | | | +| Image Customizing with TCB** | ✅ | | | | | | +| VS Code extension 2 support | ✅ | ✅ | ✅ | ⚠️*** | ⚠️*** | ✅ | + +> ⚠️* **TEZI**: Toradex Easy Installer +⚠️** **TCB**: TorizonCore Builder +⚠️*** **VS Code Extension**: are not all the templates that support RISC-V and x86-64 architectures + +## License + +All metadata is [MIT licensed](./LICENSE) unless otherwise stated. Source code and +binaries included in tree for individual recipes is under the LICENSE +stated in each recipe unless otherwise stated. diff --git a/classes/image_type_torizon.bbclass b/classes/image_type_torizon.bbclass index 27fd2ae0..1bfb3e28 100644 --- a/classes/image_type_torizon.bbclass +++ b/classes/image_type_torizon.bbclass @@ -28,7 +28,7 @@ EXTRA_IMAGECMD:ota-ext4:qemuarm64 = "-O ^64bit,^metadata_csum -L otaroot -i 4096 IMAGE_CMD:ota:prepend() { if [ "${OSTREE_BOOTLOADER}" = "u-boot" ]; then - cp -a ${DEPLOY_DIR_IMAGE}/boot.scr-${MACHINE} ${OTA_SYSROOT}/boot.scr + cp -a ${DEPLOY_DIR_IMAGE}/boot.scr-${MACHINE} ${OTA_SYSROOT}/boot.scr fi } do_image_ota[depends] += "${@'u-boot-default-script:do_deploy' if d.getVar('OSTREE_BOOTLOADER') == 'u-boot' else ''}" @@ -39,7 +39,8 @@ def get_tdx_ostree_purpose(purpose): TDX_OSTREE_PURPOSE ?= "${@get_tdx_ostree_purpose(d.getVar('TDX_PURPOSE'))}" # Use new branch naming -OSTREE_BRANCHNAME = "${TDX_MAJOR}/${MACHINE}/${DISTRO}/${IMAGE_BASENAME}/${TDX_OSTREE_PURPOSE}" +OSTREE_BRANCHNAME = "${TDX_RELEASE}-${MACHINE}" +GARAGE_TARGET_VERSION = "${TDX_RELEASE}" # Force ostree summary to be updated OSTREE_UPDATE_SUMMARY = "1" @@ -182,6 +183,22 @@ ROOTFS_POSTPROCESS_COMMAND += "tweak_os_release_variant;" tweak_os_release_variant () { if [ -n "${IMAGE_VARIANT}" ]; then sed -i -e "s/^VARIANT=.*$/VARIANT=\"${IMAGE_VARIANT}\"/g" ${IMAGE_ROOTFS}${sysconfdir}/os-release + + if [ "${IMAGE_VARIANT}" = "Docker" ]; then + # We build docker-compose as a standalone binary in docker-compose recipe, + # which is installed as ${bindir}/docker-compose, but we'd also like to + # allow it to be run as a docker plugin 'docker compose', create the link + # to support that. + install -d ${IMAGE_ROOTFS}${nonarch_libdir}/docker/cli-plugins + ln -sf ${bindir}/docker-compose ${IMAGE_ROOTFS}${nonarch_libdir}/docker/cli-plugins/docker-compose + fi + + if [ "${IMAGE_VARIANT}" = "Podman" ]; then + # Allow torizon user to execute podman without password + echo >> ${IMAGE_ROOTFS}${sysconfdir}/sudoers.d/50-torizon + echo "# torizon user can execute podman without password" >> ${IMAGE_ROOTFS}${sysconfdir}/sudoers.d/50-torizon + echo "torizon ALL=(ALL) NOPASSWD:/usr/bin/podman" >> ${IMAGE_ROOTFS}${sysconfdir}/sudoers.d/50-torizon + fi else bbwarn "IMAGE_VARIANT is missing, would be better to define it for a TorizonCore image recipe." fi @@ -494,7 +511,7 @@ get_torizon_prov_data2() { # but may have different permissions; make sure they are correct. chmod 0750 "${destdir}/import/repo" || true chmod 0750 "${destdir}/import/director" || true - + if [ "${TORIZON_SOTA_PROV_MODE}" = "online" ]; then tmp="${destdir}/tmp/provision.json" dst="${destdir}/auto-provisioning.json" diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass new file mode 100644 index 00000000..18311dff --- /dev/null +++ b/classes/image_types_ostree.bbclass @@ -0,0 +1,290 @@ +# OSTree deployment +inherit features_check + +REQUIRED_DISTRO_FEATURES = "usrmerge" + +OSTREE_ROOTFS ??= "${WORKDIR}/ostree-rootfs" +OSTREE_COMMIT_SUBJECT ??= "Commit-id: ${IMAGE_NAME}" +OSTREE_COMMIT_BODY ??= "" +OSTREE_COMMIT_VERSION ??= "${DISTRO_VERSION}" +OSTREE_UPDATE_SUMMARY ??= "0" + +BUILD_OSTREE_TARBALL ??= "1" + +GARAGE_PUSH_RETRIES ??= "3" +GARAGE_PUSH_RETRIES_SLEEP ??= "0" + +SYSTEMD_USED = "${@oe.utils.ifelse(d.getVar('VIRTUAL-RUNTIME_init_manager') == 'systemd', 'true', '')}" + +IMAGE_CMD_TAR = "tar --xattrs --xattrs-include=*" +CONVERSION_CMD:tar = "touch ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}; ${IMAGE_CMD_TAR} --numeric-owner -cf ${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.${type}.tar -C ${TAR_IMAGE_ROOTFS} . || [ $? -eq 1 ]" +CONVERSIONTYPES:append = " tar" + +TAR_IMAGE_ROOTFS:task-image-ostree = "${OSTREE_ROOTFS}" + +do_image_ostree[dirs] = "${OSTREE_ROOTFS}" +do_image_ostree[cleandirs] = "${OSTREE_ROOTFS}" +do_image_ostree[depends] = "coreutils-native:do_populate_sysroot virtual/kernel:do_deploy ${INITRAMFS_IMAGE}:do_image_complete" +IMAGE_CMD:ostree () { + # Copy required as we change permissions on some files. + tar --xattrs --xattrs-include='*' -cf - -S -C ${IMAGE_ROOTFS} -p . | tar --xattrs --xattrs-include='*' -xf - -C ${OSTREE_ROOTFS} + + for d in var/*; do + if [ "${d}" != "var/local" ]; then + rm -rf ${d} + fi + done + + # Create sysroot directory to which physical sysroot will be mounted + mkdir sysroot + ln -sf sysroot/ostree ostree + + mkdir -p usr/rootdirs + + mv etc usr/ + + if [ -n "${SYSTEMD_USED}" ]; then + mkdir -p usr/etc/tmpfiles.d + tmpfiles_conf=usr/etc/tmpfiles.d/00ostree-tmpfiles.conf + echo "d /var/rootdirs 0755 root root -" >>${tmpfiles_conf} + else + mkdir -p usr/etc/init.d + tmpfiles_conf=usr/etc/init.d/tmpfiles.sh + echo '#!/bin/sh' > ${tmpfiles_conf} + echo "mkdir -p /var/rootdirs; chmod 755 /var/rootdirs" >> ${tmpfiles_conf} + + ln -s ../init.d/tmpfiles.sh usr/etc/rcS.d/S20tmpfiles.sh + fi + + # Preserve OSTREE_BRANCHNAME for future information + mkdir -p usr/share/sota/ + echo -n "${OSTREE_BRANCHNAME}" > usr/share/sota/branchname + + # home directories get copied from the OE root later to the final sysroot + # Create a symlink to var/rootdirs/home to make sure the OSTree deployment + # redirects /home to /var/rootdirs/home. + rm -rf home/ + ln -sf var/rootdirs/home home + + # Move persistent directories to /var + dirs="opt mnt media srv" + + for dir in ${dirs}; do + if [ -d ${dir} ] && [ ! -L ${dir} ]; then + if [ "$(ls -A $dir)" ]; then + bbwarn "Data in /$dir directory is not preserved by OSTree. Consider moving it under /usr" + fi + rm -rf ${dir} + fi + + if [ -n "${SYSTEMD_USED}" ]; then + echo "d /var/rootdirs/${dir} 0755 root root -" >>${tmpfiles_conf} + else + echo "mkdir -p /var/rootdirs/${dir}; chmod 755 /var/rootdirs/${dir}" >>${tmpfiles_conf} + fi + ln -sf var/rootdirs/${dir} ${dir} + done + + if [ -d root ] && [ ! -L root ]; then + if [ "$(ls -A root)" ]; then + bbfatal "Data in /root directory is not preserved by OSTree." + fi + + if [ -n "${SYSTEMD_USED}" ]; then + echo "d /var/roothome 0700 root root -" >>${tmpfiles_conf} + else + echo "mkdir -p /var/roothome; chmod 700 /var/roothome" >>${tmpfiles_conf} + fi + + rm -rf root + ln -sf var/roothome root + fi + + if [ -d usr/local ] && [ ! -L usr/local ]; then + if [ "$(ls -A usr/local)" ]; then + bbfatal "Data in /usr/local directory is not preserved by OSTree." + fi + rm -rf usr/local + fi + + if [ -n "${SYSTEMD_USED}" ]; then + echo "d /var/usrlocal 0755 root root -" >>${tmpfiles_conf} + else + echo "mkdir -p /var/usrlocal; chmod 755 /var/usrlocal" >>${tmpfiles_conf} + fi + + dirs="bin etc games include lib man sbin share src" + + for dir in ${dirs}; do + if [ -n "${SYSTEMD_USED}" ]; then + echo "d /var/usrlocal/${dir} 0755 root root -" >>${tmpfiles_conf} + else + echo "mkdir -p /var/usrlocal/${dir}; chmod 755 /var/usrlocal/${dir}" >>${tmpfiles_conf} + fi + done + + ln -sf ../var/usrlocal usr/local + + # Copy image manifest + cat ${IMAGE_MANIFEST} | cut -d " " -f1,3 > usr/package.manifest +} + +IMAGE_TYPEDEP:ostreecommit = "ostree" +do_image_ostreecommit[depends] += "ostree-native:do_populate_sysroot" +do_image_ostreecommit[lockfiles] += "${OSTREE_REPO}/ostree.lock" +IMAGE_CMD:ostreecommit () { + if ! ostree --repo=${OSTREE_REPO} refs 2>&1 > /dev/null; then + ostree --repo=${OSTREE_REPO} init --mode=archive-z2 + fi + + # Commit the result + ostree_target_hash=$(ostree --repo=${OSTREE_REPO} commit \ + --tree=dir=${OSTREE_ROOTFS} \ + --skip-if-unchanged \ + --branch=${OSTREE_BRANCHNAME} \ + --subject="${OSTREE_COMMIT_SUBJECT}" \ + --body="${OSTREE_COMMIT_BODY}" \ + --add-metadata-string=version="${OSTREE_COMMIT_VERSION}" \ + ${EXTRA_OSTREE_COMMIT}) + + echo $ostree_target_hash > ${WORKDIR}/ostree_manifest + + if [ ${@ oe.types.boolean('${OSTREE_UPDATE_SUMMARY}')} = True ]; then + ostree --repo=${OSTREE_REPO} summary -u + fi +} + +IMAGE_TYPEDEP:ostreepush = "ostreecommit" +do_image_ostreepush[depends] += "aktualizr-native:do_populate_sysroot ca-certificates-native:do_populate_sysroot" +do_image_ostreepush[lockfiles] += "${OSTREE_REPO}/ostree.lock" +do_image_ostreepush[network] = "1" +IMAGE_CMD:ostreepush () { + + if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then + if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then + garage-push --loglevel 0 --repo=${OSTREE_REPO} \ + --ref=${OSTREE_BRANCHNAME} \ + --credentials=${SOTA_PACKED_CREDENTIALS} \ + --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt + else + bbwarn "Torizon SOTA_PACKED_CREDENTIALS file does not exist." + fi + else + bbwarn "Torizon SOTA_PACKED_CREDENTIALS not set. Please add SOTA_PACKED_CREDENTIALS." + fi +} + +IMAGE_TYPEDEP:garagesign = "ostreepush" +do_image_garagesign[depends] += "unzip-native:do_populate_sysroot" +# This lock solves OTA-1866, which is that removing GARAGE_SIGN_REPO while using +# garage-sign simultaneously for two images often causes problems. +do_image_garagesign[lockfiles] += "${DEPLOY_DIR_IMAGE}/garagesign.lock" +do_image_garagesign[network] = "1" +IMAGE_CMD:garagesign () { + if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then + # if credentials are issued by a server that doesn't support offline signing, exit silently + unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec tufrepo.url 2>&1 >/dev/null || exit 0 + + java_version=$( java -version 2>&1 | awk -F '"' '/version/ {print $2}' ) + if [ "${java_version}" = "" ]; then + bbfatal "Java is required for synchronization with update backend, but is not installed on the host machine" + elif [ "${java_version}" \< "1.8" ]; then + bbfatal "Java version >= 8 is required for synchronization with update backend" + fi + + rm -rf ${GARAGE_SIGN_REPO} + garage-sign init --repo tufrepo \ + --home-dir ${GARAGE_SIGN_REPO} \ + --credentials ${SOTA_PACKED_CREDENTIALS} + + ostree_target_hash=$(cat ${WORKDIR}/ostree_manifest) + + # Use OSTree target hash as version if none was provided by the user + target_version=${ostree_target_hash} + if [ -n "${GARAGE_TARGET_VERSION}" ]; then + target_version=${GARAGE_TARGET_VERSION} + bbwarn "Target version is overriden with GARAGE_TARGET_VERSION variable. This is a dangerous operation! See https://docs.ota.here.com/ota-client/latest/build-configuration.html#_overriding_target_version" + elif [ -e "${STAGING_DATADIR_NATIVE}/target_version" ]; then + target_version=$(cat "${STAGING_DATADIR_NATIVE}/target_version") + bbwarn "Target version is overriden with target_version file. This is a dangerous operation! See https://docs.ota.here.com/ota-client/latest/build-configuration.html#_overriding_target_version" + fi + + # Push may fail due to race condition when multiple build machines try to push simultaneously + # in which case targets.json should be pulled again and the whole procedure repeated + push_success=0 + target_url="" + if [ -n "${GARAGE_TARGET_URL}" ]; then + target_url="--url ${GARAGE_TARGET_URL}" + fi + target_expiry="" + if [ -n "${GARAGE_TARGET_EXPIRES}" ] && [ -n "${GARAGE_TARGET_EXPIRE_AFTER}" ]; then + bbfatal "Both GARAGE_TARGET_EXPIRES and GARAGE_TARGET_EXPIRE_AFTER are set. Only one can be set at a time." + elif [ -n "${GARAGE_TARGET_EXPIRES}" ]; then + target_expiry="--expires ${GARAGE_TARGET_EXPIRES}" + elif [ -n "${GARAGE_TARGET_EXPIRE_AFTER}" ]; then + target_expiry="--expire-after ${GARAGE_TARGET_EXPIRE_AFTER}" + else + target_expiry="--expire-after 1M" + fi + + for push_retries in $( seq ${GARAGE_PUSH_RETRIES} ); do + garage-sign targets pull --repo tufrepo \ + --home-dir ${GARAGE_SIGN_REPO} + garage-sign targets add --repo tufrepo \ + --home-dir ${GARAGE_SIGN_REPO} \ + --name ${GARAGE_TARGET_NAME} \ + --format OSTREE \ + --version ${target_version} \ + --length 0 \ + ${target_url} \ + --sha256 ${ostree_target_hash} \ + --hardwareids ${SOTA_HARDWARE_ID} + if [ -n "${GARAGE_CUSTOMIZE_TARGET}" ]; then + bbplain "Running command(${GARAGE_CUSTOMIZE_TARGET}) to customize target" + ${GARAGE_CUSTOMIZE_TARGET} \ + ${GARAGE_SIGN_REPO}/tufrepo/roles/unsigned/targets.json \ + ${GARAGE_TARGET_NAME}-${target_version} + fi + garage-sign targets sign --repo tufrepo \ + --home-dir ${GARAGE_SIGN_REPO} \ + ${target_expiry} \ + --key-name=targets + errcode=0 + garage-sign targets push --repo tufrepo \ + --home-dir ${GARAGE_SIGN_REPO} || errcode=$? + if [ "$errcode" -eq "0" ]; then + push_success=1 + break + else + bbwarn "Push to garage repository has failed with errcode ${errcode}, retrying ${push_retries}/${GARAGE_PUSH_RETRIES}" + if [ "${GARAGE_PUSH_RETRIES_SLEEP}" -ne "0" ]; then + ramdom="$(date +%s%N | cut -b10-19)" + sleep="$(expr ${ramdom} % ${GARAGE_PUSH_RETRIES_SLEEP} + 1)" + bbdebug 1 "Push to garage repository in ${sleep} seconds" + sleep ${sleep} + fi + fi + done + rm -rf ${GARAGE_SIGN_REPO} + + if [ "$push_success" -ne "1" ]; then + bbfatal_log "Couldn't push to garage repository" + fi + fi +} + +IMAGE_TYPEDEP:garagecheck = "garagesign" +do_image_garagecheck[network] = "1" +IMAGE_CMD:garagecheck () { + if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then + # if credentials are issued by a server that doesn't support offline signing, exit silently + unzip -p ${SOTA_PACKED_CREDENTIALS} root.json targets.pub targets.sec tufrepo.url 2>&1 >/dev/null || exit 0 + + ostree_target_hash=$(cat ${WORKDIR}/ostree_manifest) + + garage-check --ref=${ostree_target_hash} \ + --credentials=${SOTA_PACKED_CREDENTIALS} \ + --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt + fi +} +# vim:set ts=4 sw=4 sts=4 expandtab: diff --git a/classes/rust-target-config.bbclass b/classes/rust-target-config.bbclass index 21a56ede..e564b54a 100644 --- a/classes/rust-target-config.bbclass +++ b/classes/rust-target-config.bbclass @@ -245,6 +245,13 @@ TARGET_POINTER_WIDTH[riscv64gc] = "64" TARGET_C_INT_WIDTH[riscv64gc] = "64" MAX_ATOMIC_WIDTH[riscv64gc] = "64" +## riscv64-unknown-linux-{gnu, musl} +DATA_LAYOUT[riscv64] = "e-m:e-p:64:64-i64:64-i128:128-n64-S128" +TARGET_ENDIAN[riscv64] = "little" +TARGET_POINTER_WIDTH[riscv64] = "64" +TARGET_C_INT_WIDTH[riscv64] = "64" +MAX_ATOMIC_WIDTH[riscv64] = "64" + ## loongarch64-unknown-linux-{gnu, musl} DATA_LAYOUT[loongarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128" TARGET_ENDIAN[loongarch64] = "little" diff --git a/conf/common/sanity.inc b/conf/common/sanity.inc new file mode 100644 index 00000000..80cee704 --- /dev/null +++ b/conf/common/sanity.inc @@ -0,0 +1,19 @@ +addhandler common_torizon_sanity_handler +common_torizon_sanity_handler[eventmask] = "bb.event.ParseCompleted" + +python common_torizon_sanity_handler() { + tdx_debug = d.getVar("TDX_DEBUG", "0") + tdx_image = d.getVar("TDX_IMAGE", "torizon-core-common-docker") + machine = d.getVar("MACHINE", "undefined") + + if tdx_image == "torizon-core-common-docker-dev": + if tdx_debug != "1": + bb.fatal(f"You are trying to build a development image with TDX_DEBUG={tdx_debug}\n\n") + else: + # for common Torizon OS we are only allowing to build development images + bb.fatal( + f"\n\nYou are trying to build {machine} with TDX_IMAGE={tdx_image}" \ + "\nPlease build with TDX_IMAGE=torizon-core-common-docker-dev" \ + "\nhttps://github.com/commontorizon/Documentation/blob/main/BUILDING.md\n\n" + ) +} diff --git a/conf/distro/include/torizon.inc b/conf/distro/include/torizon.inc index 1542e4fc..87f33559 100644 --- a/conf/distro/include/torizon.inc +++ b/conf/distro/include/torizon.inc @@ -34,9 +34,6 @@ PACKAGECONFIG:append:pn-${PREFERRED_PROVIDER_virtual/runc} = " seccomp" PACKAGECONFIG:append:pn-${PREFERRED_PROVIDER_virtual/docker} = " seccomp" PACKAGECONFIG:append:pn-systemd = " seccomp" -# Set default network configuration -PREFERRED_RPROVIDER_network-configuration = "networkmanager" - # SOTA OSTREE_OSNAME = "torizon" OSTREE_MULTI_DEVICETREE_SUPPORT = "1" @@ -54,12 +51,15 @@ IMAGE_BOOT_FILES_REMOVE:sota = "boot.scr-${MACHINE};boot.scr overlays.txt overla IMAGE_BOOT_FILES_REMOVE:append:apalis-imx8 = " hdmitxfw.bin dpfw.bin" DISTRO_FEATURES:append = " virtualization stateless-system" +# FIXME: We need the opengl for beagleplay, but this can be an issue for +# upstream, so I'm comenting here to not forget in the next rebase DISTRO_FEATURES:remove = "3g alsa irda pcmcia nfc ldconfig pulseaudio wayland x11 ptest multiarch vulkan" -DISTRO_FEATURES:imx-generic-bsp:remove = "opengl" +# FIXME: This can be an issue for the upstream, so we are only commenting +# instead of removing it. # No need for x11 even for native -DISTRO_FEATURES_NATIVE:imx-generic-bsp:remove = "x11" -DISTRO_FEATURES_NATIVESDK:imx-generic-bsp:remove = "x11" +# DISTRO_FEATURES_NATIVE:remove = "x11" +# DISTRO_FEATURES_NATIVESDK:remove = "x11" # Note, enable or disable the useradd-staticids in a configured system, # the TMPDIR/DEPLOY_DIR/SSTATE_DIR may contain incorrect uid/gid values. diff --git a/conf/layer.conf b/conf/layer.conf index 4cde3346..b1c8bb96 100644 --- a/conf/layer.conf +++ b/conf/layer.conf @@ -4,9 +4,9 @@ BBPATH .= ":${LAYERDIR}" # We have a recipes directory, add to BBFILES BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" -BBFILE_COLLECTIONS += "meta-toradex-torizon" -BBFILE_PATTERN_meta-toradex-torizon := "^${LAYERDIR}/" -BBFILE_PRIORITY_meta-toradex-torizon = "90" +BBFILE_COLLECTIONS += "meta-common-torizon" +BBFILE_PATTERN_meta-common-torizon := "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-common-torizon = "90" -LAYERDEPENDS_meta-toradex-torizon = "freescale-layer toradex-bsp-common-layer meta-toradex-distro sota meta-toradex-security" -LAYERSERIES_COMPAT_meta-toradex-torizon = "kirkstone" +LAYERDEPENDS_meta-common-torizon = "freescale-layer toradex-bsp-common-layer meta-toradex-distro sota meta-toradex-security" +LAYERSERIES_COMPAT_meta-common-torizon = "kirkstone" diff --git a/conf/machine/include/apalis-imx8.inc b/conf/machine/include/apalis-imx8.inc new file mode 100644 index 00000000..f745c04d --- /dev/null +++ b/conf/machine/include/apalis-imx8.inc @@ -0,0 +1,4 @@ +# to add custom configs + +# let's try to not use their old and jurassic RS232 +OSTREE_KERNEL_ARGS_EXTRA:append = " console=ttyLP0,115200n8 " diff --git a/conf/machine/include/beaglebone-yocto.inc b/conf/machine/include/beaglebone-yocto.inc new file mode 100644 index 00000000..be26c6fc --- /dev/null +++ b/conf/machine/include/beaglebone-yocto.inc @@ -0,0 +1,69 @@ +# taken from meta-freescale/conf/machine/include/utilities.inc +def make_dtb_boot_files(d): + # Generate IMAGE_BOOT_FILES entries for device tree files listed in + # KERNEL_DEVICETREE. + # Use only the basename for dtb files: + alldtbs = d.getVar('KERNEL_DEVICETREE') + + + # DTBs may be built out of kernel with devicetree.bbclass + if not alldtbs: + return '' + + def transform(dtb): + if not (dtb.endswith('dtb') or dtb.endswith('dtbo')): + # eg: whatever/bcm2708-rpi-b.dtb has: + # DEPLOYDIR file: bcm2708-rpi-b.dtb + # destination: bcm2708-rpi-b.dtb + bb.error("KERNEL_DEVICETREE entry %s is not a .dtb or .dtbo file." % (dtb) ) + return os.path.basename(dtb) + + return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb]) + +WKS_FILE = "beaglebone-yocto.wks" +WKS_FILE_DEPENDS:remove = "tezi-metadata virtual/dtb" +CORE_IMAGE_BASE_INSTALL:append = "resize-helper" + +# beaglebone +KERNEL_BUILTIN_WIREGUARD:beaglebone-yocto = "1" +CORE_IMAGE_BASE_INSTALL:remove = "kernel-module-wireguard wireguard-tools" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" +PREFERRED_PROVIDER_virtual/bootloader:sota = "u-boot" +PREFERRED_PROVIDER_virtual/bootloader:beaglebone-yocto = "u-boot" +PREFERRED_PROVIDER_u-boot:beaglebone-yocto = "u-boot" +PREFERRED_PROVIDER_virtual/dtb = "" +WKS_FILE_DEPENDS_BOOTLOADERS:beaglebone-yocto = "virtual/bootloader" +WKS_FILE_DEPENDS:append:beaglebone-yocto = " u-boot-default-script" +PREFERRED_PROVIDER_u-boot-default-script:beaglebone-yocto = "u-boot-distro-boot" +PREFERRED_PROVIDER_u-boot-default-script:sota:beaglebone-yocto = "u-boot-distro-boot" + +PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv" +PREFERRED_RPROVIDER_u-boot-fw-utils = "libubootenv" + +IMAGE_FSTYPES:remove:beaglebone-yocto = "ext3 jffs2 teziimg" + +# We need ota-ext4 and wic for beagle +IMAGE_FSTYPES_REMOVE = "" +IMAGE_BOOT_FILES:beaglebone-yocto = "u-boot.img MLO ${@make_dtb_boot_files(d)} boot.scr uEnv.txt " +IMAGE_BOOT_FILES:sota:beaglebone-yocto = "u-boot.img MLO ${@make_dtb_boot_files(d)} " +IMAGE_BOOT_FILES_REMOVE:sota:remove = "boot.scr-${MACHINE};boot.scr" +IMAGE_BOOT_FILES:append = " boot.scr-${MACHINE};boot.scr " + +OSTREE_KERNEL:beaglebone-yocto = "zImage" +OSTREE_DEPLOY_DEVICETREE:beaglebone-yocto = "0" +KERNEL_IMAGETYPE:beaglebone-yocto = "zImage" +KERNEL_IMAGETYPE:sota:beaglebone-yocto = "zImage" + +LINUX_VERSION_EXTENSION = "-torizon-${LINUX_KERNEL_TYPE}" + +## same bahavior +# This boot arguments are the same from torizon.bbclass +OSTREE_KERNEL_ARGS:sota:append:beaglebone-yocto = "console=ttyS0,115200 root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash " + +UBOOT_BINARY_OTA_IGNORE:beaglebone-yocto = "1" + +BBMASK += " \ + meta-common-torizon/recipes-bsp/u-boot/u-boot-toradex \ + meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend \ + meta-common-torizon/recipes-bsp/u-boot/u-boot-toradex_%.bbappend \ +" diff --git a/conf/machine/include/beagleplay.inc b/conf/machine/include/beagleplay.inc new file mode 100644 index 00000000..791f9d30 --- /dev/null +++ b/conf/machine/include/beagleplay.inc @@ -0,0 +1,75 @@ +# taken from meta-freescale/conf/machine/include/utilities.inc +def make_dtb_boot_files(d): + # Generate IMAGE_BOOT_FILES entries for device tree files listed in + # KERNEL_DEVICETREE. + # Use only the basename for dtb files: + alldtbs = d.getVar('KERNEL_DEVICETREE') + + + # DTBs may be built out of kernel with devicetree.bbclass + if not alldtbs: + return '' + + def transform(dtb): + if not (dtb.endswith('dtb') or dtb.endswith('dtbo')): + # eg: whatever/bcm2708-rpi-b.dtb has: + # DEPLOYDIR file: bcm2708-rpi-b.dtb + # destination: bcm2708-rpi-b.dtb + bb.error("KERNEL_DEVICETREE entry %s is not a .dtb or .dtbo file." % (dtb) ) + return os.path.basename(dtb) + + return ' '.join([transform(dtb) for dtb in alldtbs.split() if dtb]) + +WKS_FILE = "sdimage-2part.wks" +WKS_FILE_DEPENDS:remove = "tezi-metadata virtual/dtb" +CORE_IMAGE_BASE_INSTALL:append = "resize-helper" + +KERNEL_BUILTIN_WIREGUARD:beagleplay = "1" +CORE_IMAGE_BASE_INSTALL:remove = "kernel-module-wireguard wireguard-tools" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot-bb.org" +PREFERRED_PROVIDER_virtual/bootloader:sota = "u-boot-bb.org" +PREFERRED_PROVIDER_virtual/bootloader:beagleplay = "u-boot-bb.org" +PREFERRED_PROVIDER_u-boot:beagleplay = "u-boot-bb.org" +PREFERRED_PROVIDER_virtual/dtb = "" +WKS_FILE_DEPENDS_BOOTLOADERS:beagleplay = "virtual/bootloader" +WKS_FILE_DEPENDS:append:beagleplay = " u-boot-default-script" +PREFERRED_PROVIDER_u-boot-default-script:beagleplay = "u-boot-distro-boot" +PREFERRED_PROVIDER_u-boot-default-script:sota:beagleplay = "u-boot-distro-boot" + +PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv" +PREFERRED_RPROVIDER_u-boot-fw-utils = "libubootenv" + +IMAGE_FSTYPES:remove:beagleplay = "ext3 jffs2 teziimg" + +# We need ota-ext4 and wic for beagle +IMAGE_FSTYPES_REMOVE = "" +IMAGE_BOOT_FILES:beagleplay = "u-boot.img tispl.bin tiboot3.bin ${@make_dtb_boot_files(d)} " +IMAGE_BOOT_FILES:sota:beaglebone-yocto = "u-boot.img tispl.bin tiboot3.bin ${@make_dtb_boot_files(d)} " +IMAGE_BOOT_FILES_REMOVE:sota:remove = "boot.scr-${MACHINE};boot.scr" +IMAGE_BOOT_FILES:append = " boot.scr-${MACHINE};boot.scr " + +LINUX_VERSION_EXTENSION = "-torizon-${LINUX_KERNEL_TYPE}" + +## same bahavior +# This boot arguments are the same from torizon.bbclass +OSTREE_KERNEL_ARGS:sota:append:beagleplay = "console=ttyS2,115200 root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash " + +UBOOT_BINARY_OTA_IGNORE:beagleplay = "1" +OSTREE_DEPLOY_DEVICETREE:beagleplay = "0" + +PREFERRED_PROVIDER_virtual/mesa = "mesa-pvr" +PREFERRED_PROVIDER_virtual/egl = "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles1 = "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles2 = "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgles3 = "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgbm = "mesa-pvr" +PREFERRED_PROVIDER_virtual/libglx = "mesa-pvr" +PREFERRED_PROVIDER_virtual/libgl = "mesa-pvr" + +INITRAMFS_MAXSIZE = "315400" + +BBMASK += " \ + meta-common-torizon/recipes-bsp/u-boot/u-boot-toradex \ + meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend \ + meta-common-torizon/recipes-bsp/u-boot/u-boot-toradex_%.bbappend \ +" diff --git a/conf/machine/include/genericx86-64.inc b/conf/machine/include/genericx86-64.inc index 3a9adabf..7e49ed54 100644 --- a/conf/machine/include/genericx86-64.inc +++ b/conf/machine/include/genericx86-64.inc @@ -1,5 +1,6 @@ WKS_FILE:sota:genericx86-64 = "efidisk-sota.wks" WKS_FILE_DEPENDS:remove = "tezi-metadata virtual/dtb" +WKS_FILE_DEPENDS:append = " ovmf" OSTREE_KERNEL_ARGS:genericx86-64 = "quiet logo.nologo plymouth.ignore-serial-consoles splash console=ttyS0,115200 root=LABEL=otaroot rootfstype=ext4" OSTREE_BOOTLOADER:genericx86-64 = "grub" @@ -10,8 +11,17 @@ SOTA_CLIENT_FEATURES:remove = "ubootenv" IMAGE_FSTYPES_REMOVE = "hddimg teziimg" IMAGE_FSTYPES:append = " wic.vmdk wic.vdi" -hostname:pn-base-files = "${MACHINE}" -CORE_IMAGE_BASE_INSTALL:remove = "set-hostname" +EXTRA_IMAGEDEPENDS += "qemu-system-native qemu-helper-native:do_addto_recipe_sysroot" + +QB_DRIVE_TYPE = "/dev/hd" +QB_DEFAULT_FSTYPE = "wic" +QB_MEM:genericx86-64 = "-m 2048" + +PACKAGECONFIG:append:pn-qemu-system-native = " sdl" +PACKAGECONFIG:append:pn-nativesdk-qemu = " sdl" + +NET_NAME:pn-networkmanager = "enp" +NET_NUMS:pn-networkmanager = "0" PREFERRED_PROVIDER_u-boot-default-script = "" PREFERRED_PROVIDER_virtual/dtb = "" diff --git a/conf/machine/include/intel-corei7-64.inc b/conf/machine/include/intel-corei7-64.inc new file mode 100644 index 00000000..d17871ce --- /dev/null +++ b/conf/machine/include/intel-corei7-64.inc @@ -0,0 +1,27 @@ + +WKS_FILE:intel-corei7-64:sota = "efiimage-sota.wks" +WKS_FILE_DEPENDS:remove = "tezi-metadata virtual/dtb" + +CORE_IMAGE_BASE_INSTALL:append = "resize-helper docker-binfmt" + +OSTREE_KERNEL_ARGS:sota:append:intel-corei7-64 = "console=ttyS0,115200 root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:10 " +OSTREE_BOOTLOADER:intel-corei7-64 = "grub" +OSTREE_DEPLOY_DEVICETREE:intel-corei7-64 = "0" +EFI_PROVIDER:intel-corei7-64 = "grub-efi" +SOTA_CLIENT_FEATURES:remove = "ubootenv" +UBOOT_BINARY_OTA_IGNORE:intel-corei7-64 = "1" + +IMAGE_FSTYPES_REMOVE = "hddimg teziimg" +IMAGE_FSTYPES:append = " wic.vmdk wic.vdi" + +hostname:pn-base-files = "torizon-x86" +CORE_IMAGE_BASE_INSTALL:remove = "set-hostname" + +PREFERRED_PROVIDER_u-boot-default-script = "" +PREFERRED_PROVIDER_virtual/dtb = "" + +PREFERRED_PROVIDER_virtual/kernel = "linux-intel" +PREFERRED_VERSION_linux-intel = "5.10.%" + +IMAGE_INSTALL:remove = " minnowboard-efi-startup" +LINUX_VERSION_EXTENSION ?= "-torizon-${LINUX_KERNEL_TYPE}" diff --git a/conf/machine/include/nezha-allwinner-d1.inc b/conf/machine/include/nezha-allwinner-d1.inc new file mode 100644 index 00000000..450d2a26 --- /dev/null +++ b/conf/machine/include/nezha-allwinner-d1.inc @@ -0,0 +1,45 @@ + +WKS_FILE:nezha-allwinner-d1 = "nezha.wks" +WIC_CREATE_EXTRA_ARGS = "" +WKS_FILE:sota:nezha-allwinner-d1 = "nezha-sota.wks" +WKS_FILE_DEPENDS:remove = "tezi-metadata virtual/dtb" +CORE_IMAGE_BASE_INSTALL:append = "resize-helper" + +OSTREE_KERNEL_ARGS:sota:append:nezha-allwinner-d1 = " earlycon=sbi clk_ignore_unused initcall_debug=0 console=ttyS0,115200 loglevel=8 root=LABEL=otaroot rootfstype=ext4 root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash " +SOTA_CLIENT_FEATURES:append:nezha-allwinner-d1 = " ubootenv" +WKS_FILE_DEPENDS_BOOTLOADERS:nezha-allwinner-d1 = "virtual/bootloader" +WKS_FILE_DEPENDS:append:nezha-allwinner-d1 = " u-boot-default-script" +PREFERRED_PROVIDER_u-boot-default-script:nezha-allwinner-d1 = "u-boot-distro-boot" +PREFERRED_PROVIDER_u-boot-default-script:sota:nezha-allwinner-d1 = "u-boot-distro-boot" + +OSTREE_DEPLOY_DEVICETREE:nezha-allwinner-d1 = "0" + +PREFERRED_PROVIDER_virtual/dtb = "" + +KERNEL_BUILTIN_WIREGUARD:nezha-allwinner-d1 = "1" +KERNEL_IMAGETYPE:nezha-allwinner-d1 = "Image" +KERNEL_IMAGETYPE:sota:nezha-allwinner-d1 = "Image" +OSTREE_KERNEL:nezha-allwinner-d1 = "Image" +#KERNEL_DEVICETREE:nezha-allwinner-d1:sota ?= " allwinner/sun20i-d1-nezha.dtb" +UBOOT_BINARY_OTA_IGNORE:nezha-allwinner-d1 = "1" +KERNEL_BOOTCMD = "booti" + +LINUX_VERSION_EXTENSION = "-torizon-${LINUX_KERNEL_TYPE}" + +IMAGE_FSTYPES_REMOVE = "hddimg teziimg" + +CORE_IMAGE_BASE_INSTALL:remove = "kernel-module-wireguard wireguard-tools" +IMAGE_BOOT_FILES:nezha-allwinner-d1 = "${KERNEL_IMAGETYPE} sun20i-d1-nezha.dtb boot.scr.uimg" +IMAGE_BOOT_FILES:sota:nezha-allwinner-d1 = "${KERNEL_IMAGETYPE} sun20i-d1-nezha.dtb boot.scr-${MACHINE};boot.scr.uimg" + +hostname:pn-base-files = "torizon-nezha" +# FIXME: rac does not compile for riscv64, https://github.com/briansmith/ring/issues/1182 +CORE_IMAGE_BASE_INSTALL:remove = "set-hostname rac" + +# Use meta-lmp but maintain compatibility +BBMASK += " \ + meta-common-torizon/recipes-bsp/u-boot/u-boot-toradex \ + meta-common-torizon/recipes-bsp/u-boot/libubootenv_* \ + meta-toradex-bsp-common/recipes-bsp/u-boot/libubootenv_* \ + meta-common-torizon/recipes-bsp/u-boot/u-boot-toradex_%.bbappend \ +" diff --git a/conf/machine/include/qemuarm64.inc b/conf/machine/include/qemuarm64.inc index d7b2a2cd..ef8acc5d 100644 --- a/conf/machine/include/qemuarm64.inc +++ b/conf/machine/include/qemuarm64.inc @@ -4,6 +4,8 @@ UBOOT_ENTRYPOINT = "0x40080000" WKS_FILE_DEPENDS:remove = "tezi-metadata virtual/dtb" WKS_FILE:sota:qemuarm64 = "torizon-sota.wks" +CORE_IMAGE_BASE_INSTALL:append = "resize-helper" + OSTREE_KERNEL_ARGS:qemuarm64 = "quiet logo.nologo plymouth.ignore-serial-consoles splash console=ttyAMA0 root=LABEL=otaroot rootfstype=ext4" OSTREE_DEPLOY_DEVICETREE:qemuarm64 = "0" @@ -16,17 +18,18 @@ QB_OPT_APPEND:qemuarm64 = "-device qemu-xhci -device usb-tablet -device usb-kbd IMAGE_FSTYPES_REMOVE = "tar.bz2 ext4 teziimg" IMAGE_FSTYPES:append = " wic" -hostname:pn-base-files = "${MACHINE}" -CORE_IMAGE_BASE_INSTALL:remove = "set-hostname" - PACKAGECONFIG:append:pn-qemu-system-native = " sdl" PACKAGECONFIG:append:pn-nativesdk-qemu = " sdl" +NET_NAME:pn-networkmanager = "enp" +NET_NUMS:pn-networkmanager = "0" + PREFERRED_PROVIDER_virtual/dtb = "" -PREFERRED_RPROVIDER_network-configuration:qemuarm64 = "networkd-static-conf" PREFERRED_PROVIDER_virtual/bootloader = "u-boot" PREFERRED_PROVIDER_virtual/kernel:qemuarm64 = "linux-yocto" PREFERRED_PROVIDER_virtual/kernel:qemuarm64:preempt-rt = "linux-yocto-rt" PREFERRED_PROVIDER_u-boot-default-script:qemuarm64 = "u-boot-distro-boot" + +OSTREE_KERNEL_ARGS:sota:append:qemuarm64 = "console=ttyAMA0 root=LABEL=otaroot rootfstype=ext4 logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:10 " diff --git a/conf/machine/include/qemux86-64.inc b/conf/machine/include/qemux86-64.inc new file mode 100644 index 00000000..5f011163 --- /dev/null +++ b/conf/machine/include/qemux86-64.inc @@ -0,0 +1,23 @@ + +WKS_FILE:qemux86-64:sota = "efiimage-sota.wks" +WKS_FILE_DEPENDS:remove = "tezi-metadata virtual/dtb" + +CORE_IMAGE_BASE_INSTALL:append = "resize-helper docker-binfmt" + +OSTREE_KERNEL_ARGS:qemux86-64 = "console=ttyS0,115200 root=LABEL=otaroot rootfstype=ext4 logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:10 quiet " +OSTREE_BOOTLOADER:qemux86-64 = "grub" +OSTREE_DEPLOY_DEVICETREE:qemux86-64 = "0" +EFI_PROVIDER:qemux86-64 = "grub-efi" +SOTA_CLIENT_FEATURES:remove = "ubootenv" +UBOOT_BINARY_OTA_IGNORE:qemux86-64 = "1" + +IMAGE_FSTYPES_REMOVE = "hddimg teziimg" +IMAGE_FSTYPES:append = " wic" + +hostname:pn-base-files = "${MACHINE}" +CORE_IMAGE_BASE_INSTALL:remove = "set-hostname" + +PREFERRED_PROVIDER_u-boot-default-script = "" +PREFERRED_PROVIDER_virtual/dtb = "" + +LINUX_VERSION_EXTENSION ?= "-torizon-${LINUX_KERNEL_TYPE}" diff --git a/conf/machine/include/raspberrypi-common.inc b/conf/machine/include/raspberrypi-common.inc new file mode 100644 index 00000000..88750675 --- /dev/null +++ b/conf/machine/include/raspberrypi-common.inc @@ -0,0 +1,56 @@ + +WKS_FILE_DEPENDS:remove = "tezi-metadata virtual/dtb" + +CORE_IMAGE_BASE_INSTALL:append = "resize-helper" + +# Raspberry Pi +KERNEL_BUILTIN_WIREGUARD:rpi = "1" +CORE_IMAGE_BASE_INSTALL:remove = "kernel-module-wireguard wireguard-tools" +PREFERRED_PROVIDER_virtual/bootloader = "u-boot" +PREFERRED_PROVIDER_virtual/bootloader:sota = "u-boot" +PREFERRED_PROVIDER_virtual/bootloader:rpi = "u-boot" +PREFERRED_PROVIDER_u-boot:rpi = "u-boot" +PREFERRED_PROVIDER_virtual/dtb = "" +WKS_FILE_DEPENDS_BOOTLOADERS:rpi = "virtual/bootloader" +WKS_FILE_DEPENDS:append:rpi = " u-boot-default-script" +PREFERRED_PROVIDER_u-boot-default-script:rpi = "u-boot-distro-boot" +PREFERRED_PROVIDER_u-boot-default-script:sota:rpi = "u-boot-distro-boot" + +PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv" +PREFERRED_RPROVIDER_u-boot-fw-utils = "libubootenv" + +IMAGE_FSTYPES:remove:rpi = "ext3 rpi-sdimg teziimg" + +# We need ota-ext4 and wic for rpi +IMAGE_FSTYPES_REMOVE = "" +IMAGE_BOOT_FILES:rpi = "${BOOTFILES_DIR_NAME}/* u-boot.bin;${SDIMG_KERNELIMAGE} ${@make_dtb_boot_files(d)} boot.scr uEnv.txt " +IMAGE_BOOT_FILES:sota:rpi = "${BOOTFILES_DIR_NAME}/* u-boot.bin;${SDIMG_KERNELIMAGE} ${@make_dtb_boot_files(d)} " +IMAGE_BOOT_FILES_REMOVE:sota:remove = "boot.scr-${MACHINE};boot.scr" +IMAGE_BOOT_FILES:append = " boot.scr-${MACHINE};boot.scr " + +OSTREE_KERNEL:rpi = "Image" +OSTREE_DEPLOY_DEVICETREE:rpi = "0" +KERNEL_IMAGETYPE:rpi = "Image" +KERNEL_IMAGETYPE:sota:rpi = "Image" + +LINUX_VERSION_EXTENSION ?= "-torizon-${LINUX_KERNEL_TYPE}" + +## Mimic meta-raspberrypi behavior +ENABLE_UART:rpi = "1" +SERIAL_CONSOLES = "115200;ttyAMA0" +KERNEL_SERIAL:sota:rpi = "${@oe.utils.conditional("ENABLE_UART", "1", "console=ttyS0,115200", "", d)}" +OSTREE_KERNEL_ARGS:sota = " 8250.nr_uarts=1 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=614 bcm2708_fb.fbswap=1 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000 dwc_otg.lpm_enable=0 ${KERNEL_SERIAL} usbhid.mousepoll=0 " +# This boot arguments are the same from torizon.bbclass +OSTREE_KERNEL_ARGS:sota:append:rpi = " root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:10 " + +## U-Boot entrypoints for rpi +UBOOT_ENTRYPOINT:rpi = "0x00008000" +UBOOT_DTB_LOADADDRESS:rpi = "0x02600000" +UBOOT_DTBO_LOADADDRESS:rpi = "0x026d0000" +UBOOT_BINARY_OTA_IGNORE:rpi = "1" + +BBMASK += " \ + meta-common-torizon/recipes-bsp/u-boot/u-boot-toradex \ + meta-raspberrypi/recipes-bsp/u-boot/u-boot_%.bbappend \ + meta-common-torizon/recipes-bsp/u-boot/u-boot-toradex_%.bbappend \ +" diff --git a/conf/machine/include/raspberrypi0-2w-64.inc b/conf/machine/include/raspberrypi0-2w-64.inc new file mode 100644 index 00000000..cfc4f971 --- /dev/null +++ b/conf/machine/include/raspberrypi0-2w-64.inc @@ -0,0 +1,3 @@ +require raspberrypi-common.inc + +KERNEL_DEVICETREE:raspberrypi0-2w-64:sota ?= " broadcom/bcm2710-rpi-zero-2.dtb overlays/vc4-fkms-v3d.dtbo overlays/rpi-ft5406.dtbo" diff --git a/conf/machine/include/raspberrypi0-wifi.inc b/conf/machine/include/raspberrypi0-wifi.inc new file mode 100644 index 00000000..b8d9c6fa --- /dev/null +++ b/conf/machine/include/raspberrypi0-wifi.inc @@ -0,0 +1,7 @@ +require raspberrypi-common.inc + +KERNEL_DEVICETREE:raspberrypi0-wifi:sota ?= " bcm2708-rpi-zero-w.dtb overlays/vc4-fkms-v3d.dtbo overlays/rpi-ft5406.dtbo" +OSTREE_KERNEL:raspberrypi0-wifi = "zImage" +KERNEL_IMAGETYPE:raspberrypi0-wifi = "zImage" +KERNEL_IMAGETYPE:sota:raspberrypi0-wifi = "zImage" +KERNEL_BOOTCMD:raspberrypi0-wifi = "bootz" \ No newline at end of file diff --git a/conf/machine/include/raspberrypi3-64.inc b/conf/machine/include/raspberrypi3-64.inc new file mode 100644 index 00000000..82d1fd67 --- /dev/null +++ b/conf/machine/include/raspberrypi3-64.inc @@ -0,0 +1 @@ +require raspberrypi-common.inc \ No newline at end of file diff --git a/conf/machine/include/raspberrypi4-64.inc b/conf/machine/include/raspberrypi4-64.inc new file mode 100644 index 00000000..218b6755 --- /dev/null +++ b/conf/machine/include/raspberrypi4-64.inc @@ -0,0 +1,7 @@ +require raspberrypi-common.inc + +SOTA_DT_OVERLAYS:raspberrypi4-64 ?= "vc4-fkms-v3d-pi4.dtbo rpi-ft5406.dtbo" +VC4DTBO:raspberrypi4-64 ?= "vc4-fkms-v3d-pi4" +KERNEL_DEVICETREE:raspberrypi4-64:sota ?= " broadcom/bcm2711-rpi-4-b.dtb overlays/vc4-fkms-v3d-pi4.dtbo overlays/rpi-ft5406.dtbo" +KERNEL_BOOTCMD:raspberrypi4-64 = "booti" +KERNEL_SERIAL:sota:raspberrypi4-64 = "${@oe.utils.conditional("ENABLE_UART", "1", "console=ttyAMA0,115200", "", d)}" diff --git a/conf/machine/include/verdin-imx8mm.inc b/conf/machine/include/verdin-imx8mm.inc new file mode 100644 index 00000000..4088b587 --- /dev/null +++ b/conf/machine/include/verdin-imx8mm.inc @@ -0,0 +1 @@ +# to add custom configs diff --git a/conf/machine/include/verdin-imx8mp.inc b/conf/machine/include/verdin-imx8mp.inc new file mode 100644 index 00000000..4088b587 --- /dev/null +++ b/conf/machine/include/verdin-imx8mp.inc @@ -0,0 +1 @@ +# to add custom configs diff --git a/conf/template/bblayers.conf b/conf/template/bblayers.conf index ff67798b..44b424ec 100644 --- a/conf/template/bblayers.conf +++ b/conf/template/bblayers.conf @@ -20,6 +20,7 @@ BASELAYERS ?= " \ # These layers hold machine specific content, aka Board Support Packages BSPLAYERS ?= " \ + ${OEROOT}/layers/meta-raspberrypi \ ${OEROOT}/layers/meta-toradex-nxp \ ${OEROOT}/layers/meta-freescale \ ${OEROOT}/layers/meta-freescale-3rdparty \ @@ -31,6 +32,8 @@ BSPLAYERS ?= " \ ${OEROOT}/layers/meta-arm/meta-arm \ ${OEROOT}/layers/meta-ti/meta-ti-bsp \ ${OEROOT}/layers/meta-ti/meta-ti-extras \ + ${OEROOT}/layers/meta-intel \ + ${OEROOT}/layers/meta-riscv \ " # Add your overlay location to EXTRALAYERS @@ -38,7 +41,7 @@ BSPLAYERS ?= " \ EXTRALAYERS ?= "" BBLAYERS = " \ - ${OEROOT}/layers/meta-toradex-torizon \ + ${OEROOT}/layers/meta-common-torizon \ ${OEROOT}/layers/meta-toradex-security \ ${OEROOT}/layers/meta-toradex-distro \ ${OEROOT}/layers/meta-toradex-bsp-common \ diff --git a/conf/template/local.conf b/conf/template/local.conf index a3cb8a45..d93e2954 100644 --- a/conf/template/local.conf +++ b/conf/template/local.conf @@ -105,4 +105,10 @@ PARALLEL_MAKE ?= "-j ${@oe.utils.cpu_count()}" #TORIZON_PROV_SHARED_DATA ?= "${WORKDIR}/prov/shared-data.tar.gz" #TORIZON_PROV_ONLINE_DATA ?= "${ONLINE_PROV_DATA}" +# to enable TorizonCore custom debug features set it to 1 +#TDX_DEBUG ?= "0" + +# store the image name in a variable +TDX_IMAGE = "torizon-core-common-docker" + include conf/machine/include/${MACHINE}.inc diff --git a/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch b/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch new file mode 100644 index 00000000..452feb51 --- /dev/null +++ b/recipes-bsp/grub/files/0001-fs-fat-Don-t-error-when-mtime-is-0.patch @@ -0,0 +1,66 @@ +From e43f3d93b28cce852c110c7a8e40d8311bcd8bb1 Mon Sep 17 00:00:00 2001 +From: Robbie Harwood +Date: Fri, 15 Jul 2022 16:13:02 -0400 +Subject: [PATCH] fs/fat: Don't error when mtime is 0 + +In the wild, we occasionally see valid ESPs where some file modification +times are 0. For instance: + + ├── [Dec 31 1979] EFI + │ ├── [Dec 31 1979] BOOT + │ │ ├── [Dec 31 1979] BOOTX64.EFI + │ │ └── [Dec 31 1979] fbx64.efi + │ └── [Jun 27 02:41] fedora + │ ├── [Dec 31 1979] BOOTX64.CSV + │ ├── [Dec 31 1979] fonts + │ ├── [Mar 14 03:35] fw + │ │ ├── [Mar 14 03:35] fwupd-359c1169-abd6-4a0d-8bce-e4d4713335c1.cap + │ │ ├── [Mar 14 03:34] fwupd-9d255c4b-2d88-4861-860d-7ee52ade9463.cap + │ │ └── [Mar 14 03:34] fwupd-b36438d8-9128-49d2-b280-487be02d948b.cap + │ ├── [Dec 31 1979] fwupdx64.efi + │ ├── [May 10 10:47] grub.cfg + │ ├── [Jun 3 12:38] grub.cfg.new.new + │ ├── [May 10 10:41] grub.cfg.old + │ ├── [Jun 27 02:41] grubenv + │ ├── [Dec 31 1979] grubx64.efi + │ ├── [Dec 31 1979] mmx64.efi + │ ├── [Dec 31 1979] shim.efi + │ ├── [Dec 31 1979] shimx64.efi + │ └── [Dec 31 1979] shimx64-fedora.efi + └── [Dec 31 1979] FSCK0000.REC + + 5 directories, 17 files + +This causes grub-probe failure, which in turn causes grub-mkconfig +failure. They are valid filesystems that appear intact, and the Linux +FAT stack is able to mount and manipulate them without complaint. + +The check for mtime of 0 has been present since +20def1a3c3952982395cd7c3ea7e78638527962b (fat: support file +modification times). + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=e43f3d93b28cce852c110c7a8e40d8311bcd8bb1] + +Signed-off-by: Robbie Harwood +Reviewed-by: Daniel Kiper +--- + grub-core/fs/fat.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/grub-core/fs/fat.c b/grub-core/fs/fat.c +index 0951b2e63..c5efed724 100644 +--- a/grub-core/fs/fat.c ++++ b/grub-core/fs/fat.c +@@ -1027,9 +1027,6 @@ grub_fat_dir (grub_device_t device, const char *path, grub_fs_dir_hook_t hook, + grub_le_to_cpu16 (ctxt.dir.w_date), + &info.mtime); + #endif +- if (info.mtimeset == 0) +- grub_error (GRUB_ERR_OUT_OF_RANGE, +- "invalid modification timestamp for %s", path); + + if (hook (ctxt.filename, &info, hook_data)) + break; +-- +2.34.1 + diff --git a/recipes-bsp/grub/grub-efi_%.bbappend b/recipes-bsp/grub/grub-efi_%.bbappend new file mode 100644 index 00000000..69ef585c --- /dev/null +++ b/recipes-bsp/grub/grub-efi_%.bbappend @@ -0,0 +1,21 @@ +<<<<<<< HEAD +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI:append = " \ + file://0001-fs-fat-Don-t-error-when-mtime-is-0.patch \ +" + +RDEPENDS:${PN}:class-target:remove:sota = "virtual-grub-bootconf" + +GRUB_BUILDIN += "reboot" + +# Create startup.nsh so it can be consumed by wic +do_deploy:append:class-target() { + DEST_IMAGE=$(echo ${GRUB_IMAGE} | sed -e 's/^grub-efi-//') + echo 'fs0:\\EFI\\BOOT\\'${DEST_IMAGE} > startup.nsh + install -m 755 ${B}/startup.nsh ${DEPLOYDIR} +} +======= +# Add regexp command to GRUB +GRUB_BUILDIN += "regexp" +>>>>>>> 5bf1a43 (grub-efi: add regexp module to grub) diff --git a/recipes-bsp/grub/grub_%.bbappend b/recipes-bsp/grub/grub_%.bbappend new file mode 100644 index 00000000..e6e62a08 --- /dev/null +++ b/recipes-bsp/grub/grub_%.bbappend @@ -0,0 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI:append = " \ + file://0001-fs-fat-Don-t-error-when-mtime-is-0.patch \ +" diff --git a/recipes-bsp/u-boot/libubootenv/fw_env.config b/recipes-bsp/u-boot/libubootenv/fw_env.config new file mode 100644 index 00000000..49d312e2 --- /dev/null +++ b/recipes-bsp/u-boot/libubootenv/fw_env.config @@ -0,0 +1 @@ +/var/rootdirs/media/boot/uboot.env 0x0000 0x4000 diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/beaglebone-yocto/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/beaglebone-yocto/boot.cmd.in new file mode 100644 index 00000000..c8aabfbb --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/beaglebone-yocto/boot.cmd.in @@ -0,0 +1,53 @@ +# SPDX-License-Identifier: GPL-2.0+ OR MIT +# +# Copyright 2023 MicroHobby +# +# TorizonCore boot script. + +setenv bootlimit 3 +setenv devtype mmc +setenv devnum 0 +setenv bootdevice 0 +setenv otaroot 2 + +if test -z "${altbootcmd}" +then + env set altbootcmd 'env set rollback 1; run bootcmd' + env save +fi + +if test "${rollback}" = "1" && test "${upgrade_available}" = "1" +then + # Make sure to reset upgrade_available to avoid unnecessary wear + # Note this also makes rollback permanent. aktualizr will reset rollback + # when a new (hopefully better) update comes in. + env set upgrade_available 0 + env save +fi + +# save default U-Boot devicetree file to use in a rollback situation +env set fdtfile2 "${fdtfile}" +env set fdtfile "am335x-boneblack.dtb" + +if test -n "${loadaddr}" +then + ext4load ${devtype} ${devnum}:${otaroot} ${loadaddr} /boot/loader/uEnv.txt; env import -t ${loadaddr} ${filesize} +else + ext4load ${devtype} ${devnum}:${otaroot} ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} +fi + +if test "${debug}" = "1" +then + echo "Enabling kernel debug" + env set tdxargs "${tdxargs} rodata=off nokaslr maxcpus=1 kgdboc=ttymxc0,115200" +fi + +# now that we have all the environment variables, we can set the bootcmd +setenv bootargs "${defargs} ${bootargs} ${tdxargs}" + +ext4load ${devtype} ${devnum}:${otaroot} ${kernel_addr_r} /boot${kernel_image} +ext4load ${devtype} ${devnum}:${otaroot} ${ramdisk_addr_r} /boot${ramdisk_image} +env set ramdisk_size ${filesize} +load ${devtype} ${devnum}:1 ${fdt_addr_r} ${fdtfile} + +@@KERNEL_BOOTCMD@@ ${kernel_addr_r} ${ramdisk_addr_r}:${ramdisk_size} ${fdt_addr_r} diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/beaglebone-yocto/uEnv.txt.in b/recipes-bsp/u-boot/u-boot-distro-boot/beaglebone-yocto/uEnv.txt.in new file mode 100644 index 00000000..ccbe6963 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/beaglebone-yocto/uEnv.txt.in @@ -0,0 +1,6 @@ +kernel_image_type=@@KERNEL_IMAGETYPE@@ +overlays_file="overlays.txt" +bootlimit=3 +devtype=mmc +devnum=0 +otaroot=2 diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/beagleplay/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/beagleplay/boot.cmd.in new file mode 100644 index 00000000..76a14ca5 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/beagleplay/boot.cmd.in @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: GPL-2.0+ OR MIT +# +# Copyright 2023 MicroHobby +# +# TorizonCore boot script. + +setenv bootlimit 3 +setenv devtype mmc +setenv devnum 1 +setenv bootdevice 0 +setenv otaroot 2 + +if test -z "${altbootcmd}" +then + env set altbootcmd 'env set rollback 1; run bootcmd' + env save +fi + +if test "${rollback}" = "1" && test "${upgrade_available}" = "1" +then + # Make sure to reset upgrade_available to avoid unnecessary wear + # Note this also makes rollback permanent. aktualizr will reset rollback + # when a new (hopefully better) update comes in. + env set upgrade_available 0 + env save +fi + +# save default U-Boot devicetree file to use in a rollback situation +env set fdtfile "k3-am625-beagleplay.dtb" + +if test -n "${loadaddr}" +then + ext4load ${devtype} ${devnum}:${otaroot} ${loadaddr} /boot/loader/uEnv.txt; env import -t ${loadaddr} ${filesize} +else + ext4load ${devtype} ${devnum}:${otaroot} ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} +fi + +if test "${debug}" = "1" +then + echo "Enabling kernel debug" + env set tdxargs "${tdxargs} rodata=off nokaslr maxcpus=1 kgdboc=ttymxc0,115200" +fi + +# now that we have all the environment variables, we can set the bootcmd +setenv bootargs "${defargs} ${bootargs} ${tdxargs}" + +ext4load ${devtype} ${devnum}:${otaroot} ${kernel_addr_r} /boot${kernel_image} +ext4load ${devtype} ${devnum}:${otaroot} ${ramdisk_addr_r} /boot${ramdisk_image} +env set ramdisk_size ${filesize} +load ${devtype} ${devnum}:1 ${fdt_addr_r} ${fdtfile} + +@@KERNEL_BOOTCMD@@ ${kernel_addr_r} ${ramdisk_addr_r}:${ramdisk_size} ${fdt_addr_r} diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/beagleplay/uEnv.txt.in b/recipes-bsp/u-boot/u-boot-distro-boot/beagleplay/uEnv.txt.in new file mode 100644 index 00000000..5d66f6eb --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/beagleplay/uEnv.txt.in @@ -0,0 +1,6 @@ +kernel_image_type=@@KERNEL_IMAGETYPE@@ +overlays_file="overlays.txt" +bootlimit=3 +devtype=mmc +devnum=1 +otaroot=2 diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in index 710a9e25..7658e7e7 100644 --- a/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in +++ b/recipes-bsp/u-boot/u-boot-distro-boot/boot.cmd.in @@ -29,4 +29,10 @@ else ext4load ${devtype} ${devnum}:1 ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} fi +if test "${debug}" = "1" +then + echo "Enabling kernel debug" + env set tdxargs "${tdxargs} rodata=off nokaslr maxcpus=1 kgdboc=ttymxc0,115200" +fi + run bootcmd_run diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/nezha-allwinner-d1/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/nezha-allwinner-d1/boot.cmd.in new file mode 100644 index 00000000..80daf54b --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/nezha-allwinner-d1/boot.cmd.in @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0+ OR MIT +# +# Copyright 2023 MicroHobby +# +# TorizonCore boot script. + +setenv bootlimit 3 +setenv devtype mmc +setenv devnum 0 +setenv bootdevice 0 +setenv otaroot 2 + +if test -z "${altbootcmd}" +then + env set altbootcmd 'env set rollback 1; run bootcmd' + env save +fi + +if test "${rollback}" = "1" && test "${upgrade_available}" = "1" +then + # Make sure to reset upgrade_available to avoid unnecessary wear + # Note this also makes rollback permanent. aktualizr will reset rollback + # when a new (hopefully better) update comes in. + env set upgrade_available 0 + env save +fi + +# save default U-Boot devicetree file to use in a rollback situation +env set fdtfile2 "${fdtfile}" + +if test -n "${loadaddr}" +then + ext4load ${devtype} ${devnum}:${otaroot} ${loadaddr} /boot/loader/uEnv.txt; env import -t ${loadaddr} ${filesize} +else + ext4load ${devtype} ${devnum}:${otaroot} ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} +fi + +if test "${debug}" = "1" +then + echo "Enabling kernel debug" + env set tdxargs "${tdxargs} rodata=off nokaslr maxcpus=1 kgdboc=ttymxc0,115200" +fi + +# now that we have all the environment variables, we can set the bootcmd +setenv bootargs "${defargs} ${bootargs} ${tdxargs}" + +ext4load ${devtype} ${devnum}:${otaroot} ${kernel_addr_r} /boot${kernel_image} +ext4load ${devtype} ${devnum}:${otaroot} ${ramdisk_addr_r} /boot${ramdisk_image} +env set ramdisk_size ${filesize} + +@@KERNEL_BOOTCMD@@ ${kernel_addr_r} ${ramdisk_addr_r}:${ramdisk_size} ${fdtcontroladdr} diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/nezha-allwinner-d1/uEnv.txt.in b/recipes-bsp/u-boot/u-boot-distro-boot/nezha-allwinner-d1/uEnv.txt.in new file mode 100644 index 00000000..ccbe6963 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/nezha-allwinner-d1/uEnv.txt.in @@ -0,0 +1,6 @@ +kernel_image_type=@@KERNEL_IMAGETYPE@@ +overlays_file="overlays.txt" +bootlimit=3 +devtype=mmc +devnum=0 +otaroot=2 diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/raspberrypi4-64/uEnv.txt.in b/recipes-bsp/u-boot/u-boot-distro-boot/raspberrypi4-64/uEnv.txt.in new file mode 100644 index 00000000..cf78662b --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/raspberrypi4-64/uEnv.txt.in @@ -0,0 +1,36 @@ +kernel_image_type=@@KERNEL_IMAGETYPE@@ +overlays_file="overlays.txt" +bootlimit=3 +devtype=mmc +devnum=0 +otaroot=2 + +set_bootargs=env set bootargs "${defargs} ${bootargs} ${tdxargs}" + +bootcmd_load_k=ext4load ${devtype} ${devnum}:${otaroot} ${kernel_addr_r} /boot${kernel_image} + +bootcmd_load_r=ext4load ${devtype} ${devnum}:${otaroot} ${ramdisk_addr_r} /boot${ramdisk_image}; env set ramdisk_size ${filesize} + +# for rpi we need to overlay some u-boot info into the device tree +# this device tree was loaded by the Broadcom bootloader +uboot_info_overlay= \ + fdt addr ${fdt_addr} ; \ + fdt resize ; \ + fdt chosen + +# check kernel_image2 to avoid booting from other then default emmc in case of +# bootlimit is reached and there is no other deployed image +check_rollback_needed=if test -n "${kernel_image2}" && test "${rollback}" = "1"; then \ + echo "Rollback enabled. Booting previously deployed version."; \ + env set kernel_image ${kernel_image2}; \ + env set ramdisk_image ${ramdisk_image2}; \ + env set bootargs "${bootargs2}"; \ +fi || true + +bootcmd_boot=if test ${bootscript_debug} != 1; then \ + @@KERNEL_BOOTCMD@@ ${kernel_addr_r} ${ramdisk_addr_r}:${ramdisk_size} ${fdt_addr}; \ + fi || true + +bootcmd_run=run check_rollback_needed && run set_bootargs && \ + run uboot_info_overlay && \ + run bootcmd_load_k && run bootcmd_load_r && run bootcmd_boot diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/rpi/boot.cmd.in b/recipes-bsp/u-boot/u-boot-distro-boot/rpi/boot.cmd.in new file mode 100644 index 00000000..1bd30253 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/rpi/boot.cmd.in @@ -0,0 +1,43 @@ +# SPDX-License-Identifier: GPL-2.0+ OR MIT +# +# Copyright 2023 MicroHobby +# +# TorizonCore boot script. + +setenv bootlimit 3 +setenv devtype mmc +setenv devnum 0 +setenv otaroot 2 + +if test -z "${altbootcmd}" +then + env set altbootcmd 'env set rollback 1; run bootcmd' + env save +fi + +if test "${rollback}" = "1" && test "${upgrade_available}" = "1" +then + # Make sure to reset upgrade_available to avoid unnecessary wear + # Note this also makes rollback permanent. aktualizr will reset rollback + # when a new (hopefully better) update comes in. + env set upgrade_available 0 + env save +fi + +# save default U-Boot devicetree file to use in a rollback situation +env set fdtfile2 "${fdtfile}" + +if test -n "${loadaddr}" +then + ext4load ${devtype} ${devnum}:${otaroot} ${loadaddr} /boot/loader/uEnv.txt; env import -t ${loadaddr} ${filesize} +else + ext4load ${devtype} ${devnum}:${otaroot} ${scriptaddr} /boot/loader/uEnv.txt; env import -t ${scriptaddr} ${filesize} +fi + +if test "${debug}" = "1" +then + echo "Enabling kernel debug" + env set tdxargs "${tdxargs} rodata=off nokaslr maxcpus=1 kgdboc=ttyAMA0,115200" +fi + +run bootcmd_run diff --git a/recipes-bsp/u-boot/u-boot-distro-boot/rpi/uEnv.txt.in b/recipes-bsp/u-boot/u-boot-distro-boot/rpi/uEnv.txt.in new file mode 100644 index 00000000..cf78662b --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-distro-boot/rpi/uEnv.txt.in @@ -0,0 +1,36 @@ +kernel_image_type=@@KERNEL_IMAGETYPE@@ +overlays_file="overlays.txt" +bootlimit=3 +devtype=mmc +devnum=0 +otaroot=2 + +set_bootargs=env set bootargs "${defargs} ${bootargs} ${tdxargs}" + +bootcmd_load_k=ext4load ${devtype} ${devnum}:${otaroot} ${kernel_addr_r} /boot${kernel_image} + +bootcmd_load_r=ext4load ${devtype} ${devnum}:${otaroot} ${ramdisk_addr_r} /boot${ramdisk_image}; env set ramdisk_size ${filesize} + +# for rpi we need to overlay some u-boot info into the device tree +# this device tree was loaded by the Broadcom bootloader +uboot_info_overlay= \ + fdt addr ${fdt_addr} ; \ + fdt resize ; \ + fdt chosen + +# check kernel_image2 to avoid booting from other then default emmc in case of +# bootlimit is reached and there is no other deployed image +check_rollback_needed=if test -n "${kernel_image2}" && test "${rollback}" = "1"; then \ + echo "Rollback enabled. Booting previously deployed version."; \ + env set kernel_image ${kernel_image2}; \ + env set ramdisk_image ${ramdisk_image2}; \ + env set bootargs "${bootargs2}"; \ +fi || true + +bootcmd_boot=if test ${bootscript_debug} != 1; then \ + @@KERNEL_BOOTCMD@@ ${kernel_addr_r} ${ramdisk_addr_r}:${ramdisk_size} ${fdt_addr}; \ + fi || true + +bootcmd_run=run check_rollback_needed && run set_bootargs && \ + run uboot_info_overlay && \ + run bootcmd_load_k && run bootcmd_load_r && run bootcmd_boot diff --git a/recipes-bsp/u-boot/u-boot-ota/debug.cfg b/recipes-bsp/u-boot/u-boot-ota/debug.cfg new file mode 100644 index 00000000..2153634a --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-ota/debug.cfg @@ -0,0 +1,3 @@ +# CONFIG_SPL_WATCHDOG is not set +# CONFIG_IMX_WATCHDOG is not set +# CONFIG_SYSRESET_WATCHDOG is not set diff --git a/recipes-bsp/u-boot/u-boot/0001-rpi-always-set-fdt_addr-with-firmware-provided-FDT-address.patch b/recipes-bsp/u-boot/u-boot/0001-rpi-always-set-fdt_addr-with-firmware-provided-FDT-address.patch new file mode 100644 index 00000000..c375c406 --- /dev/null +++ b/recipes-bsp/u-boot/u-boot/0001-rpi-always-set-fdt_addr-with-firmware-provided-FDT-address.patch @@ -0,0 +1,50 @@ +From: Mauro Salvini +To: u-boot@lists.denx.de +Subject: [PATCH] rpi: always set fdt_addr with firmware-provided FDT address +Date: Wed, 12 May 2021 14:39:45 +0200 [thread overview] +Message-ID: <20210512123945.25649-1-m.salvini@koansoftware.com> (raw) + +Raspberry firmware prepares the FDT blob in memory at an address +that depends on both the memory size and the blob size [1]. +After commit ade243a211d6 ("rpi: passthrough of the firmware provided FDT +blob") this FDT is passed to kernel through fdt_addr environment variable, +handled in set_fdt_addr() function in board file. + +When u-boot environment is persistently saved, if a change happens +in loaded FDT (e.g. for a new overlay applied), firmware produces a FDT +address different from the saved one, but u-boot still use the saved +one because set_fdt_addr() function does not overwrite the fdt_addr +variable. So, for example, if there is a script that uses fdt commands for +e.g. manipulate the bootargs, boot hangs with error + +libfdt fdt_check_header(): FDT_ERR_BADMAGIC + +Removing the fdt_addr variable in saved environment allows to boot. + +With this patch set_fdt_addr() function always overwrite fdt_addr value. + +[1] https://www.raspberrypi.org/forums//viewtopic.php?f=107&t=134018 + +Signed-off-by: Mauro Salvini +Cc: C?dric Schieli +Cc: Matthias Brugger +--- + board/raspberrypi/rpi/rpi.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c +index df52a4689f..611013471e 100644 +--- a/board/raspberrypi/rpi/rpi.c ++++ b/board/raspberrypi/rpi/rpi.c +@@ -318,9 +318,6 @@ static void set_fdtfile(void) + */ + static void set_fdt_addr(void) + { +- if (env_get("fdt_addr")) +- return; +- + if (fdt_magic(fw_dtb_pointer) != FDT_MAGIC) + return; + +-- +2.17.1 \ No newline at end of file diff --git a/recipes-bsp/u-boot/u-boot_%.bbappend b/recipes-bsp/u-boot/u-boot_%.bbappend index e1d71732..265e8fa5 100644 --- a/recipes-bsp/u-boot/u-boot_%.bbappend +++ b/recipes-bsp/u-boot/u-boot_%.bbappend @@ -1 +1,11 @@ require u-boot-ota.inc + +SRCREV = "f9a043e55c78d894db01006ce442387b758e53ad" + +SRC_URI = "git://github.com/commontorizon/u-boot.git;protocol=https;branch=kirkstone" + +FILESEXTRAPATHS:prepend := "${THISDIR}/u-boot:" + +SRC_URI:append:rpi = " file://0001-rpi-always-set-fdt_addr-with-firmware-provided-FDT-address.patch" + +DEPENDS:append:rpi = " u-boot-default-script" diff --git a/recipes-connectivity/networkd-static-conf/files/20-wired-static.network b/recipes-connectivity/networkd-static-conf/files/20-wired-static.network deleted file mode 100644 index 8c663089..00000000 --- a/recipes-connectivity/networkd-static-conf/files/20-wired-static.network +++ /dev/null @@ -1,7 +0,0 @@ -[Match] -@MATCH_DIRECTIVE@ - -[Network] -Address=192.168.7.2 -Netmask=255.255.255.0 -Gateway=192.168.7.1 diff --git a/recipes-connectivity/networkd-static-conf/networkd-static-conf.bb b/recipes-connectivity/networkd-static-conf/networkd-static-conf.bb deleted file mode 100644 index ea37f0d4..00000000 --- a/recipes-connectivity/networkd-static-conf/networkd-static-conf.bb +++ /dev/null @@ -1,27 +0,0 @@ -SUMMARY = "systemd-networkd config to setup wired interface with static IP" -DESCRIPTION = "Provides static network configuration for wired interfaces \ -through systemd-networkd" -LICENSE = "MPL-2.0" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MPL-2.0;md5=815ca599c9df247a0c7f619bab123dad" - -RPROVIDES:${PN} = "network-configuration" - -SRC_URI = "file://20-wired-static.network" - -RCONFLICTS:${PN} = "networkmanager" - -S = "${WORKDIR}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" - -FILES:${PN} = " \ - ${systemd_unitdir}/network/* \ - " - -DEV_MATCH_DIRECTIVE ?= "Name=en*" - -do_install() { - install -d ${D}/${systemd_unitdir}/network - install -m 0644 ${WORKDIR}/20-wired-static.network ${D}${systemd_unitdir}/network - sed -i -e 's|@MATCH_DIRECTIVE@|${DEV_MATCH_DIRECTIVE}|g' ${D}${systemd_unitdir}/network/20-wired-static.network -} diff --git a/recipes-connectivity/networkmanager/networkmanager/genericx86-64/network.nmconnection.in b/recipes-connectivity/networkmanager/networkmanager/genericx86-64/network.nmconnection.in new file mode 100644 index 00000000..8b53ff8e --- /dev/null +++ b/recipes-connectivity/networkmanager/networkmanager/genericx86-64/network.nmconnection.in @@ -0,0 +1,17 @@ +[connection] +id=network@NET_NUM@ +type=ethernet +interface-name=@NET_NAME@@NET_NUM@s1 + +[ethernet] + +[ipv4] +address1=192.168.7.2/32,192.168.7.1 +dns=1.1.1.1;8.8.8.8; +method=manual + +[ipv6] +addr-gen-mode=stable-privacy +method=auto + +[proxy] diff --git a/recipes-connectivity/networkmanager/networkmanager/network.nmconnection.in b/recipes-connectivity/networkmanager/networkmanager/network.nmconnection.in index 520f04cb..17115607 100644 --- a/recipes-connectivity/networkmanager/networkmanager/network.nmconnection.in +++ b/recipes-connectivity/networkmanager/networkmanager/network.nmconnection.in @@ -1,4 +1,4 @@ [connection] id=network@NET_NUM@ type=ethernet -interface-name=ethernet@NET_NUM@ +interface-name=@NET_NAME@@NET_NUM@ diff --git a/recipes-connectivity/networkmanager/networkmanager/qemuarm64/network.nmconnection.in b/recipes-connectivity/networkmanager/networkmanager/qemuarm64/network.nmconnection.in new file mode 100644 index 00000000..8b53ff8e --- /dev/null +++ b/recipes-connectivity/networkmanager/networkmanager/qemuarm64/network.nmconnection.in @@ -0,0 +1,17 @@ +[connection] +id=network@NET_NUM@ +type=ethernet +interface-name=@NET_NAME@@NET_NUM@s1 + +[ethernet] + +[ipv4] +address1=192.168.7.2/32,192.168.7.1 +dns=1.1.1.1;8.8.8.8; +method=manual + +[ipv6] +addr-gen-mode=stable-privacy +method=auto + +[proxy] diff --git a/recipes-connectivity/networkmanager/networkmanager_%.bbappend b/recipes-connectivity/networkmanager/networkmanager_%.bbappend index f62423ae..f5690d9c 100644 --- a/recipes-connectivity/networkmanager/networkmanager_%.bbappend +++ b/recipes-connectivity/networkmanager/networkmanager_%.bbappend @@ -12,18 +12,18 @@ DEPENDS += "libedit" PACKAGECONFIG:remove = "dnsmasq" PACKAGECONFIG:append = " modemmanager ppp" -RPROVIDES:${PN} = "network-configuration" + +NET_NAME = "ethernet" +NET_NUMS = "0 1" do_install:append() { install -m 0600 ${WORKDIR}/toradex-nmconnection.conf ${D}${nonarch_libdir}/NetworkManager/conf.d - sed -e "s/@NET_NUM@/0/g" \ - ${WORKDIR}/network.nmconnection.in \ - > ${D}${sysconfdir}/NetworkManager/system-connections/network0.nmconnection - - sed -e "s/@NET_NUM@/1/g" \ - ${WORKDIR}/network.nmconnection.in \ - > ${D}${sysconfdir}/NetworkManager/system-connections/network1.nmconnection + for netnum in ${NET_NUMS}; do + sed -e "s/@NET_NAME@/${NET_NAME}/g" -e "s/@NET_NUM@/$netnum/g" \ + ${WORKDIR}/network.nmconnection.in \ + > ${D}${sysconfdir}/NetworkManager/system-connections/network"$netnum".nmconnection + done chmod 0600 ${D}${sysconfdir}/NetworkManager/system-connections/network?.nmconnection } diff --git a/recipes-containers/aardvark-dns/aardvark-dns-crates.inc b/recipes-containers/aardvark-dns/aardvark-dns-crates.inc new file mode 100644 index 00000000..85be064b --- /dev/null +++ b/recipes-containers/aardvark-dns/aardvark-dns-crates.inc @@ -0,0 +1,278 @@ +# Autogenerated with 'bitbake -c update_crates aardvark-dns' + +# from Cargo.lock +SRC_URI += " \ + crate://crates.io/addr2line/0.21.0 \ + crate://crates.io/adler/1.0.2 \ + crate://crates.io/android-tzdata/0.1.1 \ + crate://crates.io/android_system_properties/0.1.5 \ + crate://crates.io/anstream/0.3.2 \ + crate://crates.io/anstyle/1.0.4 \ + crate://crates.io/anstyle-parse/0.2.2 \ + crate://crates.io/anstyle-query/1.0.0 \ + crate://crates.io/anstyle-wincon/1.0.2 \ + crate://crates.io/anyhow/1.0.75 \ + crate://crates.io/async-broadcast/0.6.0 \ + crate://crates.io/async-trait/0.1.74 \ + crate://crates.io/autocfg/1.1.0 \ + crate://crates.io/backtrace/0.3.69 \ + crate://crates.io/bitflags/2.4.1 \ + crate://crates.io/bumpalo/3.14.0 \ + crate://crates.io/bytes/1.5.0 \ + crate://crates.io/cc/1.0.83 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/chrono/0.4.31 \ + crate://crates.io/clap/4.3.24 \ + crate://crates.io/clap_builder/4.3.24 \ + crate://crates.io/clap_derive/4.3.12 \ + crate://crates.io/clap_lex/0.5.1 \ + crate://crates.io/colorchoice/1.0.0 \ + crate://crates.io/concurrent-queue/2.3.0 \ + crate://crates.io/core-foundation-sys/0.8.4 \ + crate://crates.io/crossbeam-utils/0.8.16 \ + crate://crates.io/data-encoding/2.4.0 \ + crate://crates.io/deranged/0.3.9 \ + crate://crates.io/endian-type/0.1.2 \ + crate://crates.io/enum-as-inner/0.6.0 \ + crate://crates.io/errno/0.3.7 \ + crate://crates.io/error-chain/0.12.4 \ + crate://crates.io/event-listener/3.1.0 \ + crate://crates.io/event-listener-strategy/0.1.0 \ + crate://crates.io/form_urlencoded/1.2.0 \ + crate://crates.io/futures-channel/0.3.29 \ + crate://crates.io/futures-core/0.3.29 \ + crate://crates.io/futures-io/0.3.29 \ + crate://crates.io/futures-sink/0.3.29 \ + crate://crates.io/futures-task/0.3.29 \ + crate://crates.io/futures-util/0.3.29 \ + crate://crates.io/getrandom/0.2.11 \ + crate://crates.io/gimli/0.28.0 \ + crate://crates.io/heck/0.4.1 \ + crate://crates.io/hermit-abi/0.3.3 \ + crate://crates.io/hickory-client/0.24.0 \ + crate://crates.io/hickory-proto/0.24.0 \ + crate://crates.io/hickory-server/0.24.0 \ + crate://crates.io/hostname/0.3.1 \ + crate://crates.io/iana-time-zone/0.1.58 \ + crate://crates.io/iana-time-zone-haiku/0.1.2 \ + crate://crates.io/idna/0.4.0 \ + crate://crates.io/ipnet/2.9.0 \ + crate://crates.io/is-terminal/0.4.9 \ + crate://crates.io/itoa/1.0.9 \ + crate://crates.io/js-sys/0.3.65 \ + crate://crates.io/libc/0.2.150 \ + crate://crates.io/linux-raw-sys/0.4.11 \ + crate://crates.io/log/0.4.20 \ + crate://crates.io/match_cfg/0.1.0 \ + crate://crates.io/memchr/2.6.4 \ + crate://crates.io/miniz_oxide/0.7.1 \ + crate://crates.io/mio/0.8.9 \ + crate://crates.io/nibble_vec/0.1.0 \ + crate://crates.io/nix/0.27.1 \ + crate://crates.io/num-traits/0.2.17 \ + crate://crates.io/num_cpus/1.16.0 \ + crate://crates.io/num_threads/0.1.6 \ + crate://crates.io/object/0.32.1 \ + crate://crates.io/once_cell/1.18.0 \ + crate://crates.io/parking/2.2.0 \ + crate://crates.io/percent-encoding/2.3.0 \ + crate://crates.io/pin-project-lite/0.2.13 \ + crate://crates.io/pin-utils/0.1.0 \ + crate://crates.io/powerfmt/0.2.0 \ + crate://crates.io/ppv-lite86/0.2.17 \ + crate://crates.io/proc-macro2/1.0.69 \ + crate://crates.io/quick-error/1.2.3 \ + crate://crates.io/quote/1.0.33 \ + crate://crates.io/radix_trie/0.2.1 \ + crate://crates.io/rand/0.8.5 \ + crate://crates.io/rand_chacha/0.3.1 \ + crate://crates.io/rand_core/0.6.4 \ + crate://crates.io/resolv-conf/0.7.0 \ + crate://crates.io/rustc-demangle/0.1.23 \ + crate://crates.io/rustix/0.38.25 \ + crate://crates.io/serde/1.0.192 \ + crate://crates.io/serde_derive/1.0.192 \ + crate://crates.io/signal-hook/0.3.17 \ + crate://crates.io/signal-hook-registry/1.4.1 \ + crate://crates.io/slab/0.4.9 \ + crate://crates.io/smallvec/1.11.2 \ + crate://crates.io/socket2/0.5.5 \ + crate://crates.io/strsim/0.10.0 \ + crate://crates.io/syn/2.0.39 \ + crate://crates.io/syslog/6.1.0 \ + crate://crates.io/thiserror/1.0.50 \ + crate://crates.io/thiserror-impl/1.0.50 \ + crate://crates.io/time/0.3.30 \ + crate://crates.io/time-core/0.1.2 \ + crate://crates.io/time-macros/0.2.15 \ + crate://crates.io/tinyvec/1.6.0 \ + crate://crates.io/tinyvec_macros/0.1.1 \ + crate://crates.io/tokio/1.34.0 \ + crate://crates.io/tokio-macros/2.2.0 \ + crate://crates.io/tokio-util/0.7.10 \ + crate://crates.io/tracing/0.1.40 \ + crate://crates.io/tracing-attributes/0.1.27 \ + crate://crates.io/tracing-core/0.1.32 \ + crate://crates.io/unicode-bidi/0.3.13 \ + crate://crates.io/unicode-ident/1.0.12 \ + crate://crates.io/unicode-normalization/0.1.22 \ + crate://crates.io/url/2.4.1 \ + crate://crates.io/utf8parse/0.2.1 \ + crate://crates.io/version_check/0.9.4 \ + crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ + crate://crates.io/wasm-bindgen/0.2.88 \ + crate://crates.io/wasm-bindgen-backend/0.2.88 \ + crate://crates.io/wasm-bindgen-macro/0.2.88 \ + crate://crates.io/wasm-bindgen-macro-support/0.2.88 \ + crate://crates.io/wasm-bindgen-shared/0.2.88 \ + crate://crates.io/winapi/0.3.9 \ + crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ + crate://crates.io/windows-core/0.51.1 \ + crate://crates.io/windows-sys/0.48.0 \ + crate://crates.io/windows-targets/0.48.5 \ + crate://crates.io/windows_aarch64_gnullvm/0.48.5 \ + crate://crates.io/windows_aarch64_msvc/0.48.5 \ + crate://crates.io/windows_i686_gnu/0.48.5 \ + crate://crates.io/windows_i686_msvc/0.48.5 \ + crate://crates.io/windows_x86_64_gnu/0.48.5 \ + crate://crates.io/windows_x86_64_gnullvm/0.48.5 \ + crate://crates.io/windows_x86_64_msvc/0.48.5 \ +" + +SRC_URI[addr2line-0.21.0.sha256sum] = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +SRC_URI[adler-1.0.2.sha256sum] = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +SRC_URI[android-tzdata-0.1.1.sha256sum] = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +SRC_URI[android_system_properties-0.1.5.sha256sum] = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +SRC_URI[anstream-0.3.2.sha256sum] = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +SRC_URI[anstyle-1.0.4.sha256sum] = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +SRC_URI[anstyle-parse-0.2.2.sha256sum] = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +SRC_URI[anstyle-query-1.0.0.sha256sum] = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +SRC_URI[anstyle-wincon-1.0.2.sha256sum] = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +SRC_URI[anyhow-1.0.75.sha256sum] = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +SRC_URI[async-broadcast-0.6.0.sha256sum] = "334d75cf09b33bede6cbc20e52515853ae7bee3d4eadd9540e13ce92af983d34" +SRC_URI[async-trait-0.1.74.sha256sum] = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +SRC_URI[backtrace-0.3.69.sha256sum] = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +SRC_URI[bitflags-2.4.1.sha256sum] = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +SRC_URI[bumpalo-3.14.0.sha256sum] = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +SRC_URI[bytes-1.5.0.sha256sum] = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +SRC_URI[cc-1.0.83.sha256sum] = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +SRC_URI[chrono-0.4.31.sha256sum] = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +SRC_URI[clap-4.3.24.sha256sum] = "fb690e81c7840c0d7aade59f242ea3b41b9bc27bcd5997890e7702ae4b32e487" +SRC_URI[clap_builder-4.3.24.sha256sum] = "5ed2e96bc16d8d740f6f48d663eddf4b8a0983e79210fd55479b7bcd0a69860e" +SRC_URI[clap_derive-4.3.12.sha256sum] = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +SRC_URI[clap_lex-0.5.1.sha256sum] = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" +SRC_URI[colorchoice-1.0.0.sha256sum] = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +SRC_URI[concurrent-queue-2.3.0.sha256sum] = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +SRC_URI[core-foundation-sys-0.8.4.sha256sum] = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +SRC_URI[crossbeam-utils-0.8.16.sha256sum] = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +SRC_URI[data-encoding-2.4.0.sha256sum] = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +SRC_URI[deranged-0.3.9.sha256sum] = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +SRC_URI[endian-type-0.1.2.sha256sum] = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" +SRC_URI[enum-as-inner-0.6.0.sha256sum] = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +SRC_URI[errno-0.3.7.sha256sum] = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +SRC_URI[error-chain-0.12.4.sha256sum] = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" +SRC_URI[event-listener-3.1.0.sha256sum] = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +SRC_URI[event-listener-strategy-0.1.0.sha256sum] = "15c97b4e30ea7e4b7e7b429d6e2d8510433ba8cee4e70dfb3243794e539d29fd" +SRC_URI[form_urlencoded-1.2.0.sha256sum] = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +SRC_URI[futures-channel-0.3.29.sha256sum] = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +SRC_URI[futures-core-0.3.29.sha256sum] = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +SRC_URI[futures-io-0.3.29.sha256sum] = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +SRC_URI[futures-sink-0.3.29.sha256sum] = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +SRC_URI[futures-task-0.3.29.sha256sum] = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +SRC_URI[futures-util-0.3.29.sha256sum] = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +SRC_URI[getrandom-0.2.11.sha256sum] = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +SRC_URI[gimli-0.28.0.sha256sum] = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +SRC_URI[heck-0.4.1.sha256sum] = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +SRC_URI[hermit-abi-0.3.3.sha256sum] = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +SRC_URI[hickory-client-0.24.0.sha256sum] = "7f3e08124cf0ddda93b1186d4af73599de401f3b52f14cd9aaa719049379462e" +SRC_URI[hickory-proto-0.24.0.sha256sum] = "091a6fbccf4860009355e3efc52ff4acf37a63489aad7435372d44ceeb6fbbcf" +SRC_URI[hickory-server-0.24.0.sha256sum] = "4fbbb45bc4dcb456445732c705e3cfdc7393b8bcae5c36ecec36b9d76bd67cb5" +SRC_URI[hostname-0.3.1.sha256sum] = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" +SRC_URI[iana-time-zone-0.1.58.sha256sum] = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +SRC_URI[iana-time-zone-haiku-0.1.2.sha256sum] = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +SRC_URI[idna-0.4.0.sha256sum] = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +SRC_URI[ipnet-2.9.0.sha256sum] = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +SRC_URI[is-terminal-0.4.9.sha256sum] = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +SRC_URI[itoa-1.0.9.sha256sum] = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +SRC_URI[js-sys-0.3.65.sha256sum] = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +SRC_URI[libc-0.2.150.sha256sum] = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +SRC_URI[linux-raw-sys-0.4.11.sha256sum] = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +SRC_URI[log-0.4.20.sha256sum] = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +SRC_URI[match_cfg-0.1.0.sha256sum] = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" +SRC_URI[memchr-2.6.4.sha256sum] = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +SRC_URI[miniz_oxide-0.7.1.sha256sum] = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +SRC_URI[mio-0.8.9.sha256sum] = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +SRC_URI[nibble_vec-0.1.0.sha256sum] = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +SRC_URI[nix-0.27.1.sha256sum] = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +SRC_URI[num-traits-0.2.17.sha256sum] = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +SRC_URI[num_cpus-1.16.0.sha256sum] = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +SRC_URI[num_threads-0.1.6.sha256sum] = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +SRC_URI[object-0.32.1.sha256sum] = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +SRC_URI[once_cell-1.18.0.sha256sum] = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +SRC_URI[parking-2.2.0.sha256sum] = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +SRC_URI[percent-encoding-2.3.0.sha256sum] = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +SRC_URI[pin-project-lite-0.2.13.sha256sum] = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +SRC_URI[pin-utils-0.1.0.sha256sum] = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +SRC_URI[powerfmt-0.2.0.sha256sum] = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +SRC_URI[ppv-lite86-0.2.17.sha256sum] = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +SRC_URI[proc-macro2-1.0.69.sha256sum] = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +SRC_URI[quick-error-1.2.3.sha256sum] = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" +SRC_URI[quote-1.0.33.sha256sum] = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +SRC_URI[radix_trie-0.2.1.sha256sum] = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +SRC_URI[rand-0.8.5.sha256sum] = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +SRC_URI[rand_chacha-0.3.1.sha256sum] = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +SRC_URI[rand_core-0.6.4.sha256sum] = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +SRC_URI[resolv-conf-0.7.0.sha256sum] = "52e44394d2086d010551b14b53b1f24e31647570cd1deb0379e2c21b329aba00" +SRC_URI[rustc-demangle-0.1.23.sha256sum] = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +SRC_URI[rustix-0.38.25.sha256sum] = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +SRC_URI[serde-1.0.192.sha256sum] = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +SRC_URI[serde_derive-1.0.192.sha256sum] = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +SRC_URI[signal-hook-0.3.17.sha256sum] = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" +SRC_URI[signal-hook-registry-1.4.1.sha256sum] = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +SRC_URI[slab-0.4.9.sha256sum] = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +SRC_URI[smallvec-1.11.2.sha256sum] = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +SRC_URI[socket2-0.5.5.sha256sum] = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +SRC_URI[strsim-0.10.0.sha256sum] = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +SRC_URI[syn-2.0.39.sha256sum] = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +SRC_URI[syslog-6.1.0.sha256sum] = "7434e95bcccce1215d30f4bf84fe8c00e8de1b9be4fb736d747ca53d36e7f96f" +SRC_URI[thiserror-1.0.50.sha256sum] = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +SRC_URI[thiserror-impl-1.0.50.sha256sum] = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +SRC_URI[time-0.3.30.sha256sum] = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" +SRC_URI[time-core-0.1.2.sha256sum] = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +SRC_URI[time-macros-0.2.15.sha256sum] = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" +SRC_URI[tinyvec-1.6.0.sha256sum] = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +SRC_URI[tinyvec_macros-0.1.1.sha256sum] = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +SRC_URI[tokio-1.34.0.sha256sum] = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +SRC_URI[tokio-macros-2.2.0.sha256sum] = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +SRC_URI[tokio-util-0.7.10.sha256sum] = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +SRC_URI[tracing-0.1.40.sha256sum] = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +SRC_URI[tracing-attributes-0.1.27.sha256sum] = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +SRC_URI[tracing-core-0.1.32.sha256sum] = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +SRC_URI[unicode-bidi-0.3.13.sha256sum] = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +SRC_URI[unicode-ident-1.0.12.sha256sum] = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +SRC_URI[unicode-normalization-0.1.22.sha256sum] = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +SRC_URI[url-2.4.1.sha256sum] = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +SRC_URI[utf8parse-0.2.1.sha256sum] = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +SRC_URI[wasm-bindgen-0.2.88.sha256sum] = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +SRC_URI[wasm-bindgen-backend-0.2.88.sha256sum] = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +SRC_URI[wasm-bindgen-macro-0.2.88.sha256sum] = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +SRC_URI[wasm-bindgen-macro-support-0.2.88.sha256sum] = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +SRC_URI[wasm-bindgen-shared-0.2.88.sha256sum] = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +SRC_URI[windows-core-0.51.1.sha256sum] = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +SRC_URI[windows-sys-0.48.0.sha256sum] = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +SRC_URI[windows-targets-0.48.5.sha256sum] = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +SRC_URI[windows_aarch64_gnullvm-0.48.5.sha256sum] = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +SRC_URI[windows_aarch64_msvc-0.48.5.sha256sum] = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +SRC_URI[windows_i686_gnu-0.48.5.sha256sum] = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +SRC_URI[windows_i686_msvc-0.48.5.sha256sum] = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +SRC_URI[windows_x86_64_gnu-0.48.5.sha256sum] = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +SRC_URI[windows_x86_64_gnullvm-0.48.5.sha256sum] = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +SRC_URI[windows_x86_64_msvc-0.48.5.sha256sum] = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" diff --git a/recipes-containers/aardvark-dns/aardvark-dns_1.9.0.bb b/recipes-containers/aardvark-dns/aardvark-dns_1.9.0.bb new file mode 100644 index 00000000..e7e6bfbf --- /dev/null +++ b/recipes-containers/aardvark-dns/aardvark-dns_1.9.0.bb @@ -0,0 +1,43 @@ +SUMMARY = "A container-focused DNS server" +HOMEPAGE = "https://github.com/containers/aardvark-dns" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRCREV = "e4785bd5430e7f3006bb537e95c2a0f9311f85bc" + +# It is possible to fetch the source using the crate fetcher instead: +#SRC_URI = "crate://crates.io/${BPN}/${PV}" +SRC_URI = "git://github.com/containers/aardvark-dns;protocol=https;nobranch=1 \ + file://run-ptest" +require ${BPN}-crates.inc + +S = "${WORKDIR}/git" + +inherit cargo cargo-update-recipe-crates features_check ptest + +# Cargo installs the binary to bin so move it to where podman expects it +do_install:append() { + install -d ${D}${libexecdir} + mv ${D}${bindir} ${D}${libexecdir}/podman +} + +do_install_ptest() { + cp -r ${S}/test ${D}${PTEST_PATH} +} + +# rdepends on slirp4netns +REQUIRED_DISTRO_FEATURES ?= "seccomp" + +RDEPENDS:${PN}-ptest += " \ + bash \ + bats \ + bind-utils \ + coreutils \ + dbus-daemon-proxy \ + ipcalc \ + iproute2 \ + jq \ + slirp4netns \ + util-linux-unshare \ +" diff --git a/recipes-containers/aardvark-dns/files/run-ptest b/recipes-containers/aardvark-dns/files/run-ptest new file mode 100644 index 00000000..b33d8fd4 --- /dev/null +++ b/recipes-containers/aardvark-dns/files/run-ptest @@ -0,0 +1,3 @@ +#!/bin/bash + +NETAVARK=/usr/libexec/podman/netavark AARDVARK=/usr/libexec/podman/aardvark-dns bats ./test/ diff --git a/recipes-containers/container-host-config/container-host-config.bbappend b/recipes-containers/container-host-config/container-host-config.bbappend index e546db00..a81d7c5c 100644 --- a/recipes-containers/container-host-config/container-host-config.bbappend +++ b/recipes-containers/container-host-config/container-host-config.bbappend @@ -1,3 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" + # A list of registry strings, for instance: # PODMAN_DEFAULT_REGISTRIES = "docker.io registry.fedoraproject.org quay.io registry.access.redhat.com registry.centos.org" # @@ -5,6 +7,8 @@ # in ${sysconfdir}/containers/registries.conf. PODMAN_DEFAULT_REGISTRIES = "docker.io" +PACKAGECONFIG[transient-store] = "" + do_install:append() { if [ -n "${PODMAN_DEFAULT_REGISTRIES}" ]; then registries="registries = [" @@ -22,4 +26,9 @@ do_install:append() { sed -i -e "/^\[registries.search\]/{n;d}" ${D}${sysconfdir}/containers/registries.conf sed -i -e "/^\[registries.search\]/a $registries" ${D}${sysconfdir}/containers/registries.conf fi + + if ${@bb.utils.contains('PACKAGECONFIG', 'transient-store', 'true', 'false', d)}; then + # Enable transient container storage + sed -i -e "s/^.*transient_store.*=.*$/transient_store = true/" ${D}${sysconfdir}/containers/storage.conf + fi } diff --git a/recipes-containers/container-host-config/container-host-config/storage.conf b/recipes-containers/container-host-config/container-host-config/storage.conf new file mode 100644 index 00000000..cb4525f2 --- /dev/null +++ b/recipes-containers/container-host-config/container-host-config/storage.conf @@ -0,0 +1,243 @@ +# This file is the configuration file for all tools +# that use the containers/storage library. The storage.conf file +# overrides all other storage.conf files. Container engines using the +# container/storage library do not inherit fields from other storage.conf +# files. +# +# Note: The storage.conf file overrides other storage.conf files based on this precedence: +# /usr/containers/storage.conf +# /etc/containers/storage.conf +# $HOME/.config/containers/storage.conf +# $XDG_CONFIG_HOME/containers/storage.conf (If XDG_CONFIG_HOME is set) +# See man 5 containers-storage.conf for more information +# The "container storage" table contains all of the server options. +[storage] + +# Default Storage Driver, Must be set for proper operation. +driver = "overlay" + +# Temporary storage location +runroot = "/run/containers/storage" + +# Primary Read/Write location of container storage +# When changing the graphroot location on an SELINUX system, you must +# ensure the labeling matches the default locations labels with the +# following commands: +# semanage fcontext -a -e /var/lib/containers/storage /NEWSTORAGEPATH +# restorecon -R -v /NEWSTORAGEPATH +graphroot = "/var/lib/containers/storage" + +# Optional alternate location of image store if a location separate from the +# container store is required. If set, it must be different than graphroot. +# imagestore = "" + + +# Storage path for rootless users +# +# rootless_storage_path = "$HOME/.local/share/containers/storage" + +# Transient store mode makes all container metadata be saved in temporary storage +# (i.e. runroot above). This is faster, but doesn't persist across reboots. +# Additional garbage collection must also be performed at boot-time, so this +# option should remain disabled in most configurations. +# transient_store = true + +[storage.options] +# Storage options to be passed to underlying storage drivers + +# AdditionalImageStores is used to pass paths to additional Read/Only image stores +# Must be comma separated list. +additionalimagestores = [ +] + +# Allows specification of how storage is populated when pulling images. This +# option can speed the pulling process of images compressed with format +# zstd:chunked. Containers/storage looks for files within images that are being +# pulled from a container registry that were previously pulled to the host. It +# can copy or create a hard link to the existing file when it finds them, +# eliminating the need to pull them from the container registry. These options +# can deduplicate pulling of content, disk storage of content and can allow the +# kernel to use less memory when running containers. + +# containers/storage supports three keys +# * enable_partial_images="true" | "false" +# Tells containers/storage to look for files previously pulled in storage +# rather then always pulling them from the container registry. +# * use_hard_links = "false" | "true" +# Tells containers/storage to use hard links rather then create new files in +# the image, if an identical file already existed in storage. +# * ostree_repos = "" +# Tells containers/storage where an ostree repository exists that might have +# previously pulled content which can be used when attempting to avoid +# pulling content from the container registry +pull_options = {enable_partial_images = "false", use_hard_links = "false", ostree_repos=""} + +# Remap-UIDs/GIDs is the mapping from UIDs/GIDs as they should appear inside of +# a container, to the UIDs/GIDs as they should appear outside of the container, +# and the length of the range of UIDs/GIDs. Additional mapped sets can be +# listed and will be heeded by libraries, but there are limits to the number of +# mappings which the kernel will allow when you later attempt to run a +# container. +# +# remap-uids = "0:1668442479:65536" +# remap-gids = "0:1668442479:65536" + +# Remap-User/Group is a user name which can be used to look up one or more UID/GID +# ranges in the /etc/subuid or /etc/subgid file. Mappings are set up starting +# with an in-container ID of 0 and then a host-level ID taken from the lowest +# range that matches the specified name, and using the length of that range. +# Additional ranges are then assigned, using the ranges which specify the +# lowest host-level IDs first, to the lowest not-yet-mapped in-container ID, +# until all of the entries have been used for maps. This setting overrides the +# Remap-UIDs/GIDs setting. +# +# remap-user = "containers" +# remap-group = "containers" + +# Root-auto-userns-user is a user name which can be used to look up one or more UID/GID +# ranges in the /etc/subuid and /etc/subgid file. These ranges will be partitioned +# to containers configured to create automatically a user namespace. Containers +# configured to automatically create a user namespace can still overlap with containers +# having an explicit mapping set. +# This setting is ignored when running as rootless. +# root-auto-userns-user = "storage" +# +# Auto-userns-min-size is the minimum size for a user namespace created automatically. +# auto-userns-min-size=1024 +# +# Auto-userns-max-size is the maximum size for a user namespace created automatically. +# auto-userns-max-size=65536 + +[storage.options.overlay] +# ignore_chown_errors can be set to allow a non privileged user running with +# a single UID within a user namespace to run containers. The user can pull +# and use any image even those with multiple uids. Note multiple UIDs will be +# squashed down to the default uid in the container. These images will have no +# separation between the users in the container. Only supported for the overlay +# and vfs drivers. +#ignore_chown_errors = "false" + +# Inodes is used to set a maximum inodes of the container image. +# inodes = "" + +# Path to an helper program to use for mounting the file system instead of mounting it +# directly. +#mount_program = "/usr/bin/fuse-overlayfs" + +# mountopt specifies comma separated list of extra mount options +mountopt = "nodev" + +# Set to skip a PRIVATE bind mount on the storage home directory. +# skip_mount_home = "false" + +# Size is used to set a maximum size of the container image. +# size = "" + +# ForceMask specifies the permissions mask that is used for new files and +# directories. +# +# The values "shared" and "private" are accepted. +# Octal permission masks are also accepted. +# +# "": No value specified. +# All files/directories, get set with the permissions identified within the +# image. +# "private": it is equivalent to 0700. +# All files/directories get set with 0700 permissions. The owner has rwx +# access to the files. No other users on the system can access the files. +# This setting could be used with networked based homedirs. +# "shared": it is equivalent to 0755. +# The owner has rwx access to the files and everyone else can read, access +# and execute them. This setting is useful for sharing containers storage +# with other users. For instance have a storage owned by root but shared +# to rootless users as an additional store. +# NOTE: All files within the image are made readable and executable by any +# user on the system. Even /etc/shadow within your image is now readable by +# any user. +# +# OCTAL: Users can experiment with other OCTAL Permissions. +# +# Note: The force_mask Flag is an experimental feature, it could change in the +# future. When "force_mask" is set the original permission mask is stored in +# the "user.containers.override_stat" xattr and the "mount_program" option must +# be specified. Mount programs like "/usr/bin/fuse-overlayfs" present the +# extended attribute permissions to processes within containers rather than the +# "force_mask" permissions. +# +# force_mask = "" + +[storage.options.thinpool] +# Storage Options for thinpool + +# autoextend_percent determines the amount by which pool needs to be +# grown. This is specified in terms of % of pool size. So a value of 20 means +# that when threshold is hit, pool will be grown by 20% of existing +# pool size. +# autoextend_percent = "20" + +# autoextend_threshold determines the pool extension threshold in terms +# of percentage of pool size. For example, if threshold is 60, that means when +# pool is 60% full, threshold has been hit. +# autoextend_threshold = "80" + +# basesize specifies the size to use when creating the base device, which +# limits the size of images and containers. +# basesize = "10G" + +# blocksize specifies a custom blocksize to use for the thin pool. +# blocksize="64k" + +# directlvm_device specifies a custom block storage device to use for the +# thin pool. Required if you setup devicemapper. +# directlvm_device = "" + +# directlvm_device_force wipes device even if device already has a filesystem. +# directlvm_device_force = "True" + +# fs specifies the filesystem type to use for the base device. +# fs="xfs" + +# log_level sets the log level of devicemapper. +# 0: LogLevelSuppress 0 (Default) +# 2: LogLevelFatal +# 3: LogLevelErr +# 4: LogLevelWarn +# 5: LogLevelNotice +# 6: LogLevelInfo +# 7: LogLevelDebug +# log_level = "7" + +# min_free_space specifies the min free space percent in a thin pool require for +# new device creation to succeed. Valid values are from 0% - 99%. +# Value 0% disables +# min_free_space = "10%" + +# mkfsarg specifies extra mkfs arguments to be used when creating the base +# device. +# mkfsarg = "" + +# metadata_size is used to set the `pvcreate --metadatasize` options when +# creating thin devices. Default is 128k +# metadata_size = "" + +# Size is used to set a maximum size of the container image. +# size = "" + +# use_deferred_removal marks devicemapper block device for deferred removal. +# If the thinpool is in use when the driver attempts to remove it, the driver +# tells the kernel to remove it as soon as possible. Note this does not free +# up the disk space, use deferred deletion to fully remove the thinpool. +# use_deferred_removal = "True" + +# use_deferred_deletion marks thinpool device for deferred deletion. +# If the device is busy when the driver attempts to delete it, the driver +# will attempt to delete device every 30 seconds until successful. +# If the program using the driver exits, the driver will continue attempting +# to cleanup the next time the driver is used. Deferred deletion permanently +# deletes the device and all data stored in device will be lost. +# use_deferred_deletion = "True" + +# xfs_nospace_max_retries specifies the maximum number of retries XFS should +# attempt to complete IO when ENOSPC (no space) error is returned by +# underlying storage device. +# xfs_nospace_max_retries = "0" diff --git a/recipes-containers/crun/crun_git.bb b/recipes-containers/crun/crun_git.bb new file mode 100644 index 00000000..77126a1c --- /dev/null +++ b/recipes-containers/crun/crun_git.bb @@ -0,0 +1,45 @@ +DESCRIPTION = "A fast and low-memory footprint OCI Container Runtime fully written in C." +LICENSE = "GPL-2.0-only" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" +PRIORITY = "optional" + +SRCREV_crun = "90b21ddd007f0306952b8b38aa66ddee58afffe4" +SRCREV_libocispec = "19c05670c37a42c217caa7b141bcaada7867cc15" +SRCREV_ispec = "9615142d016838b5dfe7453f80af0be74feb5c7c" +SRCREV_rspec = "720792f25ae6e9ee6b1332db698f37659e69ce8d" +SRCREV_yajl = "f344d21280c3e4094919fd318bc5ce75da91fc06" + +SRCREV_FORMAT = "crun_rspec" +SRC_URI = "git://github.com/containers/crun.git;branch=main;name=crun;protocol=https \ + git://github.com/containers/libocispec.git;branch=main;name=libocispec;destsuffix=git/libocispec;protocol=https \ + git://github.com/opencontainers/runtime-spec.git;branch=main;name=rspec;destsuffix=git/libocispec/runtime-spec;protocol=https \ + git://github.com/opencontainers/image-spec.git;branch=main;name=ispec;destsuffix=git/libocispec/image-spec;protocol=https \ + git://github.com/containers/yajl.git;branch=main;name=yajl;destsuffix=git/libocispec/yajl;protocol=https \ + " + +PV = "v1.12+git${SRCREV_crun}" +S = "${WORKDIR}/git" + +REQUIRED_DISTRO_FEATURES ?= "systemd seccomp" + +inherit autotools-brokensep pkgconfig features_check + +PACKAGECONFIG ??= "" + +DEPENDS = "yajl libcap go-md2man-native m4-native" +# TODO: is there a packageconfig to turn this off ? +DEPENDS += "libseccomp" +DEPENDS += "systemd" +DEPENDS += "oci-image-spec oci-runtime-spec" +DEPENDS:append:libc-musl = " argp-standalone" + +do_configure:prepend () { + # extracted from autogen.sh in crun source. This avoids + # git submodule fetching. + mkdir -p m4 + autoreconf -fi +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} diff --git a/recipes-containers/docker-compose-up/files/docker-compose.service b/recipes-containers/docker-compose-up/files/docker-compose.service index 7c33b72d..8a153fa8 100644 --- a/recipes-containers/docker-compose-up/files/docker-compose.service +++ b/recipes-containers/docker-compose-up/files/docker-compose.service @@ -1,7 +1,8 @@ [Unit] Description=Docker Compose service with docker compose Requires=docker.service -After=docker.service +After=docker.service plymouth-quit.service +Wants=plymouth-quit.service ConditionPathExists=/var/sota/storage/docker-compose/docker-compose.yml ConditionPathExists=!/var/sota/storage/docker-compose/docker-compose.yml.tmp OnFailure=docker-integrity-checker.service diff --git a/recipes-containers/docker-compose/docker-compose_%.bbappend b/recipes-containers/docker-compose/docker-compose_%.bbappend index 9912a222..5450cda3 100644 --- a/recipes-containers/docker-compose/docker-compose_%.bbappend +++ b/recipes-containers/docker-compose/docker-compose_%.bbappend @@ -1,10 +1 @@ -FILESEXTRAPATHS:prepend := "${THISDIR}/files:" - -SRC_URI += "\ - file://docker-compose \ -" - -do_install:append() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/docker-compose ${D}${bindir} -} +PACKAGECONFIG:remove = "docker-plugin" diff --git a/recipes-containers/docker-compose/docker-compose_git.bb b/recipes-containers/docker-compose/docker-compose_git.bb index f6a2502a..c5af02e9 100644 --- a/recipes-containers/docker-compose/docker-compose_git.bb +++ b/recipes-containers/docker-compose/docker-compose_git.bb @@ -34,7 +34,8 @@ COMPATIBLE_HOST = "^(?!mips).*" do_configure[noexec] = "1" -PACKAGECONFIG ?= "" +PACKAGECONFIG ?= "docker-plugin" +PACKAGECONFIG[docker-plugin] = ",,,docker" include relocation.inc @@ -63,17 +64,15 @@ do_compile() { } do_install() { - #install -d "${D}${BIN_PREFIX}/bin" - #install -m 755 "${S}/src/import/bin/docker-compose" "${D}${BIN_PREFIX}/bin" - - # commonly installed to: /usr/lib/docker/cli-plugins/ - install -d "${D}${nonarch_libdir}/docker/cli-plugins/" - install -m 755 "${S}/src/import/bin/docker-compose" "${D}${nonarch_libdir}/docker/cli-plugins/" - + if ${@bb.utils.contains('PACKAGECONFIG', 'docker-plugin', 'true', 'false', d)}; then + install -d ${D}${nonarch_libdir}/docker/cli-plugins + install -m 755 ${S}/src/import/bin/docker-compose ${D}${nonarch_libdir}/docker/cli-plugins + else + install -d ${D}${bindir} + install -m 755 ${S}/src/import/bin/docker-compose ${D}${bindir} + fi } -RDEPENDS:${PN} += " docker" - FILES:${PN} += " ${nonarch_libdir}/docker/cli-plugins/" INHIBIT_PACKAGE_STRIP = "1" diff --git a/recipes-containers/docker-compose/files/docker-compose b/recipes-containers/docker-compose/files/docker-compose deleted file mode 100755 index 9a8ee83d..00000000 --- a/recipes-containers/docker-compose/files/docker-compose +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -exec docker compose "$@" diff --git a/recipes-containers/docker-integrity-checker/files/docker-integrity-checker.sh b/recipes-containers/docker-integrity-checker/files/docker-integrity-checker.sh index 3634597c..4e2ec153 100644 --- a/recipes-containers/docker-integrity-checker/files/docker-integrity-checker.sh +++ b/recipes-containers/docker-integrity-checker/files/docker-integrity-checker.sh @@ -2,6 +2,22 @@ echo "docker-compose service has failed." +VARIANT=`sed -n 's/VARIANT=\"\(.*\)\"/\1/p' /etc/os-release` +if [ "$VARIANT" = "Podman" ]; then + # detect graphroot from /etc/containers/storage.conf + GRAPH_ROOT=`sed -n "s/graphroot.*=.*\"\(.*\)\"/\1/p" /etc/containers/storage.conf` +elif [ "$VARIANT" = "Docker" ]; then + GRAPH_ROOT="/var/lib/docker" +else + echo "No container engine is installed on this filesystem." + exit 1 +fi + +if [ ! -d "$GRAPH_ROOT" ]; then + echo "Invalid graph root: $GRAPH_ROOT." + exit 1 +fi + if [ ! -f "/etc/docker/enable-integrity-checker" ]; then echo "Docker integrity checker is disabled. Create /etc/docker/enable-integrity-checker file to enable it." echo "Restarting docker-compose in 10 seconds..." @@ -100,19 +116,19 @@ elif [ "$RECOVERY_ATTEMPT" -eq 13 ]; then systemctl restart docker-compose elif [ "$RECOVERY_ATTEMPT" -eq 14 ]; then systemctl stop docker-compose - echo "Backup Docker volumes to /var/lib/docker/backup/." - mkdir -p /var/lib/docker/backup/volumes/ && cp -r /var/lib/docker/volumes/. /var/lib/docker/backup/volumes/ + echo "Backup Docker volumes to $GRAPH_ROOT/backup/." + mkdir -p $GRAPH_ROOT/backup/volumes/ && cp -r $GRAPH_ROOT/volumes/. $GRAPH_ROOT/backup/volumes/ echo "Starting docker system prune --all --volumes." docker system prune --all --volumes -f systemctl stop docker echo "Restoring Docker volumes." - cp -r /var/lib/docker/backup/volumes/. /var/lib/docker/volumes/ && rm -r /var/lib/docker/backup/volumes/ + cp -r $GRAPH_ROOT/backup/volumes/. $GRAPH_ROOT/volumes/ && rm -r $GRAPH_ROOT/backup/volumes/ echo "Restarting docker.service." systemctl start docker echo "Restarting docker-compose.service." systemctl restart docker-compose elif [ "$RECOVERY_ATTEMPT" -gt 14 ]; then - echo "Docker seems to be broken beyond repair. To manually recover your system, stop the Docker engine (systemctl stop docker), delete the entire /var/lib/docker directory and restart Docker engine (systemctl start docker). WARNING: That can result in losing important data." + echo "Docker seems to be broken beyond repair. To manually recover your system, stop the Docker engine (systemctl stop docker), delete the entire $GRAPH_ROOT directory and restart Docker engine (systemctl start docker). WARNING: That can result in losing important data." exit 0 fi diff --git a/recipes-containers/docker/docker-ce/0003-dynbinary-use-go-cross-compiler.patch b/recipes-containers/docker/docker-ce/0003-dynbinary-use-go-cross-compiler.patch new file mode 100644 index 00000000..c32bb87e --- /dev/null +++ b/recipes-containers/docker/docker-ce/0003-dynbinary-use-go-cross-compiler.patch @@ -0,0 +1,13 @@ +--- a/src/import/hack/make/.binary 2022-09-08 02:43:54.569047202 -0300 ++++ b/src/import/hack/make/.binary 2022-09-08 02:46:11.612879337 -0300 +@@ -67,6 +67,10 @@ + export CC="${CC:-x86_64-linux-gnu-gcc}" + export CGO_ENABLED=1 + ;; ++ linux/riscv64) ++ export CC="${CC:-riscv64-linux-gnu-gcc}" ++ export CGO_ENABLED=1 ++ ;; + esac + fi + diff --git a/recipes-containers/docker/docker-ce/0004-libnetwork-use-GO-instead-of-go.patch b/recipes-containers/docker/docker-ce/0004-libnetwork-use-GO-instead-of-go.patch new file mode 100644 index 00000000..9141eb5d --- /dev/null +++ b/recipes-containers/docker/docker-ce/0004-libnetwork-use-GO-instead-of-go.patch @@ -0,0 +1,13 @@ +--- git.orig/libnetwork/Makefile 2022-09-08 02:50:43.820948164 -0300 ++++ git/libnetwork/Makefile 2022-09-08 03:04:06.522681472 -0300 +@@ -82,8 +82,8 @@ + + cross-local: + @echo "🐳 $@" +- @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy +- @$(GO) build -linkshared $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet ++ @$(GO) build $(GOBUILDFLAGS) -o "bin/docker-proxy-$$GOOS-$$GOARCH" ./cmd/proxy ++ @$(GO) build $(GOBUILDFLAGS) -o "bin/dnet-$$GOOS-$$GOARCH" ./cmd/dnet + + # Rebuild protocol buffers. + # These may need to be rebuilt after vendoring updates, so .proto files are declared .PHONY so they are always rebuilt. diff --git a/recipes-containers/docker/docker-ce/daemon.json.in b/recipes-containers/docker/docker-ce/daemon.json.in deleted file mode 100644 index 6553e3cf..00000000 --- a/recipes-containers/docker/docker-ce/daemon.json.in +++ /dev/null @@ -1,5 +0,0 @@ -{ - "log-driver": "journald", - "max-concurrent-downloads": @@MAX_CONCURRENT_DOWNLOADS@@, - "max-download-attempts": @@MAX_DOWNLOAD_ATTEMPTS@@ -} diff --git a/recipes-containers/docker/docker-ce/docker.service b/recipes-containers/docker/docker-ce/docker.service deleted file mode 100644 index 7d0c3a82..00000000 --- a/recipes-containers/docker/docker-ce/docker.service +++ /dev/null @@ -1,36 +0,0 @@ -[Unit] -Description=Docker Application Container Engine -Documentation=https://docs.docker.com -After=network-online.target docker.socket firewalld.service usermount.service -Before=boot-complete.target -Wants=network-online.target -Requires=docker.socket usermount.service - -[Service] -Type=notify -# the default is not to use systemd for cgroups because the delegate issues still -# exists and systemd currently does not support the cgroup feature set required -# for containers run by docker -ExecStart=/usr/bin/dockerd -H fd:// -ExecReload=/bin/kill -s HUP $MAINPID -LimitNOFILE=1048576 -# Having non-zero Limit*s causes performance problems due to accounting overhead -# in the kernel. We recommend using cgroups to do container-local accounting. -LimitNPROC=infinity -LimitCORE=infinity -# Uncomment TasksMax if your systemd version supports it. -# Only systemd 226 and above support this version. -TasksMax=infinity -TimeoutStartSec=0 -# set delegate yes so that systemd does not reset the cgroups of docker containers -Delegate=yes -# kill only the docker process, not all processes in the cgroup -KillMode=process -# restart the docker process if it exits prematurely -Restart=on-failure -StartLimitBurst=3 -StartLimitInterval=60s - -[Install] -WantedBy=multi-user.target -RequiredBy=boot-complete.target diff --git a/recipes-containers/docker/docker-ce_git.bbappend b/recipes-containers/docker/docker-ce_git.bbappend index 6383ccbc..2aae930c 100644 --- a/recipes-containers/docker/docker-ce_git.bbappend +++ b/recipes-containers/docker/docker-ce_git.bbappend @@ -3,6 +3,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" SRC_URI:append = " \ file://0001-dockerd-daemon-use-default-system-config-when-none-i.patch \ file://0002-cli-config-support-default-system-config.patch \ + file://0003-dynbinary-use-go-cross-compiler.patch \ " require docker-torizon.inc diff --git a/recipes-containers/docker/docker-torizon.inc b/recipes-containers/docker/docker-torizon.inc index 47089932..aab4cc2b 100644 --- a/recipes-containers/docker/docker-torizon.inc +++ b/recipes-containers/docker/docker-torizon.inc @@ -6,8 +6,6 @@ SRC_URI:append = " \ file://daemon.json \ file://docker.service \ file://chrome.json \ - file://20-docker.conf \ - file://docker.sh \ " # Prefer docker.service instead of docker.socket as this is a critical service @@ -30,14 +28,6 @@ do_install:append() { COMPLETION_DIR=${D}${datadir}/bash-completion/completions install -d ${COMPLETION_DIR} install -m 0644 ${S}/cli/contrib/completion/bash/docker ${COMPLETION_DIR} - - # install systemd configuration snippet for Docker - install -d ${D}${systemd_unitdir}/system.conf.d/ - install -m 0644 ${WORKDIR}/20-docker.conf ${D}${systemd_unitdir}/system.conf.d/ - - # install shell profile for Docker - install -d ${D}${sysconfdir}/profile.d - install -m 0755 ${WORKDIR}/docker.sh ${D}${sysconfdir}/profile.d/ } -FILES:${PN} += "${libdir}/docker ${systemd_unitdir}/system.conf.d/*" +FILES:${PN} += "${libdir}/docker" diff --git a/recipes-containers/docker/files/docker.service b/recipes-containers/docker/files/docker.service index f8e7b386..4f976a32 100644 --- a/recipes-containers/docker/files/docker.service +++ b/recipes-containers/docker/files/docker.service @@ -1,15 +1,12 @@ [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com -After=network-online.target docker.socket firewalld.service containerd.service fio-docker-fsck.service usermount.service +After=network-online.target docker.socket firewalld.service containerd.service usermount.service Before=boot-complete.target Wants=network-online.target containerd.service usermount.service Requires=docker.socket StartLimitBurst=3 StartLimitIntervalSec=60 -# Reboot the system in case docker daemon fails. This will trigger a rollback -# after three consecutive failures. -FailureAction=reboot [Service] Type=notify diff --git a/recipes-containers/netavark/files/run-ptest b/recipes-containers/netavark/files/run-ptest new file mode 100644 index 00000000..7e017ae2 --- /dev/null +++ b/recipes-containers/netavark/files/run-ptest @@ -0,0 +1,8 @@ +#!/bin/bash + +shopt -s extglob + +# Skip the plugin tests because those example plugins are built only while +# running cargo test and for this to work as a ptest they would need to be cross +# compiled and installed as part of the ptest. +NETAVARK=/usr/libexec/podman/netavark bats test/!(*-plugin.bats) diff --git a/recipes-containers/netavark/files/tests.patch b/recipes-containers/netavark/files/tests.patch new file mode 100644 index 00000000..3e1e9ed9 --- /dev/null +++ b/recipes-containers/netavark/files/tests.patch @@ -0,0 +1,24 @@ +Upstream-Status: Pending + +Index: git/test/helpers.bash +=================================================================== +--- git.orig/test/helpers.bash ++++ git/test/helpers.bash +@@ -575,7 +575,7 @@ + fi + + nsenter -n -t "${CONTAINER_NS_PIDS[$container_ns]}" timeout --foreground -v --kill=10 5 \ +- nc $nc_common_args -l -p $container_port &>"$NETAVARK_TMPDIR/nc-out" <$stdin & ++ ncat $nc_common_args -l -p $container_port &>"$NETAVARK_TMPDIR/nc-out" <$stdin & + + # make sure to wait until port is bound otherwise test can flake + # https://github.com/containers/netavark/issues/433 +@@ -588,7 +588,7 @@ + fi + + data=$(random_string) +- run_in_host_netns nc $nc_common_args $connect_ip $host_port <<<"$data" ++ run_in_host_netns ncat $nc_common_args $connect_ip $host_port <<<"$data" + + got=$(cat "$NETAVARK_TMPDIR/nc-out") + assert "$got" == "$data" "ncat received data" diff --git a/recipes-containers/netavark/netavark-crates.inc b/recipes-containers/netavark/netavark-crates.inc new file mode 100644 index 00000000..36435e30 --- /dev/null +++ b/recipes-containers/netavark/netavark-crates.inc @@ -0,0 +1,538 @@ +# Autogenerated with 'bitbake -c update_crates netavark' + +# from Cargo.lock +SRC_URI += " \ + crate://crates.io/addr2line/0.21.0 \ + crate://crates.io/adler/1.0.2 \ + crate://crates.io/aho-corasick/1.1.2 \ + crate://crates.io/android-tzdata/0.1.1 \ + crate://crates.io/android_system_properties/0.1.5 \ + crate://crates.io/anstream/0.6.4 \ + crate://crates.io/anstyle/1.0.4 \ + crate://crates.io/anstyle-parse/0.2.2 \ + crate://crates.io/anstyle-query/1.0.0 \ + crate://crates.io/anstyle-wincon/3.0.1 \ + crate://crates.io/anyhow/1.0.75 \ + crate://crates.io/arrayvec/0.7.4 \ + crate://crates.io/async-broadcast/0.5.1 \ + crate://crates.io/async-channel/2.1.0 \ + crate://crates.io/async-executor/1.7.2 \ + crate://crates.io/async-fs/1.6.0 \ + crate://crates.io/async-io/1.13.0 \ + crate://crates.io/async-io/2.2.0 \ + crate://crates.io/async-lock/2.8.0 \ + crate://crates.io/async-lock/3.1.1 \ + crate://crates.io/async-process/1.8.1 \ + crate://crates.io/async-recursion/1.0.5 \ + crate://crates.io/async-signal/0.2.5 \ + crate://crates.io/async-stream/0.3.5 \ + crate://crates.io/async-stream-impl/0.3.5 \ + crate://crates.io/async-task/4.5.0 \ + crate://crates.io/async-trait/0.1.74 \ + crate://crates.io/atomic-waker/1.1.2 \ + crate://crates.io/autocfg/1.1.0 \ + crate://crates.io/axum/0.6.20 \ + crate://crates.io/axum-core/0.3.4 \ + crate://crates.io/backtrace/0.3.69 \ + crate://crates.io/base64/0.21.5 \ + crate://crates.io/bitflags/1.3.2 \ + crate://crates.io/bitflags/2.4.1 \ + crate://crates.io/block-buffer/0.10.4 \ + crate://crates.io/blocking/1.5.1 \ + crate://crates.io/bumpalo/3.14.0 \ + crate://crates.io/byteorder/1.5.0 \ + crate://crates.io/bytes/1.5.0 \ + crate://crates.io/cc/1.0.83 \ + crate://crates.io/cfg-if/1.0.0 \ + crate://crates.io/chrono/0.4.31 \ + crate://crates.io/clap/4.4.10 \ + crate://crates.io/clap_builder/4.4.9 \ + crate://crates.io/clap_derive/4.4.7 \ + crate://crates.io/clap_lex/0.6.0 \ + crate://crates.io/colorchoice/1.0.0 \ + crate://crates.io/concurrent-queue/2.3.0 \ + crate://crates.io/core-foundation-sys/0.8.4 \ + crate://crates.io/cpufeatures/0.2.11 \ + crate://crates.io/crossbeam-utils/0.8.16 \ + crate://crates.io/crypto-common/0.1.6 \ + crate://crates.io/data-encoding/2.4.0 \ + crate://crates.io/derivative/2.2.0 \ + crate://crates.io/dhcproto/0.9.0 \ + crate://crates.io/dhcproto-macros/0.1.0 \ + crate://crates.io/digest/0.10.7 \ + crate://crates.io/either/1.9.0 \ + crate://crates.io/enum-as-inner/0.5.1 \ + crate://crates.io/enum-as-inner/0.6.0 \ + crate://crates.io/enumflags2/0.7.8 \ + crate://crates.io/enumflags2_derive/0.7.8 \ + crate://crates.io/env_logger/0.10.1 \ + crate://crates.io/equivalent/1.0.1 \ + crate://crates.io/errno/0.3.7 \ + crate://crates.io/etherparse/0.13.0 \ + crate://crates.io/ethtool/0.2.5 \ + crate://crates.io/event-listener/2.5.3 \ + crate://crates.io/event-listener/3.1.0 \ + crate://crates.io/event-listener-strategy/0.3.0 \ + crate://crates.io/fastrand/1.9.0 \ + crate://crates.io/fastrand/2.0.1 \ + crate://crates.io/fixedbitset/0.4.2 \ + crate://crates.io/fnv/1.0.7 \ + crate://crates.io/form_urlencoded/1.2.1 \ + crate://crates.io/fs2/0.4.3 \ + crate://crates.io/futures/0.3.29 \ + crate://crates.io/futures-channel/0.3.29 \ + crate://crates.io/futures-core/0.3.29 \ + crate://crates.io/futures-executor/0.3.29 \ + crate://crates.io/futures-io/0.3.29 \ + crate://crates.io/futures-lite/1.13.0 \ + crate://crates.io/futures-lite/2.0.1 \ + crate://crates.io/futures-macro/0.3.29 \ + crate://crates.io/futures-sink/0.3.29 \ + crate://crates.io/futures-task/0.3.29 \ + crate://crates.io/futures-util/0.3.29 \ + crate://crates.io/generic-array/0.14.7 \ + crate://crates.io/genetlink/0.2.5 \ + crate://crates.io/getrandom/0.2.11 \ + crate://crates.io/gimli/0.28.0 \ + crate://crates.io/h2/0.3.22 \ + crate://crates.io/hashbrown/0.12.3 \ + crate://crates.io/hashbrown/0.14.2 \ + crate://crates.io/heck/0.4.1 \ + crate://crates.io/hermit-abi/0.3.3 \ + crate://crates.io/hex/0.4.3 \ + crate://crates.io/home/0.5.5 \ + crate://crates.io/http/0.2.11 \ + crate://crates.io/http-body/0.4.5 \ + crate://crates.io/httparse/1.8.0 \ + crate://crates.io/httpdate/1.0.3 \ + crate://crates.io/humantime/2.1.0 \ + crate://crates.io/hyper/0.14.27 \ + crate://crates.io/hyper-timeout/0.4.1 \ + crate://crates.io/iana-time-zone/0.1.58 \ + crate://crates.io/iana-time-zone-haiku/0.1.2 \ + crate://crates.io/idna/0.2.3 \ + crate://crates.io/idna/0.5.0 \ + crate://crates.io/indexmap/1.9.3 \ + crate://crates.io/indexmap/2.1.0 \ + crate://crates.io/instant/0.1.12 \ + crate://crates.io/io-lifetimes/1.0.11 \ + crate://crates.io/ipnet/2.9.0 \ + crate://crates.io/iptables/0.5.1 \ + crate://crates.io/is-terminal/0.4.9 \ + crate://crates.io/itertools/0.11.0 \ + crate://crates.io/itoa/1.0.9 \ + crate://crates.io/js-sys/0.3.65 \ + crate://crates.io/lazy_static/1.4.0 \ + crate://crates.io/libc/0.2.150 \ + crate://crates.io/linux-raw-sys/0.3.8 \ + crate://crates.io/linux-raw-sys/0.4.11 \ + crate://crates.io/log/0.4.20 \ + crate://crates.io/matches/0.1.10 \ + crate://crates.io/matchit/0.7.3 \ + crate://crates.io/memchr/2.6.4 \ + crate://crates.io/memoffset/0.7.1 \ + crate://crates.io/mime/0.3.17 \ + crate://crates.io/miniz_oxide/0.7.1 \ + crate://crates.io/mio/0.8.9 \ + crate://crates.io/mozim/0.2.2 \ + crate://crates.io/mptcp-pm/0.1.3 \ + crate://crates.io/multimap/0.8.3 \ + crate://crates.io/netlink-packet-core/0.7.0 \ + crate://crates.io/netlink-packet-generic/0.3.3 \ + crate://crates.io/netlink-packet-route/0.17.1 \ + crate://crates.io/netlink-packet-route/0.18.1 \ + crate://crates.io/netlink-packet-utils/0.5.2 \ + crate://crates.io/netlink-proto/0.11.2 \ + crate://crates.io/netlink-sys/0.8.5 \ + crate://crates.io/nispor/1.2.15 \ + crate://crates.io/nix/0.26.4 \ + crate://crates.io/nix/0.27.1 \ + crate://crates.io/num-traits/0.2.17 \ + crate://crates.io/num_cpus/1.16.0 \ + crate://crates.io/object/0.32.1 \ + crate://crates.io/once_cell/1.19.0 \ + crate://crates.io/ordered-float/2.10.1 \ + crate://crates.io/ordered-stream/0.2.0 \ + crate://crates.io/parking/2.2.0 \ + crate://crates.io/paste/1.0.14 \ + crate://crates.io/percent-encoding/2.3.1 \ + crate://crates.io/petgraph/0.6.4 \ + crate://crates.io/pin-project/1.1.3 \ + crate://crates.io/pin-project-internal/1.1.3 \ + crate://crates.io/pin-project-lite/0.2.13 \ + crate://crates.io/pin-utils/0.1.0 \ + crate://crates.io/piper/0.2.1 \ + crate://crates.io/polling/2.8.0 \ + crate://crates.io/polling/3.3.0 \ + crate://crates.io/ppv-lite86/0.2.17 \ + crate://crates.io/prettyplease/0.2.15 \ + crate://crates.io/proc-macro-crate/1.3.1 \ + crate://crates.io/proc-macro2/1.0.69 \ + crate://crates.io/prost/0.12.2 \ + crate://crates.io/prost-build/0.12.2 \ + crate://crates.io/prost-derive/0.12.2 \ + crate://crates.io/prost-types/0.12.2 \ + crate://crates.io/quote/1.0.33 \ + crate://crates.io/rand/0.8.5 \ + crate://crates.io/rand_chacha/0.3.1 \ + crate://crates.io/rand_core/0.6.4 \ + crate://crates.io/redox_syscall/0.4.1 \ + crate://crates.io/regex/1.10.2 \ + crate://crates.io/regex-automata/0.4.3 \ + crate://crates.io/regex-syntax/0.8.2 \ + crate://crates.io/rtnetlink/0.14.0 \ + crate://crates.io/rustc-demangle/0.1.23 \ + crate://crates.io/rustix/0.37.27 \ + crate://crates.io/rustix/0.38.25 \ + crate://crates.io/rustversion/1.0.14 \ + crate://crates.io/ryu/1.0.15 \ + crate://crates.io/same-file/1.0.6 \ + crate://crates.io/serde/1.0.193 \ + crate://crates.io/serde-value/0.7.0 \ + crate://crates.io/serde_derive/1.0.193 \ + crate://crates.io/serde_json/1.0.108 \ + crate://crates.io/serde_repr/0.1.17 \ + crate://crates.io/sha1/0.10.6 \ + crate://crates.io/sha2/0.10.8 \ + crate://crates.io/signal-hook-registry/1.4.1 \ + crate://crates.io/slab/0.4.9 \ + crate://crates.io/smallvec/1.11.2 \ + crate://crates.io/socket2/0.4.10 \ + crate://crates.io/socket2/0.5.5 \ + crate://crates.io/static_assertions/1.1.0 \ + crate://crates.io/strsim/0.10.0 \ + crate://crates.io/syn/1.0.109 \ + crate://crates.io/syn/2.0.39 \ + crate://crates.io/sync_wrapper/0.1.2 \ + crate://crates.io/sysctl/0.5.5 \ + crate://crates.io/tempfile/3.8.1 \ + crate://crates.io/termcolor/1.4.0 \ + crate://crates.io/thiserror/1.0.50 \ + crate://crates.io/thiserror-impl/1.0.50 \ + crate://crates.io/tinyvec/1.6.0 \ + crate://crates.io/tinyvec_macros/0.1.1 \ + crate://crates.io/tokio/1.35.0 \ + crate://crates.io/tokio-io-timeout/1.2.0 \ + crate://crates.io/tokio-macros/2.2.0 \ + crate://crates.io/tokio-stream/0.1.14 \ + crate://crates.io/tokio-util/0.7.10 \ + crate://crates.io/toml_datetime/0.6.5 \ + crate://crates.io/toml_edit/0.19.15 \ + crate://crates.io/tonic/0.10.2 \ + crate://crates.io/tonic-build/0.10.2 \ + crate://crates.io/tower/0.4.13 \ + crate://crates.io/tower-layer/0.3.2 \ + crate://crates.io/tower-service/0.3.2 \ + crate://crates.io/tracing/0.1.40 \ + crate://crates.io/tracing-attributes/0.1.27 \ + crate://crates.io/tracing-core/0.1.32 \ + crate://crates.io/trust-dns-proto/0.22.0 \ + crate://crates.io/try-lock/0.2.4 \ + crate://crates.io/typenum/1.17.0 \ + crate://crates.io/uds_windows/1.0.2 \ + crate://crates.io/unicode-bidi/0.3.13 \ + crate://crates.io/unicode-ident/1.0.12 \ + crate://crates.io/unicode-normalization/0.1.22 \ + crate://crates.io/url/2.5.0 \ + crate://crates.io/utf8parse/0.2.1 \ + crate://crates.io/version_check/0.9.4 \ + crate://crates.io/waker-fn/1.1.1 \ + crate://crates.io/walkdir/2.4.0 \ + crate://crates.io/want/0.3.1 \ + crate://crates.io/wasi/0.11.0+wasi-snapshot-preview1 \ + crate://crates.io/wasm-bindgen/0.2.88 \ + crate://crates.io/wasm-bindgen-backend/0.2.88 \ + crate://crates.io/wasm-bindgen-macro/0.2.88 \ + crate://crates.io/wasm-bindgen-macro-support/0.2.88 \ + crate://crates.io/wasm-bindgen-shared/0.2.88 \ + crate://crates.io/which/4.4.2 \ + crate://crates.io/winapi/0.3.9 \ + crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ + crate://crates.io/winapi-util/0.1.6 \ + crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ + crate://crates.io/windows-core/0.51.1 \ + crate://crates.io/windows-sys/0.48.0 \ + crate://crates.io/windows-targets/0.48.5 \ + crate://crates.io/windows_aarch64_gnullvm/0.48.5 \ + crate://crates.io/windows_aarch64_msvc/0.48.5 \ + crate://crates.io/windows_i686_gnu/0.48.5 \ + crate://crates.io/windows_i686_msvc/0.48.5 \ + crate://crates.io/windows_x86_64_gnu/0.48.5 \ + crate://crates.io/windows_x86_64_gnullvm/0.48.5 \ + crate://crates.io/windows_x86_64_msvc/0.48.5 \ + crate://crates.io/winnow/0.5.19 \ + crate://crates.io/xdg-home/1.0.0 \ + crate://crates.io/zbus/3.14.1 \ + crate://crates.io/zbus_macros/3.14.1 \ + crate://crates.io/zbus_names/2.6.0 \ + crate://crates.io/zvariant/3.15.0 \ + crate://crates.io/zvariant_derive/3.15.0 \ + crate://crates.io/zvariant_utils/1.0.1 \ +" + +SRC_URI[addr2line-0.21.0.sha256sum] = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +SRC_URI[adler-1.0.2.sha256sum] = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +SRC_URI[aho-corasick-1.1.2.sha256sum] = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" +SRC_URI[android-tzdata-0.1.1.sha256sum] = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" +SRC_URI[android_system_properties-0.1.5.sha256sum] = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +SRC_URI[anstream-0.6.4.sha256sum] = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +SRC_URI[anstyle-1.0.4.sha256sum] = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" +SRC_URI[anstyle-parse-0.2.2.sha256sum] = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +SRC_URI[anstyle-query-1.0.0.sha256sum] = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +SRC_URI[anstyle-wincon-3.0.1.sha256sum] = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +SRC_URI[anyhow-1.0.75.sha256sum] = "a4668cab20f66d8d020e1fbc0ebe47217433c1b6c8f2040faf858554e394ace6" +SRC_URI[arrayvec-0.7.4.sha256sum] = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +SRC_URI[async-broadcast-0.5.1.sha256sum] = "7c48ccdbf6ca6b121e0f586cbc0e73ae440e56c67c30fa0873b4e110d9c26d2b" +SRC_URI[async-channel-2.1.0.sha256sum] = "d37875bd9915b7d67c2f117ea2c30a0989874d0b2cb694fe25403c85763c0c9e" +SRC_URI[async-executor-1.7.2.sha256sum] = "fc5ea910c42e5ab19012bab31f53cb4d63d54c3a27730f9a833a88efcf4bb52d" +SRC_URI[async-fs-1.6.0.sha256sum] = "279cf904654eeebfa37ac9bb1598880884924aab82e290aa65c9e77a0e142e06" +SRC_URI[async-io-1.13.0.sha256sum] = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" +SRC_URI[async-io-2.2.0.sha256sum] = "41ed9d5715c2d329bf1b4da8d60455b99b187f27ba726df2883799af9af60997" +SRC_URI[async-lock-2.8.0.sha256sum] = "287272293e9d8c41773cec55e365490fe034813a2f172f502d6ddcf75b2f582b" +SRC_URI[async-lock-3.1.1.sha256sum] = "655b9c7fe787d3b25cc0f804a1a8401790f0c5bc395beb5a64dc77d8de079105" +SRC_URI[async-process-1.8.1.sha256sum] = "ea6438ba0a08d81529c69b36700fa2f95837bfe3e776ab39cde9c14d9149da88" +SRC_URI[async-recursion-1.0.5.sha256sum] = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" +SRC_URI[async-signal-0.2.5.sha256sum] = "9e47d90f65a225c4527103a8d747001fc56e375203592b25ad103e1ca13124c5" +SRC_URI[async-stream-0.3.5.sha256sum] = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" +SRC_URI[async-stream-impl-0.3.5.sha256sum] = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" +SRC_URI[async-task-4.5.0.sha256sum] = "b4eb2cdb97421e01129ccb49169d8279ed21e829929144f4a22a6e54ac549ca1" +SRC_URI[async-trait-0.1.74.sha256sum] = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +SRC_URI[atomic-waker-1.1.2.sha256sum] = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +SRC_URI[autocfg-1.1.0.sha256sum] = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +SRC_URI[axum-0.6.20.sha256sum] = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +SRC_URI[axum-core-0.3.4.sha256sum] = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +SRC_URI[backtrace-0.3.69.sha256sum] = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +SRC_URI[base64-0.21.5.sha256sum] = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +SRC_URI[bitflags-2.4.1.sha256sum] = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +SRC_URI[block-buffer-0.10.4.sha256sum] = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +SRC_URI[blocking-1.5.1.sha256sum] = "6a37913e8dc4ddcc604f0c6d3bf2887c995153af3611de9e23c352b44c1b9118" +SRC_URI[bumpalo-3.14.0.sha256sum] = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +SRC_URI[byteorder-1.5.0.sha256sum] = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +SRC_URI[bytes-1.5.0.sha256sum] = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +SRC_URI[cc-1.0.83.sha256sum] = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +SRC_URI[chrono-0.4.31.sha256sum] = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +SRC_URI[clap-4.4.10.sha256sum] = "41fffed7514f420abec6d183b1d3acfd9099c79c3a10a06ade4f8203f1411272" +SRC_URI[clap_builder-4.4.9.sha256sum] = "63361bae7eef3771745f02d8d892bec2fee5f6e34af316ba556e7f97a7069ff1" +SRC_URI[clap_derive-4.4.7.sha256sum] = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" +SRC_URI[clap_lex-0.6.0.sha256sum] = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +SRC_URI[colorchoice-1.0.0.sha256sum] = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" +SRC_URI[concurrent-queue-2.3.0.sha256sum] = "f057a694a54f12365049b0958a1685bb52d567f5593b355fbf685838e873d400" +SRC_URI[core-foundation-sys-0.8.4.sha256sum] = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +SRC_URI[cpufeatures-0.2.11.sha256sum] = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" +SRC_URI[crossbeam-utils-0.8.16.sha256sum] = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +SRC_URI[crypto-common-0.1.6.sha256sum] = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +SRC_URI[data-encoding-2.4.0.sha256sum] = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +SRC_URI[derivative-2.2.0.sha256sum] = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +SRC_URI[dhcproto-0.9.0.sha256sum] = "dcee045385d5f7819022821f41209b9945d17550760b0b2349aaef4ecfa14bc3" +SRC_URI[dhcproto-macros-0.1.0.sha256sum] = "a7993efb860416547839c115490d4951c6d0f8ec04a3594d9dd99d50ed7ec170" +SRC_URI[digest-0.10.7.sha256sum] = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +SRC_URI[either-1.9.0.sha256sum] = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +SRC_URI[enum-as-inner-0.5.1.sha256sum] = "c9720bba047d567ffc8a3cba48bf19126600e249ab7f128e9233e6376976a116" +SRC_URI[enum-as-inner-0.6.0.sha256sum] = "5ffccbb6966c05b32ef8fbac435df276c4ae4d3dc55a8cd0eb9745e6c12f546a" +SRC_URI[enumflags2-0.7.8.sha256sum] = "5998b4f30320c9d93aed72f63af821bfdac50465b75428fce77b48ec482c3939" +SRC_URI[enumflags2_derive-0.7.8.sha256sum] = "f95e2801cd355d4a1a3e3953ce6ee5ae9603a5c833455343a8bfe3f44d418246" +SRC_URI[env_logger-0.10.1.sha256sum] = "95b3f3e67048839cb0d0781f445682a35113da7121f7c949db0e2be96a4fbece" +SRC_URI[equivalent-1.0.1.sha256sum] = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +SRC_URI[errno-0.3.7.sha256sum] = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +SRC_URI[etherparse-0.13.0.sha256sum] = "827292ea592108849932ad8e30218f8b1f21c0dfd0696698a18b5d0aed62d990" +SRC_URI[ethtool-0.2.5.sha256sum] = "1d8e04a35517dc77748dc04bf38152799382d3d8f85cb07cb579bb7f4d8d3b5a" +SRC_URI[event-listener-2.5.3.sha256sum] = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +SRC_URI[event-listener-3.1.0.sha256sum] = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" +SRC_URI[event-listener-strategy-0.3.0.sha256sum] = "d96b852f1345da36d551b9473fa1e2b1eb5c5195585c6c018118bc92a8d91160" +SRC_URI[fastrand-1.9.0.sha256sum] = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be" +SRC_URI[fastrand-2.0.1.sha256sum] = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +SRC_URI[fixedbitset-0.4.2.sha256sum] = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +SRC_URI[fnv-1.0.7.sha256sum] = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +SRC_URI[form_urlencoded-1.2.1.sha256sum] = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +SRC_URI[fs2-0.4.3.sha256sum] = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +SRC_URI[futures-0.3.29.sha256sum] = "da0290714b38af9b4a7b094b8a37086d1b4e61f2df9122c3cad2577669145335" +SRC_URI[futures-channel-0.3.29.sha256sum] = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb" +SRC_URI[futures-core-0.3.29.sha256sum] = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" +SRC_URI[futures-executor-0.3.29.sha256sum] = "0f4fb8693db0cf099eadcca0efe2a5a22e4550f98ed16aba6c48700da29597bc" +SRC_URI[futures-io-0.3.29.sha256sum] = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" +SRC_URI[futures-lite-1.13.0.sha256sum] = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" +SRC_URI[futures-lite-2.0.1.sha256sum] = "d3831c2651acb5177cbd83943f3d9c8912c5ad03c76afcc0e9511ba568ec5ebb" +SRC_URI[futures-macro-0.3.29.sha256sum] = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" +SRC_URI[futures-sink-0.3.29.sha256sum] = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" +SRC_URI[futures-task-0.3.29.sha256sum] = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" +SRC_URI[futures-util-0.3.29.sha256sum] = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" +SRC_URI[generic-array-0.14.7.sha256sum] = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +SRC_URI[genetlink-0.2.5.sha256sum] = "1f890076c1faa1298bf747ce3694a8d9e0d2cc4b06fe293f12dd95742bfd079f" +SRC_URI[getrandom-0.2.11.sha256sum] = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +SRC_URI[gimli-0.28.0.sha256sum] = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +SRC_URI[h2-0.3.22.sha256sum] = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +SRC_URI[hashbrown-0.12.3.sha256sum] = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +SRC_URI[hashbrown-0.14.2.sha256sum] = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +SRC_URI[heck-0.4.1.sha256sum] = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +SRC_URI[hermit-abi-0.3.3.sha256sum] = "d77f7ec81a6d05a3abb01ab6eb7590f6083d08449fe5a1c8b1e620283546ccb7" +SRC_URI[hex-0.4.3.sha256sum] = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +SRC_URI[home-0.5.5.sha256sum] = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +SRC_URI[http-0.2.11.sha256sum] = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +SRC_URI[http-body-0.4.5.sha256sum] = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +SRC_URI[httparse-1.8.0.sha256sum] = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +SRC_URI[httpdate-1.0.3.sha256sum] = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +SRC_URI[humantime-2.1.0.sha256sum] = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +SRC_URI[hyper-0.14.27.sha256sum] = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" +SRC_URI[hyper-timeout-0.4.1.sha256sum] = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +SRC_URI[iana-time-zone-0.1.58.sha256sum] = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" +SRC_URI[iana-time-zone-haiku-0.1.2.sha256sum] = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +SRC_URI[idna-0.2.3.sha256sum] = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +SRC_URI[idna-0.5.0.sha256sum] = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +SRC_URI[indexmap-1.9.3.sha256sum] = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +SRC_URI[indexmap-2.1.0.sha256sum] = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +SRC_URI[instant-0.1.12.sha256sum] = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +SRC_URI[io-lifetimes-1.0.11.sha256sum] = "eae7b9aee968036d54dce06cebaefd919e4472e753296daccd6d344e3e2df0c2" +SRC_URI[ipnet-2.9.0.sha256sum] = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" +SRC_URI[iptables-0.5.1.sha256sum] = "d39f0d72d0feb83c9b7f4e1fbde2b4a629886f30841127b3f86383831dba2629" +SRC_URI[is-terminal-0.4.9.sha256sum] = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" +SRC_URI[itertools-0.11.0.sha256sum] = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +SRC_URI[itoa-1.0.9.sha256sum] = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +SRC_URI[js-sys-0.3.65.sha256sum] = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +SRC_URI[lazy_static-1.4.0.sha256sum] = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +SRC_URI[libc-0.2.150.sha256sum] = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +SRC_URI[linux-raw-sys-0.3.8.sha256sum] = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +SRC_URI[linux-raw-sys-0.4.11.sha256sum] = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +SRC_URI[log-0.4.20.sha256sum] = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +SRC_URI[matches-0.1.10.sha256sum] = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" +SRC_URI[matchit-0.7.3.sha256sum] = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" +SRC_URI[memchr-2.6.4.sha256sum] = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" +SRC_URI[memoffset-0.7.1.sha256sum] = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +SRC_URI[mime-0.3.17.sha256sum] = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +SRC_URI[miniz_oxide-0.7.1.sha256sum] = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" +SRC_URI[mio-0.8.9.sha256sum] = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +SRC_URI[mozim-0.2.2.sha256sum] = "0c1c15d0df314be0af498b122169739cc873045e431a0cb1a83564f7459ac491" +SRC_URI[mptcp-pm-0.1.3.sha256sum] = "3eafa8fc63dce407b75e336f9a22f18cf5510a3a5c3a5d83262688eb5cca42d5" +SRC_URI[multimap-0.8.3.sha256sum] = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" +SRC_URI[netlink-packet-core-0.7.0.sha256sum] = "72724faf704479d67b388da142b186f916188505e7e0b26719019c525882eda4" +SRC_URI[netlink-packet-generic-0.3.3.sha256sum] = "1cd7eb8ad331c84c6b8cb7f685b448133e5ad82e1ffd5acafac374af4a5a308b" +SRC_URI[netlink-packet-route-0.17.1.sha256sum] = "053998cea5a306971f88580d0829e90f270f940befd7cf928da179d4187a5a66" +SRC_URI[netlink-packet-route-0.18.1.sha256sum] = "dd9ccdfabb457e05c7c61e66eb39262a204fbb376c53968b5e52dce15b423fc5" +SRC_URI[netlink-packet-utils-0.5.2.sha256sum] = "0ede8a08c71ad5a95cdd0e4e52facd37190977039a4704eb82a283f713747d34" +SRC_URI[netlink-proto-0.11.2.sha256sum] = "842c6770fc4bb33dd902f41829c61ef872b8e38de1405aa0b938b27b8fba12c3" +SRC_URI[netlink-sys-0.8.5.sha256sum] = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411" +SRC_URI[nispor-1.2.15.sha256sum] = "1b7611344f5b567ae02ddb7e8c9029f9ca5c049cc5d227613ab8b72b876379c7" +SRC_URI[nix-0.26.4.sha256sum] = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +SRC_URI[nix-0.27.1.sha256sum] = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" +SRC_URI[num-traits-0.2.17.sha256sum] = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +SRC_URI[num_cpus-1.16.0.sha256sum] = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +SRC_URI[object-0.32.1.sha256sum] = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" +SRC_URI[once_cell-1.19.0.sha256sum] = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +SRC_URI[ordered-float-2.10.1.sha256sum] = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" +SRC_URI[ordered-stream-0.2.0.sha256sum] = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50" +SRC_URI[parking-2.2.0.sha256sum] = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" +SRC_URI[paste-1.0.14.sha256sum] = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +SRC_URI[percent-encoding-2.3.1.sha256sum] = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +SRC_URI[petgraph-0.6.4.sha256sum] = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +SRC_URI[pin-project-1.1.3.sha256sum] = "fda4ed1c6c173e3fc7a83629421152e01d7b1f9b7f65fb301e490e8cfc656422" +SRC_URI[pin-project-internal-1.1.3.sha256sum] = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" +SRC_URI[pin-project-lite-0.2.13.sha256sum] = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +SRC_URI[pin-utils-0.1.0.sha256sum] = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +SRC_URI[piper-0.2.1.sha256sum] = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +SRC_URI[polling-2.8.0.sha256sum] = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" +SRC_URI[polling-3.3.0.sha256sum] = "e53b6af1f60f36f8c2ac2aad5459d75a5a9b4be1e8cdd40264f315d78193e531" +SRC_URI[ppv-lite86-0.2.17.sha256sum] = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +SRC_URI[prettyplease-0.2.15.sha256sum] = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +SRC_URI[proc-macro-crate-1.3.1.sha256sum] = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +SRC_URI[proc-macro2-1.0.69.sha256sum] = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +SRC_URI[prost-0.12.2.sha256sum] = "5a5a410fc7882af66deb8d01d01737353cf3ad6204c408177ba494291a626312" +SRC_URI[prost-build-0.12.2.sha256sum] = "1fa3d084c8704911bfefb2771be2f9b6c5c0da7343a71e0021ee3c665cada738" +SRC_URI[prost-derive-0.12.2.sha256sum] = "065717a5dfaca4a83d2fe57db3487b311365200000551d7a364e715dbf4346bc" +SRC_URI[prost-types-0.12.2.sha256sum] = "8339f32236f590281e2f6368276441394fcd1b2133b549cc895d0ae80f2f9a52" +SRC_URI[quote-1.0.33.sha256sum] = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +SRC_URI[rand-0.8.5.sha256sum] = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +SRC_URI[rand_chacha-0.3.1.sha256sum] = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +SRC_URI[rand_core-0.6.4.sha256sum] = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +SRC_URI[redox_syscall-0.4.1.sha256sum] = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +SRC_URI[regex-1.10.2.sha256sum] = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +SRC_URI[regex-automata-0.4.3.sha256sum] = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +SRC_URI[regex-syntax-0.8.2.sha256sum] = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +SRC_URI[rtnetlink-0.14.0.sha256sum] = "bb5bbb61e037711ff30a3657ec537285b2e1ecb5427e4365d275164f0928c884" +SRC_URI[rustc-demangle-0.1.23.sha256sum] = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +SRC_URI[rustix-0.37.27.sha256sum] = "fea8ca367a3a01fe35e6943c400addf443c0f57670e6ec51196f71a4b8762dd2" +SRC_URI[rustix-0.38.25.sha256sum] = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +SRC_URI[rustversion-1.0.14.sha256sum] = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +SRC_URI[ryu-1.0.15.sha256sum] = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +SRC_URI[same-file-1.0.6.sha256sum] = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +SRC_URI[serde-1.0.193.sha256sum] = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" +SRC_URI[serde-value-0.7.0.sha256sum] = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c" +SRC_URI[serde_derive-1.0.193.sha256sum] = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" +SRC_URI[serde_json-1.0.108.sha256sum] = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +SRC_URI[serde_repr-0.1.17.sha256sum] = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +SRC_URI[sha1-0.10.6.sha256sum] = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +SRC_URI[sha2-0.10.8.sha256sum] = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +SRC_URI[signal-hook-registry-1.4.1.sha256sum] = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" +SRC_URI[slab-0.4.9.sha256sum] = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +SRC_URI[smallvec-1.11.2.sha256sum] = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +SRC_URI[socket2-0.4.10.sha256sum] = "9f7916fc008ca5542385b89a3d3ce689953c143e9304a9bf8beec1de48994c0d" +SRC_URI[socket2-0.5.5.sha256sum] = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" +SRC_URI[static_assertions-1.1.0.sha256sum] = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +SRC_URI[strsim-0.10.0.sha256sum] = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +SRC_URI[syn-2.0.39.sha256sum] = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +SRC_URI[sync_wrapper-0.1.2.sha256sum] = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +SRC_URI[sysctl-0.5.5.sha256sum] = "ec7dddc5f0fee506baf8b9fdb989e242f17e4b11c61dfbb0635b705217199eea" +SRC_URI[tempfile-3.8.1.sha256sum] = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +SRC_URI[termcolor-1.4.0.sha256sum] = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +SRC_URI[thiserror-1.0.50.sha256sum] = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +SRC_URI[thiserror-impl-1.0.50.sha256sum] = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +SRC_URI[tinyvec-1.6.0.sha256sum] = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +SRC_URI[tinyvec_macros-0.1.1.sha256sum] = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +SRC_URI[tokio-1.35.0.sha256sum] = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" +SRC_URI[tokio-io-timeout-1.2.0.sha256sum] = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +SRC_URI[tokio-macros-2.2.0.sha256sum] = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +SRC_URI[tokio-stream-0.1.14.sha256sum] = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +SRC_URI[tokio-util-0.7.10.sha256sum] = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +SRC_URI[toml_datetime-0.6.5.sha256sum] = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +SRC_URI[toml_edit-0.19.15.sha256sum] = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +SRC_URI[tonic-0.10.2.sha256sum] = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" +SRC_URI[tonic-build-0.10.2.sha256sum] = "9d021fc044c18582b9a2408cd0dd05b1596e3ecdb5c4df822bb0183545683889" +SRC_URI[tower-0.4.13.sha256sum] = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +SRC_URI[tower-layer-0.3.2.sha256sum] = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +SRC_URI[tower-service-0.3.2.sha256sum] = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +SRC_URI[tracing-0.1.40.sha256sum] = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +SRC_URI[tracing-attributes-0.1.27.sha256sum] = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +SRC_URI[tracing-core-0.1.32.sha256sum] = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +SRC_URI[trust-dns-proto-0.22.0.sha256sum] = "4f7f83d1e4a0e4358ac54c5c3681e5d7da5efc5a7a632c90bb6d6669ddd9bc26" +SRC_URI[try-lock-0.2.4.sha256sum] = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +SRC_URI[typenum-1.17.0.sha256sum] = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +SRC_URI[uds_windows-1.0.2.sha256sum] = "ce65604324d3cce9b966701489fbd0cf318cb1f7bd9dd07ac9a4ee6fb791930d" +SRC_URI[unicode-bidi-0.3.13.sha256sum] = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +SRC_URI[unicode-ident-1.0.12.sha256sum] = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +SRC_URI[unicode-normalization-0.1.22.sha256sum] = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +SRC_URI[url-2.5.0.sha256sum] = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +SRC_URI[utf8parse-0.2.1.sha256sum] = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +SRC_URI[version_check-0.9.4.sha256sum] = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +SRC_URI[waker-fn-1.1.1.sha256sum] = "f3c4517f54858c779bbcbf228f4fca63d121bf85fbecb2dc578cdf4a39395690" +SRC_URI[walkdir-2.4.0.sha256sum] = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +SRC_URI[want-0.3.1.sha256sum] = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +SRC_URI[wasi-0.11.0+wasi-snapshot-preview1.sha256sum] = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +SRC_URI[wasm-bindgen-0.2.88.sha256sum] = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +SRC_URI[wasm-bindgen-backend-0.2.88.sha256sum] = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +SRC_URI[wasm-bindgen-macro-0.2.88.sha256sum] = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +SRC_URI[wasm-bindgen-macro-support-0.2.88.sha256sum] = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +SRC_URI[wasm-bindgen-shared-0.2.88.sha256sum] = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +SRC_URI[which-4.4.2.sha256sum] = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" +SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +SRC_URI[winapi-util-0.1.6.sha256sum] = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" +SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +SRC_URI[windows-core-0.51.1.sha256sum] = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" +SRC_URI[windows-sys-0.48.0.sha256sum] = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +SRC_URI[windows-targets-0.48.5.sha256sum] = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +SRC_URI[windows_aarch64_gnullvm-0.48.5.sha256sum] = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +SRC_URI[windows_aarch64_msvc-0.48.5.sha256sum] = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +SRC_URI[windows_i686_gnu-0.48.5.sha256sum] = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +SRC_URI[windows_i686_msvc-0.48.5.sha256sum] = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +SRC_URI[windows_x86_64_gnu-0.48.5.sha256sum] = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +SRC_URI[windows_x86_64_gnullvm-0.48.5.sha256sum] = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +SRC_URI[windows_x86_64_msvc-0.48.5.sha256sum] = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +SRC_URI[winnow-0.5.19.sha256sum] = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +SRC_URI[xdg-home-1.0.0.sha256sum] = "2769203cd13a0c6015d515be729c526d041e9cf2c0cc478d57faee85f40c6dcd" +SRC_URI[zbus-3.14.1.sha256sum] = "31de390a2d872e4cd04edd71b425e29853f786dc99317ed72d73d6fcf5ebb948" +SRC_URI[zbus_macros-3.14.1.sha256sum] = "41d1794a946878c0e807f55a397187c11fc7a038ba5d868e7db4f3bd7760bc9d" +SRC_URI[zbus_names-2.6.0.sha256sum] = "fb80bb776dbda6e23d705cf0123c3b95df99c4ebeaec6c2599d4a5419902b4a9" +SRC_URI[zvariant-3.15.0.sha256sum] = "44b291bee0d960c53170780af148dca5fa260a63cdd24f1962fa82e03e53338c" +SRC_URI[zvariant_derive-3.15.0.sha256sum] = "934d7a7dfc310d6ee06c87ffe88ef4eca7d3e37bb251dece2ef93da8f17d8ecd" +SRC_URI[zvariant_utils-1.0.1.sha256sum] = "7234f0d811589db492d16893e3f21e8e2fd282e6d01b0cddee310322062cc200" diff --git a/recipes-containers/netavark/netavark_1.9.0.bb b/recipes-containers/netavark/netavark_1.9.0.bb new file mode 100644 index 00000000..5249acee --- /dev/null +++ b/recipes-containers/netavark/netavark_1.9.0.bb @@ -0,0 +1,61 @@ +SUMMARY = "A container network stack" +HOMEPAGE = "https://github.com/containers/netavark" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327" + +SRCREV = "167e2e4f167cadc635bbacb5331674b67787d08e" + +# It is possible to fetch the source using the crate fetcher instead: +#SRC_URI = "crate://crates.io/${BPN}/${PV}" +SRC_URI = "git://github.com/containers/netavark.git;protocol=https;nobranch=1 \ + file://tests.patch \ + file://run-ptest" +require ${BPN}-crates.inc + +S = "${WORKDIR}/git" + +PACKAGECONFIG ?= "aardvark-dns" + +# From the documentation of netavark +# https://github.com/containers/netavark/blob/v1.1.0/DISTRO_PACKAGE.md#dependency-on-aardvark-dns +# The aardvark-dns will be installed by default with netavark, but +# netavark will be functional without it. +PACKAGECONFIG[aardvark-dns]= ",,, aardvark-dns" + +inherit cargo cargo-update-recipe-crates features_check ptest + +# Cargo installs the binary to bin so move it to where podman expects it +do_install:append() { + install -d ${D}${libexecdir} + mv ${D}${bindir} ${D}${libexecdir}/podman +} + +do_install_ptest() { + cp -r ${S}/test ${D}${PTEST_PATH} +} + +# rdepends on aardvark-dns which rdepends on slirp4netns +REQUIRED_DISTRO_FEATURES ?= "seccomp" + + +DEPENDS += "protobuf-c-native protobuf-c" + +# bind-utils is used to install dig +# procps-ps is necessary because the ps from busybox is +# not having the same behavior +# iputils is used because busybox ping behaves differently +RDEPENDS:${PN}-ptest += " \ + bash \ + bats \ + bind-utils \ + coreutils \ + dbus-daemon-proxy \ + iproute2 \ + iputils \ + jq \ + nmap \ + procps-ps \ + util-linux-nsenter \ + util-linux-unshare \ +" diff --git a/recipes-containers/podman/files/0001-cmd-support-config-option-to-locate-authentication-f.patch b/recipes-containers/podman/files/0001-cmd-support-config-option-to-locate-authentication-f.patch new file mode 100644 index 00000000..25f7c78a --- /dev/null +++ b/recipes-containers/podman/files/0001-cmd-support-config-option-to-locate-authentication-f.patch @@ -0,0 +1,138 @@ +From 447034a55fefa57bad6fc2b1c4a4c396b451b695 Mon Sep 17 00:00:00 2001 +From: Ming Liu +Date: Wed, 27 Dec 2023 14:41:49 +0100 +Subject: [PATCH] cmd: support --config option to locate authentication file + +Let's support --config option by setting environment variable +DOCKER_CONFIG instead of ignoring it for docker compatibility, so +it could be used to locate config.json as authentication file. + +Also add a test case for this change, remove the deprecated one. + +Upstream-Status: Backport [https://github.com/containers/podman/pull/21095] + +Signed-off-by: Ming Liu +--- + src/import/cmd/podman/root.go | 11 ++++++++--- + src/import/docs/source/markdown/podman.1.md | 3 +++ + src/import/pkg/domain/entities/engine.go | 2 +- + src/import/test/system/001-basic.bats | 3 --- + src/import/test/system/150-login.bats | 31 +++++++++++++++++++++++++++++++ + 5 files changed, 43 insertions(+), 7 deletions(-) + +diff --git a/src/import/cmd/podman/root.go b/src/import/cmd/podman/root.go +index 86f42d1c4..a10ede54a 100644 +--- a/src/import/cmd/podman/root.go ++++ b/src/import/cmd/podman/root.go +@@ -400,7 +400,10 @@ func persistentPostRunE(cmd *cobra.Command, args []string) error { + + func configHook() { + if dockerConfig != "" { +- logrus.Warn("The --config flag is ignored by Podman. Exists for Docker compatibility") ++ if err := os.Setenv("DOCKER_CONFIG", dockerConfig); err != nil { ++ fmt.Fprintf(os.Stderr, "cannot set DOCKER_CONFIG=%s: %s", dockerConfig, err.Error()) ++ os.Exit(1) ++ } + } + } + +@@ -476,8 +479,10 @@ func rootFlags(cmd *cobra.Command, podmanConfig *entities.PodmanConfig) { + lFlags.StringVarP(&podmanConfig.URI, "host", "H", podmanConfig.URI, "Used for Docker compatibility") + _ = lFlags.MarkHidden("host") + +- lFlags.StringVar(&dockerConfig, "config", "", "Ignored for Docker compatibility") +- _ = lFlags.MarkHidden("config") ++ configFlagName := "config" ++ lFlags.StringVar(&dockerConfig, "config", "", "Location of authentication config file") ++ _ = cmd.RegisterFlagCompletionFunc(configFlagName, completion.AutocompleteDefault) ++ + // Context option added just for compatibility with DockerCLI. + lFlags.String("context", "default", "Name of the context to use to connect to the daemon (This flag is a NOOP and provided solely for scripting compatibility.)") + _ = lFlags.MarkHidden("context") +diff --git a/src/import/docs/source/markdown/podman.1.md b/src/import/docs/source/markdown/podman.1.md +index 151a7410d..37480b3ac 100644 +--- a/src/import/docs/source/markdown/podman.1.md ++++ b/src/import/docs/source/markdown/podman.1.md +@@ -32,6 +32,9 @@ The CGroup manager to use for container cgroups. Supported values are __cgroupfs + Note: Setting this flag can cause certain commands to break when called on containers previously created by the other CGroup manager type. + Note: CGroup manager is not supported in rootless mode when using CGroups Version V1. + ++#### **--config** ++Location of config file. Mainly for docker compatibility, only the authentication parts of the config are supported. ++ + #### **--conmon** + Path of the conmon binary (Default path is configured in `containers.conf`) + +diff --git a/src/import/pkg/domain/entities/engine.go b/src/import/pkg/domain/entities/engine.go +index 6c7f0abb4..3346110d6 100644 +--- a/src/import/pkg/domain/entities/engine.go ++++ b/src/import/pkg/domain/entities/engine.go +@@ -35,7 +35,7 @@ type PodmanConfig struct { + ContainersConf *config.Config + ContainersConfDefaultsRO *config.Config // The read-only! defaults from containers.conf. + DBBackend string // Hidden: change the database backend +- DockerConfig string // Used for Docker compatibility ++ DockerConfig string // Location of authentication config file + CgroupUsage string // rootless code determines Usage message + ConmonPath string // --conmon flag will set Engine.ConmonPath + CPUProfile string // Hidden: Should CPU profile be taken +diff --git a/src/import/test/system/001-basic.bats b/src/import/test/system/001-basic.bats +index 0512accba..7b4cc58b3 100644 +--- a/src/import/test/system/001-basic.bats ++++ b/src/import/test/system/001-basic.bats +@@ -35,9 +35,6 @@ function setup() { + + run_podman -v + is "$output" "podman.*version \+" "'Version line' in output" +- +- run_podman 0+w --config foobar version +- require_warning "The --config flag is ignored by Podman. Exists for Docker compatibility" + } + + # bats test_tags=distro-integration +diff --git a/src/import/test/system/150-login.bats b/src/import/test/system/150-login.bats +index f9c6b1394..f8c2994d2 100644 +--- a/src/import/test/system/150-login.bats ++++ b/src/import/test/system/150-login.bats +@@ -91,6 +91,38 @@ function setup() { + assert "$output" =~ "Error: options for paths to the credential file and to the Docker-compatible credential file can not be set simultaneously" + } + ++@test "podman login - check with --config global option" { ++ dockerconfig=${PODMAN_LOGIN_WORKDIR}/docker ++ rm -rf $dockerconfig ++ ++ registry=localhost:${PODMAN_LOGIN_REGISTRY_PORT} ++ ++ run_podman --config $dockerconfig login \ ++ --tls-verify=false \ ++ --username ${PODMAN_LOGIN_USER} \ ++ --password ${PODMAN_LOGIN_PASS} \ ++ $registry ++ ++ # Confirm that config file now exists ++ test -e $dockerconfig/config.json || \ ++ die "podman login did not create config $dockerconfig/config.json" ++ ++ # Special bracket form needed because of colon in host:port ++ run jq -r ".[\"auths\"][\"$registry\"][\"auth\"]" <$dockerconfig/config.json ++ is "$status" "0" "jq from $dockerconfig/config.json" ++ ++ expect_userpass="${PODMAN_LOGIN_USER}:${PODMAN_LOGIN_PASS}" ++ actual_userpass=$(base64 -d <<<"$output") ++ is "$actual_userpass" "$expect_userpass" "credentials stored in $dockerconfig/config.json" ++ ++ # Now log out and make sure credentials are removed ++ run_podman --config $dockerconfig logout $registry ++ ++ run jq -r '.auths' <$dockerconfig/config.json ++ is "$status" "0" "jq from $dockerconfig/config.json" ++ is "$output" "{}" "credentials removed from $dockerconfig/config.json" ++} ++ + # Some push tests + @test "podman push fail" { + +-- +2.34.1 + diff --git a/recipes-containers/podman/podman/50-podman-rootless.conf b/recipes-containers/podman/podman/50-podman-rootless.conf new file mode 100644 index 00000000..aaede0e1 --- /dev/null +++ b/recipes-containers/podman/podman/50-podman-rootless.conf @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: MIT + +# User namespaces are required for rootless containers. +user.max_user_namespaces = 15000 diff --git a/recipes-containers/podman/podman/run-ptest b/recipes-containers/podman/podman/run-ptest new file mode 100644 index 00000000..108ff451 --- /dev/null +++ b/recipes-containers/podman/podman/run-ptest @@ -0,0 +1,13 @@ +#!/bin/sh + +# SPDX-FileCopyrightText: Huawei Inc. +# +# SPDX-License-Identifier: MIT + +# +# Podman system tests +# + +# The system tests don't need any go related variables. Dummy-define them to +# avoid useless warnings/errors. +GOOS=undefined GO=true BUILDTAGS= make localsystem diff --git a/recipes-containers/podman/podman_%.bbappend b/recipes-containers/podman/podman_%.bbappend new file mode 100644 index 00000000..98849daf --- /dev/null +++ b/recipes-containers/podman/podman_%.bbappend @@ -0,0 +1,46 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI += "file://0001-cmd-support-config-option-to-locate-authentication-f.patch" + +VIRTUAL-RUNTIME_container_networking = "netavark" +VIRTUAL-RUNTIME_container_runtime = "crun" + +PACKAGECONFIG:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'completion', '', d)}" +DEPENDS:append = " ${@bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'qemu-native', '', d)}" + +inherit qemu bash-completion + +QEMU_OPTIONS = "" +ALLOW_EMPTY:${PN}-bash-completion = "1" + +do_install:append () { + if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then + if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + # API session does not expire + sed -i -e 's#^ExecStart=\(.*\)$#ExecStart=\1 -t 0#g' ${D}${systemd_unitdir}/system/podman.service + + # Add alias docker.service to podman.service + echo "Alias=docker.service" >> ${D}${systemd_unitdir}/system/podman.service + fi + + # Run podman binary with sudo + sed -i -e "s#${bindir}/podman#sudo ${bindir}/podman#" ${D}${bindir}/docker + fi + + if ${@bb.utils.contains('PACKAGECONFIG', 'completion', 'true', 'false', d)}; then + qemu_binary="${@qemu_wrapper_cmdline(d, '${STAGING_DIR_TARGET}', ['${B}', '${STAGING_DIR_TARGET}/${base_libdir}'])}" + cat > ${WORKDIR}/podman-qemuwrapper << EOF +#!/bin/sh + +$qemu_binary "\$@" +EOF + chmod +x ${WORKDIR}/podman-qemuwrapper + ${WORKDIR}/podman-qemuwrapper ./bin/podman completion bash > ${B}/podman-bash-completion + install -d ${D}${datadir}/bash-completion/completions + install -m 0644 ${B}/podman-bash-completion ${D}${datadir}/bash-completion/completions/podman + if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then + sed "s/podman/docker/g" ${B}/podman-bash-completion > ${B}/docker-bash-completion + install -m 0644 ${B}/docker-bash-completion ${D}${datadir}/bash-completion/completions/docker + fi + fi +} diff --git a/recipes-containers/podman/podman_git.bb b/recipes-containers/podman/podman_git.bb new file mode 100644 index 00000000..6f2df7a6 --- /dev/null +++ b/recipes-containers/podman/podman_git.bb @@ -0,0 +1,172 @@ +HOMEPAGE = "https://podman.io/" +SUMMARY = "A daemonless container engine" +DESCRIPTION = "Podman is a daemonless container engine for developing, \ + managing, and running OCI Containers on your Linux System. Containers can \ + either be run as root or in rootless mode. Simply put: \ + `alias docker=podman`. \ + " + +inherit features_check +REQUIRED_DISTRO_FEATURES ?= "seccomp ipv6" + +DEPENDS = " \ + go-metalinter-native \ + gpgme \ + libseccomp \ + ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \ + gettext-native \ +" + +SRCREV = "aa546902fa1a927b3d770528565627d1395b19f3" +SRC_URI = " \ + git://github.com/containers/libpod.git;branch=v4.8;protocol=https \ + ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'file://50-podman-rootless.conf', '', d)} \ + file://run-ptest \ +" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://src/import/LICENSE;md5=3d9b931fa23ab1cacd0087f9e2ee12c0" + +GO_IMPORT = "import" + +S = "${WORKDIR}/git" + +PV = "4.8.2+git" + +CVE_STATUS[CVE-2022-2989] = "fixed-version: fixed since v4.3.0" +CVE_STATUS[CVE-2023-0778] = "fixed-version: fixed since v4.5.0" + +PACKAGES =+ "${PN}-contrib" + +PODMAN_PKG = "github.com/containers/libpod" +BUILDTAGS ?= "seccomp varlink \ +${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \ +exclude_graphdriver_btrfs exclude_graphdriver_devicemapper" + +# overide LDFLAGS to allow podman to build without: "flag provided but not # defined: -Wl,-O1 +export LDFLAGS="" + +# https://github.com/llvm/llvm-project/issues/53999 +TOOLCHAIN = "gcc" + +# podmans Makefile expects BUILDFLAGS to be set but go.bbclass defines them in GOBUILDFLAGS +export BUILDFLAGS="${GOBUILDFLAGS}" + +inherit go goarch +inherit systemd pkgconfig ptest + +do_configure[noexec] = "1" + +EXTRA_OEMAKE = " \ + PREFIX=${prefix} BINDIR=${bindir} LIBEXECDIR=${libexecdir} \ + ETCDIR=${sysconfdir} TMPFILESDIR=${nonarch_libdir}/tmpfiles.d \ + SYSTEMDDIR=${systemd_unitdir}/system USERSYSTEMDDIR=${systemd_unitdir}/user \ +" + +# remove 'docker' from the packageconfig if you don't want podman to +# build and install the docker wrapper. If docker is enabled in the +# packageconfig, the podman package will rconfict with docker. +PACKAGECONFIG ?= "docker" + +do_compile() { + cd ${S}/src + rm -rf .gopath + mkdir -p .gopath/src/"$(dirname "${PODMAN_PKG}")" + ln -sf ../../../../import/ .gopath/src/"${PODMAN_PKG}" + + ln -sf "../../../import/vendor/github.com/varlink/" ".gopath/src/github.com/varlink" + + export GOARCH="${BUILD_GOARCH}" + export GOPATH="${S}/src/.gopath" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" + + cd ${S}/src/.gopath/src/"${PODMAN_PKG}" + + # Pass the needed cflags/ldflags so that cgo + # can find the needed headers files and libraries + export GOARCH=${TARGET_GOARCH} + export CGO_ENABLED="1" + export CGO_CFLAGS="${CFLAGS} --sysroot=${STAGING_DIR_TARGET}" + export CGO_LDFLAGS="${LDFLAGS} --sysroot=${STAGING_DIR_TARGET}" + + # podman now builds go-md2man and requires the host/build details + export NATIVE_GOOS=${BUILD_GOOS} + export NATIVE_GOARCH=${BUILD_GOARCH} + + oe_runmake NATIVE_GOOS=${BUILD_GOOS} NATIVE_GOARCH=${BUILD_GOARCH} BUILDTAGS="${BUILDTAGS}" +} + +do_install() { + cd ${S}/src/.gopath/src/"${PODMAN_PKG}" + + export GOARCH="${BUILD_GOARCH}" + export GOPATH="${S}/src/.gopath" + export GOROOT="${STAGING_DIR_NATIVE}/${nonarch_libdir}/${HOST_SYS}/go" + + oe_runmake install DESTDIR="${D}" + if ${@bb.utils.contains('PACKAGECONFIG', 'docker', 'true', 'false', d)}; then + oe_runmake install.docker DESTDIR="${D}" + fi + + # Silence docker emulation warnings. + mkdir -p ${D}/etc/containers + touch ${D}/etc/containers/nodocker + + if ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'true', 'false', d)}; then + install -d "${D}${sysconfdir}/sysctl.d" + install -m 0644 "${WORKDIR}/50-podman-rootless.conf" "${D}${sysconfdir}/sysctl.d" + fi +} + +do_install_ptest () { + cp ${S}/src/import/Makefile ${D}${PTEST_PATH} + install -d ${D}${PTEST_PATH}/test + cp -r ${S}/src/import/test/system ${D}${PTEST_PATH}/test + + # Some compatibility links for the Makefile assumptions. + install -d ${D}${PTEST_PATH}/bin + ln -s ${bindir}/podman ${D}${PTEST_PATH}/bin/podman + ln -s ${bindir}/podman-remote ${D}${PTEST_PATH}/bin/podman-remote +} + +FILES:${PN} += " \ + ${systemd_unitdir}/system/* \ + ${nonarch_libdir}/systemd/* \ + ${systemd_unitdir}/user/* \ + ${nonarch_libdir}/tmpfiles.d/* \ + ${datadir}/user-tmpfiles.d/* \ + ${sysconfdir}/cni \ +" + +SYSTEMD_SERVICE:${PN} = "podman.service podman.socket" + +# The other option for this is "busybox", since meta-virt ensures +# that busybox is configured with nsenter +VIRTUAL-RUNTIME_base-utils-nsenter ?= "util-linux-nsenter" + +# networking: cni, netavark +VIRTUAL-RUNTIME_container_networking ?= "cni" + +VIRTUAL-RUNTIME_container_runtime ?= "virtual-runc" + +COMPATIBLE_HOST = "^(?!mips).*" + +RDEPENDS:${PN} += "\ + conmon ${VIRTUAL-RUNTIME_container_runtime} iptables ${VIRTUAL-RUNTIME_container_networking} skopeo ${VIRTUAL-RUNTIME_base-utils-nsenter} \ + ${@bb.utils.contains('PACKAGECONFIG', 'rootless', 'fuse-overlayfs slirp4netns', '', d)} \ +" +RRECOMMENDS:${PN} += "slirp4netns kernel-module-xt-masquerade kernel-module-xt-comment" +RCONFLICTS:${PN} = "${@bb.utils.contains('PACKAGECONFIG', 'docker', 'docker', '', d)}" + +RDEPENDS:${PN}-ptest += " \ + bash \ + bats \ + buildah \ + catatonit \ + coreutils \ + file \ + gnupg \ + jq \ + make \ + tar \ +" diff --git a/recipes-core/base-files/base-files/fstab b/recipes-core/base-files/base-files/fstab index 70e400f5..fae8050b 100644 --- a/recipes-core/base-files/base-files/fstab +++ b/recipes-core/base-files/base-files/fstab @@ -1,6 +1,7 @@ # stock fstab - you probably want to override this with a machine specific one /dev/root / auto defaults 1 1 +/dev/sda1 /var/rootdirs/media/efi vfat defaults 0 2 proc /proc proc defaults 0 0 devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0 tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0 diff --git a/recipes-core/base-files/base-files/motd b/recipes-core/base-files/base-files/motd new file mode 100644 index 00000000..3c08c59c --- /dev/null +++ b/recipes-core/base-files/base-files/motd @@ -0,0 +1,3 @@ +This is an Experimental Common Torizon Image +Check for more info: +https://github.com/commontorizon/Documentation/blob/main/PRE-BUILT-DEV.md  diff --git a/recipes-core/images/initramfs-ostree-torizon-image.bb b/recipes-core/images/initramfs-ostree-torizon-image.bb index 4bb65446..a6fa58ae 100644 --- a/recipes-core/images/initramfs-ostree-torizon-image.bb +++ b/recipes-core/images/initramfs-ostree-torizon-image.bb @@ -9,6 +9,10 @@ PACKAGE_INSTALL:append:torizon-signed = "\ initramfs-module-composefs \ " +PACKAGE_INSTALL:append:apalis-imx8 = "\ + firmware-imx-hdmi \ +" + SYSTEMD_DEFAULT_TARGET = "initrd.target" # Do not pollute the initrd image with rootfs features diff --git a/recipes-core/initramfs-framework/initramfs-framework_1.0.bbappend b/recipes-core/initramfs-framework/initramfs-framework_1.0.bbappend index fee2907b..8bd1fcda 100644 --- a/recipes-core/initramfs-framework/initramfs-framework_1.0.bbappend +++ b/recipes-core/initramfs-framework/initramfs-framework_1.0.bbappend @@ -42,6 +42,12 @@ FILES:initramfs-module-kmod = "\ /etc/modules-load.d/* \ " +SUMMARY:initramfs-module-firmware = "initramfs support for HDMI firmware" +RDEPENDS:initramfs-module-firmware = "${PN}-base firmware-imx-hdmi" +FILES:initramfs-module-firmware = "\ + /usr/lib/firmware/* \ +" + do_install:append() { install -m 0755 ${WORKDIR}/plymouth ${D}/init.d/02-plymouth install -m 0755 ${WORKDIR}/ostree ${D}/init.d/95-ostree diff --git a/recipes-core/ostree-customize-plymouth/files/ostree-customize-plymouth.sh b/recipes-core/ostree-customize-plymouth/files/ostree-customize-plymouth.sh index 4c0c4cba..c676fcba 100755 --- a/recipes-core/ostree-customize-plymouth/files/ostree-customize-plymouth.sh +++ b/recipes-core/ostree-customize-plymouth/files/ostree-customize-plymouth.sh @@ -29,8 +29,8 @@ then exit 0 fi -if [[ $USER != "root" ]]; then - echo "This script must be run as root!" +if [[ "$(id -u)" != "0" ]]; then + echo "This script must be run as a sudoer!" exit 1 fi diff --git a/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend b/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend new file mode 100644 index 00000000..61534e30 --- /dev/null +++ b/recipes-core/packagegroups/packagegroup-core-tools-testapps.bbappend @@ -0,0 +1,5 @@ +RDEPENDS:${PN}:remove = "\ + connman-tools \ + connman-tests \ + connman-client \ + " diff --git a/recipes-core/plymouth/files/commontorizonlogo-dev.png b/recipes-core/plymouth/files/commontorizonlogo-dev.png new file mode 100644 index 00000000..b649db63 Binary files /dev/null and b/recipes-core/plymouth/files/commontorizonlogo-dev.png differ diff --git a/recipes-core/plymouth/files/commontorizonlogo.png b/recipes-core/plymouth/files/commontorizonlogo.png new file mode 100644 index 00000000..2517c6ed Binary files /dev/null and b/recipes-core/plymouth/files/commontorizonlogo.png differ diff --git a/recipes-core/plymouth/files/spinner.plymouth b/recipes-core/plymouth/files/spinner.plymouth index 17f0eae3..8b5e3b10 100644 --- a/recipes-core/plymouth/files/spinner.plymouth +++ b/recipes-core/plymouth/files/spinner.plymouth @@ -12,7 +12,7 @@ DialogVerticalAlignment=.382 TitleHorizontalAlignment=.5 TitleVerticalAlignment=.382 HorizontalAlignment=.5 -VerticalAlignment=.7 +VerticalAlignment=.9 WatermarkHorizontalAlignment=.5 WatermarkVerticalAlignment=.45 Transition=none diff --git a/recipes-core/plymouth/files/torizon-splash-dev-new.png b/recipes-core/plymouth/files/torizon-splash-dev-new.png new file mode 100644 index 00000000..c0d8cdad Binary files /dev/null and b/recipes-core/plymouth/files/torizon-splash-dev-new.png differ diff --git a/recipes-core/plymouth/files/torizon-splash-dev.png b/recipes-core/plymouth/files/torizon-splash-dev.png new file mode 100644 index 00000000..51d5e439 Binary files /dev/null and b/recipes-core/plymouth/files/torizon-splash-dev.png differ diff --git a/recipes-core/plymouth/files/torizon-splash-new.png b/recipes-core/plymouth/files/torizon-splash-new.png new file mode 100644 index 00000000..14df6f60 Binary files /dev/null and b/recipes-core/plymouth/files/torizon-splash-new.png differ diff --git a/recipes-core/plymouth/files/torizon-splash.png b/recipes-core/plymouth/files/torizon-splash.png new file mode 100644 index 00000000..4b025959 Binary files /dev/null and b/recipes-core/plymouth/files/torizon-splash.png differ diff --git a/recipes-core/plymouth/files/torizonlogo-white.png b/recipes-core/plymouth/files/torizonlogo-white.png deleted file mode 100644 index c9cda484..00000000 Binary files a/recipes-core/plymouth/files/torizonlogo-white.png and /dev/null differ diff --git a/recipes-core/plymouth/plymouth_%.bbappend b/recipes-core/plymouth/plymouth_%.bbappend index 983f7f57..2e342dd7 100644 --- a/recipes-core/plymouth/plymouth_%.bbappend +++ b/recipes-core/plymouth/plymouth_%.bbappend @@ -2,7 +2,9 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" SRC_URI += " \ file://0001-disable-boot-splash-later.patch \ - file://torizonlogo-white.png \ + file://torizon-splash.png \ + file://torizon-splash-new.png \ + file://torizon-splash-dev-new.png \ file://spinner.plymouth \ " @@ -11,6 +13,12 @@ PACKAGECONFIG = "pango drm" EXTRA_OECONF += "--with-udev --with-runtimedir=/run" do_install:append () { - install -m 0644 ${WORKDIR}/torizonlogo-white.png ${D}${datadir}/plymouth/themes/spinner/watermark.png + # use the labs logo if we are building the engineering image + if [ "${TDX_DEBUG}" = "1" ]; then + install -m 0644 ${WORKDIR}/torizon-splash-dev-new.png ${D}${datadir}/plymouth/themes/spinner/watermark.png + else + install -m 0644 ${WORKDIR}/torizon-splash-new.png ${D}${datadir}/plymouth/themes/spinner/watermark.png + fi + install -m 0644 ${WORKDIR}/spinner.plymouth ${D}${datadir}/plymouth/themes/spinner/spinner.plymouth } diff --git a/recipes-core/set-hostname/set-hostname_%.bbappend b/recipes-core/set-hostname/set-hostname_%.bbappend new file mode 100644 index 00000000..0c7f32f2 --- /dev/null +++ b/recipes-core/set-hostname/set-hostname_%.bbappend @@ -0,0 +1,11 @@ +do_install:append:qemuarm64() { + # Use the only rootdiski's PARTUUID as the serial number + sed -i -e '/\/bin\/sh/ahexpartuuid="0x$(ls /dev/disk/by-partuuid | head -1 | tr - 1 | cut -c -8)"' ${D}${bindir}/sethostname + sed -i -e 's#recovery-mode#`printf "%d" $hexpartuuid | cut -c -8`#' ${D}${bindir}/sethostname +} + +do_install:append:genericx86-64() { + # Use the only rootdiski's PARTUUID as the serial number + sed -i -e '/\/bin\/sh/ahexpartuuid="0x$(ls /dev/disk/by-partuuid | head -1 | tr - 1 | cut -c -8)"' ${D}${bindir}/sethostname + sed -i -e 's#recovery-mode#`printf "%d" $hexpartuuid | cut -c -8`#' ${D}${bindir}/sethostname +} diff --git a/recipes-containers/docker/files/20-docker.conf b/recipes-core/systemd/systemd-conf/system.conf-docker similarity index 100% rename from recipes-containers/docker/files/20-docker.conf rename to recipes-core/systemd/systemd-conf/system.conf-docker diff --git a/recipes-core/systemd/systemd-conf_%.bbappend b/recipes-core/systemd/systemd-conf_%.bbappend index fc43173d..6d098962 100644 --- a/recipes-core/systemd/systemd-conf_%.bbappend +++ b/recipes-core/systemd/systemd-conf_%.bbappend @@ -2,6 +2,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" SRC_URI += "\ file://system.conf-torizon \ + file://system.conf-docker \ " PACKAGE_ARCH = "${MACHINE_ARCH}" @@ -11,10 +12,12 @@ do_install:append() { # by default rm -rf ${D}${systemd_unitdir}/network - # Install systemd configuration snippet for TorizonCore - install -D -m0644 ${WORKDIR}/system.conf-torizon ${D}${systemd_unitdir}/system.conf.d/10-${BPN}.conf + # Install systemd configuration snippet for TorizonCore + install -d ${D}${systemd_unitdir}/system.conf.d/ + install -m 0644 ${WORKDIR}/system.conf-torizon ${D}${systemd_unitdir}/system.conf.d/10-${BPN}.conf + install -m 0644 ${WORKDIR}/system.conf-docker ${D}${systemd_unitdir}/system.conf.d/20-docker.conf - sed -i "s/@@MACHINE@@/${MACHINE}/g" ${D}${systemd_unitdir}/system.conf.d/10-${BPN}.conf + sed -i "s/@@MACHINE@@/${MACHINE}/g" ${D}${systemd_unitdir}/system.conf.d/10-${BPN}.conf } do_install:append:ti-soc() { diff --git a/recipes-core/systemd/systemd_%.bbappend b/recipes-core/systemd/systemd_%.bbappend index 03bb0a64..82448839 100644 --- a/recipes-core/systemd/systemd_%.bbappend +++ b/recipes-core/systemd/systemd_%.bbappend @@ -53,4 +53,7 @@ do_install:append() { # Workaround for https://github.com/systemd/systemd/issues/11329 install -m 0644 ${WORKDIR}/systemd-timesyncd-update.service ${D}${systemd_system_unitdir} ln -sf ../systemd-timesyncd-update.service ${D}${systemd_system_unitdir}/sysinit.target.wants/systemd-timesyncd-update.service + + # The default SaveIntervalSec (60 secs) is too frequent, change to 1 hour + sed -i -e "s/^.*SaveIntervalSec.*$/SaveIntervalSec=3600/" ${D}${sysconfdir}/systemd/timesyncd.conf } diff --git a/recipes-containers/docker/files/docker.sh b/recipes-core/torizon-conf/torizon-conf/docker.sh similarity index 100% rename from recipes-containers/docker/files/docker.sh rename to recipes-core/torizon-conf/torizon-conf/docker.sh diff --git a/recipes-core/torizon-conf/torizon-conf/path-sbin.sh b/recipes-core/torizon-conf/torizon-conf/path-sbin.sh deleted file mode 100755 index 924116a1..00000000 --- a/recipes-core/torizon-conf/torizon-conf/path-sbin.sh +++ /dev/null @@ -1,2 +0,0 @@ -# Add /sbin & co to $PATH for normal users (useful for development) -[ "$USER" == "root" ] || PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin diff --git a/recipes-core/torizon-conf/torizon-conf_1.0.bb b/recipes-core/torizon-conf/torizon-conf_1.0.bb index 049f800d..ed21d0df 100644 --- a/recipes-core/torizon-conf/torizon-conf_1.0.bb +++ b/recipes-core/torizon-conf/torizon-conf_1.0.bb @@ -3,7 +3,7 @@ LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" SRC_URI = " \ - file://path-sbin.sh \ + file://docker.sh \ file://machine.sh \ file://containers-tags.sh \ " @@ -14,7 +14,7 @@ INHIBIT_DEFAULT_DEPS = "1" do_install () { install -d ${D}${sysconfdir}/profile.d - install -m 0755 ${WORKDIR}/path-sbin.sh ${D}${sysconfdir}/profile.d/ + install -m 0755 ${WORKDIR}/docker.sh ${D}${sysconfdir}/profile.d/ install -m 0755 ${WORKDIR}/machine.sh ${D}${sysconfdir}/profile.d/ sed -i "s/@@MACHINE@@/${MACHINE}/g" ${D}${sysconfdir}/profile.d/machine.sh install -m 0755 ${WORKDIR}/containers-tags.sh ${D}${sysconfdir}/profile.d/ diff --git a/recipes-devtools/lshw/lshw_%.bbappend b/recipes-devtools/lshw/lshw_%.bbappend index a271958e..ddaeaee8 100644 --- a/recipes-devtools/lshw/lshw_%.bbappend +++ b/recipes-devtools/lshw/lshw_%.bbappend @@ -1,5 +1,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/${BPN}:" +COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64|riscv64).*-linux" + SRC_URI += "\ file://0001-code-clean-up-for-read-3.patch \ " diff --git a/recipes-devtools/python/python3-cryptography_%.bbappend b/recipes-devtools/python/python3-cryptography_%.bbappend new file mode 100644 index 00000000..febaf394 --- /dev/null +++ b/recipes-devtools/python/python3-cryptography_%.bbappend @@ -0,0 +1,5 @@ + +# fix the wrong triple +do_compile:prepend() { + export CARGO_BUILD_TARGET="${RUST_HOST_SYS}" +} diff --git a/recipes-extended/fluent-bit/fluent-bit_git.bb b/recipes-extended/fluent-bit/fluent-bit_git.bb index b9a5b01a..9a89ff65 100644 --- a/recipes-extended/fluent-bit/fluent-bit_git.bb +++ b/recipes-extended/fluent-bit/fluent-bit_git.bb @@ -54,6 +54,10 @@ EXTRA_OECMAKE += "-DFLB_OUT_KAFKA=On -DWITH_CURL=Off " inherit cmake systemd pkgconfig +# for risc-v +TARGET_CC_ARCH:append:nezha-allwinner-d1 = " ${SELECTED_OPTIMIZATION}" +TARGET_CC_ARCH:remove:nezha-allwinner-d1 = "-D_FORTIFY_SOURCE=2" + SYSTEMD_SERVICE:${PN} = "fluent-bit.service" do_install:append() { diff --git a/recipes-extended/ostree/files/0001-ostree-grub-generator-allow-adding-custom-scripts-to.patch b/recipes-extended/ostree/files/0001-ostree-grub-generator-allow-adding-custom-scripts-to.patch new file mode 100644 index 00000000..8b3fd52e --- /dev/null +++ b/recipes-extended/ostree/files/0001-ostree-grub-generator-allow-adding-custom-scripts-to.patch @@ -0,0 +1,56 @@ +From 9db2364ceb4febc3f5d2d13ad798c372920a5e06 Mon Sep 17 00:00:00 2001 +From: Eduardo Ferreira +Date: Thu, 21 Dec 2023 10:04:54 -0300 +Subject: [PATCH] ostree-grub-generator: allow adding custom scripts to + grub.cfg + +This changes allow us to customize grub.cfg without manually editing it. + +Now, whatever files found under /etc/ostree.d are added (in alphabetical +order) between the cfg header and its menuentries. + +Upstream-Status: Pending + +Signed-off-by: Eduardo Ferreira +--- + src/boot/grub2/ostree-grub-generator | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +diff --git a/src/boot/grub2/ostree-grub-generator b/src/boot/grub2/ostree-grub-generator +index d1436b65..f644fd8a 100644 +--- a/src/boot/grub2/ostree-grub-generator ++++ b/src/boot/grub2/ostree-grub-generator +@@ -25,6 +25,7 @@ script=$(basename ${0}) + # Atomically safe location where to generete grub.cfg when executing system upgrade. + new_grub2_cfg=${2} + entries_path=$(dirname $new_grub2_cfg)/entries ++custom_scripts="/etc/ostree.d" + + read_config() + { +@@ -105,10 +106,22 @@ timeout=10 + EOF + } + ++populate_custom_section() ++{ ++if [ -d "$custom_scripts" ]; then ++ for script in $(ls -v $custom_scripts/*); do ++ echo -e "\n### BEGIN ${script} ###" >> ${new_grub2_cfg} ++ cat ${script} >> ${new_grub2_cfg} ++ echo -e "\n### END ${script} ###\n" >> ${new_grub2_cfg} ++ done ++fi ++} ++ + generate_grub2_cfg() + { + populate_warning + populate_header ++ populate_custom_section + populate_menu + } + +-- +2.34.1 + diff --git a/recipes-extended/ostree/files/0001-update-default-grub-cfg-header.patch b/recipes-extended/ostree/files/0001-update-default-grub-cfg-header.patch index ab8850f9..f03c9df6 100644 --- a/recipes-extended/ostree/files/0001-update-default-grub-cfg-header.patch +++ b/recipes-extended/ostree/files/0001-update-default-grub-cfg-header.patch @@ -9,7 +9,7 @@ index 97ef4d69..b418c2fb 100644 -default=boot -timeout=10 +default=0 -+timeout=1 ++timeout=0 EOF } diff --git a/recipes-extended/ostree/ostree_%.bbappend b/recipes-extended/ostree/ostree_%.bbappend index 2f260a67..03904c9e 100644 --- a/recipes-extended/ostree/ostree_%.bbappend +++ b/recipes-extended/ostree/ostree_%.bbappend @@ -3,6 +3,7 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/files:" inherit bash-completion SRC_URI:append = " \ + file://0001-ostree-grub-generator-allow-adding-custom-scripts-to.patch \ file://0001-update-default-grub-cfg-header.patch \ file://0002-Add-support-for-the-fdtfile-variable-in-uEnv.txt.patch \ file://0003-ostree-fetcher-curl-handle-non-404-errors-as-G_IO_ER.patch \ @@ -31,7 +32,8 @@ def is_ti(d): return False def get_deps(d): - if is_ti(d): # TI + # NOTE: beagleplay is TI but does not use the Toradex BSP + if is_ti(d) and ('beagleplay' not in d.getVar('MACHINE')) : # TI return 'u-boot-toradex-ti' if d.getVar('PREFERRED_PROVIDER_u-boot') else '' else: # NXP/x86 generic/QEMU return 'u-boot-default-script' if d.getVar('PREFERRED_PROVIDER_u-boot-default-script') else '' @@ -49,4 +51,6 @@ do_install:append () { install -d ${D}${systemd_system_unitdir} install -m 0644 ${WORKDIR}/ostree-pending-reboot.service ${D}${systemd_system_unitdir} install -m 0644 ${WORKDIR}/ostree-pending-reboot.path ${D}${systemd_system_unitdir} + + install -d ${D}${sysconfdir}/ostree.d } diff --git a/recipes-extended/procps/procps_%.bbappend b/recipes-extended/procps/procps_%.bbappend new file mode 100644 index 00000000..2fcae046 --- /dev/null +++ b/recipes-extended/procps/procps_%.bbappend @@ -0,0 +1,13 @@ +# in the engineering build, we need to enable break to debug by kernel.sysrq +do_install:append() { + if [ "${TDX_DEBUG}" = "1" ]; then + for keyword in \ + kernel.sysrq \ + ; do + # enabled + sed -i 's,'"$keyword"'=.*,'"$keyword"'=1,' ${D}${sysconfdir}/sysctl.conf + # uncomment + sed -i '/kernel.sysrq/s/^#//' ${D}${sysconfdir}/sysctl.conf + done + fi +} diff --git a/recipes-images/images/torizon-core-common-docker-dev.bb b/recipes-images/images/torizon-core-common-docker-dev.bb new file mode 100644 index 00000000..328f9720 --- /dev/null +++ b/recipes-images/images/torizon-core-common-docker-dev.bb @@ -0,0 +1,12 @@ +TDX_COMMON = "1" + +require torizon-os-version.inc +require torizon-core-docker.bb +require torizon-core-dev.inc + +CORE_IMAGE_BASE_INSTALL:append = " \ + telemetry \ +" + +DESCRIPTION = "TorizonCore Linux development image" +IMAGE_VARIANT = "Common Docker Development" diff --git a/recipes-images/images/torizon-core-common-docker.bb b/recipes-images/images/torizon-core-common-docker.bb new file mode 100644 index 00000000..349b7e41 --- /dev/null +++ b/recipes-images/images/torizon-core-common-docker.bb @@ -0,0 +1,25 @@ +TDX_COMMON = "1" + +require torizon-os-version.inc + +SUMMARY = "TorizonCore" +DESCRIPTION = "TorizonCore Linux with no containers pre-provisioned." + +require torizon-core-common.inc + +CORE_IMAGE_BASE_INSTALL:append = " \ + docker-ce \ + docker-compose \ + docker-compose-up \ + docker-integrity-checker \ + docker-watchdog \ + docker-auto-prune \ +" + +IMAGE_VARIANT = "Common Docker" + +inherit extrausers + +EXTRA_USERS_PARAMS += "\ +usermod -a -G docker torizon; \ +" diff --git a/recipes-images/images/torizon-core-common.inc b/recipes-images/images/torizon-core-common.inc index 580113c8..63839e7c 100644 --- a/recipes-images/images/torizon-core-common.inc +++ b/recipes-images/images/torizon-core-common.inc @@ -1,3 +1,5 @@ +require ../../conf/common/sanity.inc + LICENSE = "MIT" LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" @@ -42,7 +44,7 @@ CORE_IMAGE_BASE_INSTALL:append = " \ mmc-utils \ nano \ neofetch \ - network-configuration \ + networkmanager \ openssh-sftp-server \ ostree-customize-plymouth \ ostree-devicetree-overlays \ @@ -71,6 +73,12 @@ CORE_IMAGE_BASE_INSTALL:append:tdx = " \ CORE_IMAGE_BASE_INSTALL:append:sota = " \ auto-provisioning \ rac \ + provision-device \ +" + +# Update fallback for GRUB (for now only on x86 machines) +CORE_IMAGE_BASE_INSTALL:append:x86-64 = " \ + grub-ota-fallback \ " CORE_IMAGE_BASE_INSTALL:append:mx8-nxp-bsp = " \ diff --git a/recipes-images/images/torizon-core-container.inc b/recipes-images/images/torizon-core-container.inc new file mode 100644 index 00000000..0a3ae9c2 --- /dev/null +++ b/recipes-images/images/torizon-core-container.inc @@ -0,0 +1,8 @@ +CORE_IMAGE_BASE_INSTALL:append = " \ + ${VIRTUAL-RUNTIME_container_engine} \ + docker-compose \ + docker-compose-up \ + docker-integrity-checker \ + docker-watchdog \ + docker-auto-prune \ +" diff --git a/recipes-images/images/torizon-core-dev.inc b/recipes-images/images/torizon-core-dev.inc index 2eb63dac..2dda2daa 100644 --- a/recipes-images/images/torizon-core-dev.inc +++ b/recipes-images/images/torizon-core-dev.inc @@ -1,9 +1,7 @@ CORE_IMAGE_BASE_INSTALL:append = "\ strace \ - ltrace \ tcpdump \ gdbserver \ - valgrind \ perf \ trace-cmd \ " diff --git a/recipes-images/images/torizon-core-docker-dev.bb b/recipes-images/images/torizon-core-docker-dev.bb index 672e3705..6da1693e 100644 --- a/recipes-images/images/torizon-core-docker-dev.bb +++ b/recipes-images/images/torizon-core-docker-dev.bb @@ -1,3 +1,4 @@ require torizon-core-docker.bb require torizon-core-dev.inc -DESCRIPTION = "TorizonCore Linux with no containers pre-provisioned (with debugging tools)." + +DESCRIPTION = "TorizonCore Linux engineering image" diff --git a/recipes-images/images/torizon-core-docker.bb b/recipes-images/images/torizon-core-docker.bb index 6855bcca..da073d23 100644 --- a/recipes-images/images/torizon-core-docker.bb +++ b/recipes-images/images/torizon-core-docker.bb @@ -2,18 +2,9 @@ SUMMARY = "TorizonCore" DESCRIPTION = "TorizonCore Linux with no containers pre-provisioned." require torizon-core-common.inc +require torizon-core-container.inc -IMAGE_FEATURES += "bash-completion-pkgs" - -CORE_IMAGE_BASE_INSTALL:append = " \ - docker-ce \ - docker-compose \ - docker-compose-up \ - docker-integrity-checker \ - docker-watchdog \ - docker-auto-prune \ -" - +VIRTUAL-RUNTIME_container_engine = "docker-ce" IMAGE_VARIANT = "Docker" inherit extrausers diff --git a/recipes-images/images/torizon-core-podman.bb b/recipes-images/images/torizon-core-podman.bb index 69d0a93a..4c80704f 100644 --- a/recipes-images/images/torizon-core-podman.bb +++ b/recipes-images/images/torizon-core-podman.bb @@ -3,11 +3,11 @@ DESCRIPTION = "TorizonCore Linux experimental image based on production image \ using Podman container engine." require torizon-core-common.inc +require torizon-core-container.inc +VIRTUAL-RUNTIME_container_engine = "podman" IMAGE_VARIANT = "Podman" CORE_IMAGE_BASE_INSTALL:append = " \ - podman \ - podman-compose \ fuse-overlayfs \ " diff --git a/recipes-images/images/torizon-os-version.inc b/recipes-images/images/torizon-os-version.inc new file mode 100644 index 00000000..73d1aee8 --- /dev/null +++ b/recipes-images/images/torizon-os-version.inc @@ -0,0 +1,6 @@ + +TDX_MAJOR = "6" +TDX_MINOR = "6" +TDX_PATCH = "0" + +TDX_RELEASE = "${TDX_MAJOR}.${TDX_MINOR}.${TDX_PATCH}-common" diff --git a/recipes-kernel/linux/common.inc b/recipes-kernel/linux/common.inc new file mode 100644 index 00000000..af610a77 --- /dev/null +++ b/recipes-kernel/linux/common.inc @@ -0,0 +1,21 @@ + +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI:append = " \ + file://debug.cfg \ + file://${MACHINE}.cfg \ +" + +do_configure:append() { + # machine fragment + if [ -f ${WORKDIR}/${MACHINE}.cfg ]; then + cat ${WORKDIR}/${MACHINE}.cfg >> ${B}/.config + else + bbfatal "No machine specific config fragment found for ${MACHINE}" + fi + + # debug fragment + if [ "${TDX_DEBUG}" = "1" ]; then + cat ${WORKDIR}/debug.cfg >> ${B}/.config + fi +} diff --git a/recipes-kernel/linux/files/0001-i915-hwmon-dgfx-check.patch b/recipes-kernel/linux/files/0001-i915-hwmon-dgfx-check.patch new file mode 100644 index 00000000..6fff5e07 --- /dev/null +++ b/recipes-kernel/linux/files/0001-i915-hwmon-dgfx-check.patch @@ -0,0 +1,30 @@ +From 73f7adae5b49685c7e18f811039c8de543cdf0ac Mon Sep 17 00:00:00 2001 +From: Matheus Castello +Date: Sun, 15 Oct 2023 17:39:14 -0300 +Subject: [PATCH] i915: hwmon: Add check for the dGfx platform + +The hwmon should be available only for dGfx platform + +Signed-off-by: Matheus Castello +--- + drivers/gpu/drm/i915/i915_hwmon.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/drivers/gpu/drm/i915/i915_hwmon.c b/drivers/gpu/drm/i915/i915_hwmon.c +index 6e0944af3131..d0ee493f1e7c 100644 +--- a/drivers/gpu/drm/i915/i915_hwmon.c ++++ b/drivers/gpu/drm/i915/i915_hwmon.c +@@ -500,6 +500,10 @@ void i915_hwmon_register(struct drm_i915_private *i915) + struct device *hwmon_dev; + struct i915_hwmon_drvdata *ddat; + ++ /* hwmon is available only for dGfx */ ++ if (!IS_DGFX(i915)) ++ return; ++ + hwmon = kzalloc(sizeof(*hwmon), GFP_KERNEL); + if (!hwmon) + return; +-- +2.42.0 + diff --git a/recipes-kernel/linux/files/apalis-imx8.cfg b/recipes-kernel/linux/files/apalis-imx8.cfg new file mode 100644 index 00000000..78c2834e --- /dev/null +++ b/recipes-kernel/linux/files/apalis-imx8.cfg @@ -0,0 +1,14 @@ +# splash screen +CONFIG_DRM_DISPLAY_CONNECTOR=y +CONFIG_DRM_IMX_CDNS_MHDP=m +CONFIG_DRM_SEC_MIPI_DSIM=y +CONFIG_DRM_IMX_SEC_DSIM=y +CONFIG_SND_SOC_IMX_HDMI=y +CONFIG_SND_SOC_IMX_SGTL5000=y +CONFIG_DRM_CDNS_MHDP=y +CONFIG_DRM_CDNS_HDMI=y +CONFIG_DRM_CDNS_DP=y +CONFIG_DRM_CDNS_AUDIO=y +CONFIG_DRM_CDNS_HDCP=y +CONFIG_DRM_CDNS_HDMI_CEC=y +# end of the kernel hack diff --git a/recipes-kernel/linux/files/beaglebone-yocto.cfg b/recipes-kernel/linux/files/beaglebone-yocto.cfg new file mode 100644 index 00000000..a1fb79a8 --- /dev/null +++ b/recipes-kernel/linux/files/beaglebone-yocto.cfg @@ -0,0 +1,11 @@ +CONFIG_SOUND=y +CONFIG_SND=y +CONFIG_SND_PCM=y +CONFIG_SND_SOC=y +CONFIG_SND_SIMPLE_CARD_UTILS=y +CONFIG_SND_SIMPLE_CARD=y +CONFIG_SND_SOC_DAVINCI_MCASP=y +CONFIG_SND_SOC_TI_EDMA_PCM=y +CONFIG_SND_SOC_TI_SDMA_PCM=y +CONFIG_SND_SOC_TI_UDMA_PCM=y +CONFIG_SND_SOC_HDMI_CODEC=y diff --git a/recipes-kernel/linux/files/beaglebone-yocto/am335x-boneblack-hdmi.dtsi b/recipes-kernel/linux/files/beaglebone-yocto/am335x-boneblack-hdmi.dtsi new file mode 100644 index 00000000..ee6c799a --- /dev/null +++ b/recipes-kernel/linux/files/beaglebone-yocto/am335x-boneblack-hdmi.dtsi @@ -0,0 +1,141 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (C) 2012 Texas Instruments Incorporated - https://www.ti.com/ + */ + +#include +#include + +&am33xx_pinmux { + nxp_hdmi_bonelt_pins: nxp_hdmi_bonelt_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT_PULLDOWN, MUX_MODE3) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA0, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA1, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA2, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA3, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA4, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA5, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA6, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA7, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA8, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA9, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA10, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA11, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA12, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA13, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA14, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_DATA15, PIN_OUTPUT, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_VSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_HSYNC, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_PCLK, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_LCD_AC_BIAS_EN, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + >; + }; + + nxp_hdmi_bonelt_off_pins: nxp_hdmi_bonelt_off_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_XDMA_EVENT_INTR0, PIN_OUTPUT_PULLDOWN, MUX_MODE3) + >; + }; + + mcasp0_pins: mcasp0_pins { + pinctrl-single,pins = < + AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKX, PIN_INPUT_PULLUP, MUX_MODE0) /* mcasp0_ahcklx.mcasp0_ahclkx */ + AM33XX_PADCONF(AM335X_PIN_MCASP0_AHCLKR, PIN_OUTPUT_PULLDOWN, MUX_MODE2) /* mcasp0_ahclkr.mcasp0_axr2*/ + AM33XX_PADCONF(AM335X_PIN_MCASP0_FSX, PIN_OUTPUT_PULLUP, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_MCASP0_ACLKX, PIN_OUTPUT_PULLDOWN, MUX_MODE0) + AM33XX_PADCONF(AM335X_PIN_GPMC_A11, PIN_OUTPUT_PULLDOWN, MUX_MODE7) /* gpmc_a11.GPIO1_27 */ + >; + }; +}; + +&lcdc { + status = "okay"; + + /* If you want to get 24 bit RGB and 16 BGR mode instead of + * current 16 bit RGB and 24 BGR modes, set the propety + * below to "crossed" and uncomment the video-ports -property + * in tda19988 node. + */ + blue-and-red-wiring = "crossed"; + + port { + lcdc_0: endpoint@0 { + remote-endpoint = <&hdmi_0>; + }; + }; +}; + +&i2c0 { + tda19988: tda19988@70 { + compatible = "nxp,tda998x"; + reg = <0x70>; + nxp,calib-gpios = <&gpio1 25 0>; + interrupts-extended = <&gpio1 25 IRQ_TYPE_LEVEL_LOW>; + + pinctrl-names = "default", "off"; + pinctrl-0 = <&nxp_hdmi_bonelt_pins>; + pinctrl-1 = <&nxp_hdmi_bonelt_off_pins>; + + /* Convert 24bit BGR to RGB, e.g. cross red and blue wiring */ + video-ports = <0x234501>; + + #sound-dai-cells = <0>; + audio-ports = < TDA998x_I2S 0x03>; + + ports { + port@0 { + hdmi_0: endpoint@0 { + remote-endpoint = <&lcdc_0>; + }; + }; + }; + }; +}; + +&mcasp0 { + #sound-dai-cells = <0>; + pinctrl-names = "default"; + pinctrl-0 = <&mcasp0_pins>; + status = "okay"; + op-mode = <0>; /* MCASP_IIS_MODE */ + tdm-slots = <2>; + serial-dir = < /* 0: INACTIVE, 1: TX, 2: RX */ + 0 0 1 0 + >; + tx-num-evt = <32>; + rx-num-evt = <32>; +}; + +/ { + clk_mcasp0_fixed: clk_mcasp0_fixed { + #clock-cells = <0>; + compatible = "fixed-clock"; + clock-frequency = <24576000>; + }; + + clk_mcasp0: clk_mcasp0 { + #clock-cells = <0>; + compatible = "gpio-gate-clock"; + clocks = <&clk_mcasp0_fixed>; + enable-gpios = <&gpio1 27 0>; /* BeagleBone Black Clk enable on GPIO1_27 */ + }; + + sound { + compatible = "simple-audio-card"; + simple-audio-card,name = "TI BeagleBone Black"; + simple-audio-card,format = "i2s"; + simple-audio-card,bitclock-master = <&dailink0_master>; + simple-audio-card,frame-master = <&dailink0_master>; + + dailink0_master: simple-audio-card,cpu { + sound-dai = <&mcasp0>; + clocks = <&clk_mcasp0>; + }; + + simple-audio-card,codec { + sound-dai = <&tda19988>; + }; + }; +}; diff --git a/recipes-kernel/linux/files/beagleplay.cfg b/recipes-kernel/linux/files/beagleplay.cfg new file mode 100644 index 00000000..d99548d7 --- /dev/null +++ b/recipes-kernel/linux/files/beagleplay.cfg @@ -0,0 +1,6 @@ +# CONFIG_REMOTEPROC is not set +# CONFIG_PRU_REMOTEPROC is not set +# CONFIG_TI_K3_DSP_REMOTEPROC is not set +# CONFIG_TI_K3_R5_REMOTEPROC is not set +# CONFIG_TI_K3_M4_REMOTEPROC is not set +# CONFIG_WATCHDOG is not set diff --git a/recipes-kernel/linux/files/debug.cfg b/recipes-kernel/linux/files/debug.cfg new file mode 100644 index 00000000..46b1d58e --- /dev/null +++ b/recipes-kernel/linux/files/debug.cfg @@ -0,0 +1,28 @@ +# kgdb +# CONFIG_STRICT_KERNEL_RWX is not set +# CONFIG_DEBUG_INFO_REDUCED is not set +CONFIG_DEBUG_KERNEL=y +CONFIG_DEBUG_INFO=y +CONFIG_FRAME_POINTER=y +CONFIG_STACK_TRACER=y +CONFIG_KGDB=y +CONFIG_KGDB_SERIAL_CONSOLE=y +# CONFIG_KGDB_KDB is not set +# CONFIG_KDB_KEYBOARD is not set +CONFIG_GDB_SCRIPTS=y +# CONFIG_RANDOMIZE_BASE is not set +# for toradex the watchdog and the imx2+ wdt need to be disable +# to be possible to use kgdb +# CONFIG_IMX2_WDT is not set +# for toradex we need to enable all sysrq keys +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 + +# make sure to have config.gz +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y + +# kdump +CONFIG_KEXEC_FILE=y +CONFIG_KEXEC=y +CONFIG_CRASH_DUMP=y +CONFIG_PROC_VMCORE=y diff --git a/recipes-kernel/linux/files/intel-corei7-64.cfg b/recipes-kernel/linux/files/intel-corei7-64.cfg new file mode 100644 index 00000000..a55cf936 --- /dev/null +++ b/recipes-kernel/linux/files/intel-corei7-64.cfg @@ -0,0 +1,59 @@ +CONFIG_I2C_ALGOBIT=y +CONFIG_CEC_CORE=y +CONFIG_DRM=y +# CONFIG_DRM_DEBUG_MM is not set +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_SCHED=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FB_SYS_FOPS=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_DRM_PANEL_SIMPLE=y +# CHECK CONFIG +CONFIG_NETFILTER_XT_MATCH_IPVS=m +CONFIG_CGROUP_SCHED=y +CONFIG_BLK_CGROUP=y +CONFIG_BLK_DEV_THROTTLING=y +CONFIG_CFS_BANDWIDTH=y +CONFIG_IP_VS=m +CONFIG_IP_VS_NFCT=y +CONFIG_IP_VS_PROTO_TCP=y +CONFIG_IP_VS_PROTO_UDP=y +CONFIG_IP_VS_RR=m +CONFIG_SECURITY_SELINUX=y +CONFIG_SECURITY_APPARMOR=y +CONFIG_BRIDGE_VLAN_FILTERING=y +CONFIG_IPVLAN=m +CONFIG_AUFS_FS=m +# INTEL +CONFIG_DRM_I915=y +# INTEL NETWORK +CONFIG_IGC=m +# AMD +CONFIG_DRM_AMDGPU=y +CONFIG_DRM_AMDGPU_SI=y +CONFIG_DRM_AMDGPU_CIK=y +CONFIG_DRM_AMDGPU_USERPTR=y +CONFIG_DRM_AMD_ACP=y +CONFIG_DRM_AMD_DC=y +CONFIG_DRM_AMD_DC_DCN=y +CONFIG_DRM_AMD_DC_HDCP=y +CONFIG_DRM_AMD_DC_SI=y +CONFIG_DRM_AMD_SECURE_DISPLAY=y +# VMWARE +CONFIG_DRM_VMWGFX=y +CONFIG_DRM_VMWGFX_FBCON=y +# VIRTUAL BOX +CONFIG_DRM_VBOXVIDEO=y +CONFIG_VBOXGUEST=m +CONFIG_VBOXSF_FS=m +# QEMU +CONFIG_DRM_CIRRUS_QEMU=y +# USB +CONFIG_USB_SERIAL_WWAN=m +CONFIG_USB_SERIAL_OPTION=m \ No newline at end of file diff --git a/recipes-kernel/linux/files/nezha-allwinner-d1.cfg b/recipes-kernel/linux/files/nezha-allwinner-d1.cfg new file mode 100644 index 00000000..e69de29b diff --git a/recipes-kernel/linux/files/qemuarm64.cfg b/recipes-kernel/linux/files/qemuarm64.cfg new file mode 100644 index 00000000..258bf88f --- /dev/null +++ b/recipes-kernel/linux/files/qemuarm64.cfg @@ -0,0 +1,41 @@ +# enable qemuarm drm +CONFIG_DRM=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_BRIDGE=y +CONFIG_DRM_PANEL_BRIDGE=y +CONFIG_DRM_CIRRUS_QEMU=y +CONFIG_DRM_VBOXVIDEO=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_FB_CMDLINE=y +CONFIG_FB_NOTIFY=y +CONFIG_FB=y +CONFIG_FIRMWARE_EDID=y +CONFIG_FB_DDC=m +CONFIG_FB_BOOT_VESA_SUPPORT=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=y +CONFIG_FB_DEFERRED_IO=y +CONFIG_FB_HECUBA=m +CONFIG_FB_SVGALIB=m +CONFIG_FB_BACKLIGHT=m +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y +CONFIG_FB_CIRRUS=y +CONFIG_FB_ARC=y +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +CONFIG_FB_VGA16=y +CONFIG_FB_UVESA=y +CONFIG_FB_VESA=y +CONFIG_FB_SIMPLE=y +CONFIG_DRM_VMWGFX=m +CONFIG_DRM_VMWGFX_FBCON=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_CP210X=y diff --git a/recipes-kernel/linux/files/qemux86-64.cfg b/recipes-kernel/linux/files/qemux86-64.cfg new file mode 100644 index 00000000..72ad6e77 --- /dev/null +++ b/recipes-kernel/linux/files/qemux86-64.cfg @@ -0,0 +1,43 @@ +# enable qemuarm drm +CONFIG_DRM=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_BRIDGE=y +CONFIG_DRM_PANEL_BRIDGE=y +CONFIG_DRM_CIRRUS_QEMU=y +CONFIG_DRM_VBOXVIDEO=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_FB_CMDLINE=y +CONFIG_FB_NOTIFY=y +CONFIG_FB=y +CONFIG_FIRMWARE_EDID=y +CONFIG_FB_DDC=m +CONFIG_FB_BOOT_VESA_SUPPORT=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +# CONFIG_FB_FOREIGN_ENDIAN is not set +CONFIG_FB_SYS_FOPS=y +CONFIG_FB_DEFERRED_IO=y +CONFIG_FB_HECUBA=m +CONFIG_FB_SVGALIB=m +CONFIG_FB_BACKLIGHT=m +CONFIG_FB_MODE_HELPERS=y +CONFIG_FB_TILEBLITTING=y +CONFIG_FB_CIRRUS=y +CONFIG_FB_ARC=y +# CONFIG_FB_ASILIANT is not set +# CONFIG_FB_IMSTT is not set +CONFIG_FB_VGA16=y +CONFIG_FB_UVESA=y +CONFIG_FB_VESA=y +CONFIG_FB_SIMPLE=y +CONFIG_DRM_VMWGFX=m +CONFIG_DRM_VMWGFX_FBCON=y +CONFIG_USB_SERIAL=y +CONFIG_USB_SERIAL_CONSOLE=y +CONFIG_USB_SERIAL_CP210X=y +CONFIG_USB_SERIAL_WWAN=m +CONFIG_USB_SERIAL_OPTION=m diff --git a/recipes-kernel/linux/files/raspberrypi0-2w-64.cfg b/recipes-kernel/linux/files/raspberrypi0-2w-64.cfg new file mode 100644 index 00000000..fada48e3 --- /dev/null +++ b/recipes-kernel/linux/files/raspberrypi0-2w-64.cfg @@ -0,0 +1,22 @@ +CONFIG_I2C_ALGOBIT=y +CONFIG_CEC_CORE=y +CONFIG_DRM=y +# CONFIG_DRM_DEBUG_MM is not set +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_SCHED=y +CONFIG_DRM_V3D=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_BCM2835=y +CONFIG_DRM_VC4=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FB_SYS_FOPS=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y diff --git a/recipes-kernel/linux/files/raspberrypi0-wifi.cfg b/recipes-kernel/linux/files/raspberrypi0-wifi.cfg new file mode 100644 index 00000000..fada48e3 --- /dev/null +++ b/recipes-kernel/linux/files/raspberrypi0-wifi.cfg @@ -0,0 +1,22 @@ +CONFIG_I2C_ALGOBIT=y +CONFIG_CEC_CORE=y +CONFIG_DRM=y +# CONFIG_DRM_DEBUG_MM is not set +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_SCHED=y +CONFIG_DRM_V3D=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_BCM2835=y +CONFIG_DRM_VC4=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FB_SYS_FOPS=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y diff --git a/recipes-kernel/linux/files/raspberrypi3-64.cfg b/recipes-kernel/linux/files/raspberrypi3-64.cfg new file mode 100644 index 00000000..fada48e3 --- /dev/null +++ b/recipes-kernel/linux/files/raspberrypi3-64.cfg @@ -0,0 +1,22 @@ +CONFIG_I2C_ALGOBIT=y +CONFIG_CEC_CORE=y +CONFIG_DRM=y +# CONFIG_DRM_DEBUG_MM is not set +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_SCHED=y +CONFIG_DRM_V3D=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_BCM2835=y +CONFIG_DRM_VC4=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FB_SYS_FOPS=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y diff --git a/recipes-kernel/linux/files/raspberrypi4-64.cfg b/recipes-kernel/linux/files/raspberrypi4-64.cfg new file mode 100644 index 00000000..fada48e3 --- /dev/null +++ b/recipes-kernel/linux/files/raspberrypi4-64.cfg @@ -0,0 +1,22 @@ +CONFIG_I2C_ALGOBIT=y +CONFIG_CEC_CORE=y +CONFIG_DRM=y +# CONFIG_DRM_DEBUG_MM is not set +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_SCHED=y +CONFIG_DRM_V3D=y +CONFIG_SND=y +CONFIG_SND_SOC=y +CONFIG_SND_BCM2835=y +CONFIG_DRM_VC4=y +CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +CONFIG_FB_SYS_FILLRECT=y +CONFIG_FB_SYS_COPYAREA=y +CONFIG_FB_SYS_IMAGEBLIT=y +CONFIG_FB_SYS_FOPS=y +CONFIG_BACKLIGHT_CLASS_DEVICE=y +CONFIG_DRM_PANEL_SIMPLE=y +CONFIG_DRM_PANEL_RASPBERRYPI_TOUCHSCREEN=y diff --git a/recipes-kernel/linux/files/torizoncore.cfg b/recipes-kernel/linux/files/torizoncore.cfg index 7bf664a6..1598ece8 100644 --- a/recipes-kernel/linux/files/torizoncore.cfg +++ b/recipes-kernel/linux/files/torizoncore.cfg @@ -1,3 +1,11 @@ CONFIG_BLK_DEV_THROTTLING=y CONFIG_CFS_BANDWIDTH=y CONFIG_WIREGUARD=m +CONFIG_SWAP=y +CONFIG_ZSMALLOC=y +CONFIG_KERNEL_LZ4=y +CONFIG_CRYPTO_LZ4=y +CONFIG_LZ4_COMPRESS=y +CONFIG_DECOMPRESS_LZ4=y +CONFIG_ZRAM=m +CONFIG_ZRAM_WRITEBACK=y diff --git a/recipes-kernel/linux/files/verdin-imx8mm.cfg b/recipes-kernel/linux/files/verdin-imx8mm.cfg new file mode 100644 index 00000000..c9f9b1c6 --- /dev/null +++ b/recipes-kernel/linux/files/verdin-imx8mm.cfg @@ -0,0 +1,14 @@ +# splash screen +CONFIG_DRM=y +CONFIG_DRM_DISPLAY_CONNECTOR=y +CONFIG_DRM_BRIDGE=y +CONFIG_DRM_PANEL_BRIDGE=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_MIPI_DSI=y +CONFIG_REGMAP_I2C=y +CONFIG_VIDEOMODE_HELPERS=y +CONFIG_DRM_LONTIUM_LT8912B=y +CONFIG_DRM_SEC_MIPI_DSIM=y +CONFIG_DRM_IMX_SEC_DSIM=y +CONFIG_DRM_TI_SN65DSI83=y +# end of the kernel hack diff --git a/recipes-kernel/linux/files/verdin-imx8mp.cfg b/recipes-kernel/linux/files/verdin-imx8mp.cfg new file mode 100644 index 00000000..c9f9b1c6 --- /dev/null +++ b/recipes-kernel/linux/files/verdin-imx8mp.cfg @@ -0,0 +1,14 @@ +# splash screen +CONFIG_DRM=y +CONFIG_DRM_DISPLAY_CONNECTOR=y +CONFIG_DRM_BRIDGE=y +CONFIG_DRM_PANEL_BRIDGE=y +CONFIG_DRM_KMS_HELPER=y +CONFIG_DRM_MIPI_DSI=y +CONFIG_REGMAP_I2C=y +CONFIG_VIDEOMODE_HELPERS=y +CONFIG_DRM_LONTIUM_LT8912B=y +CONFIG_DRM_SEC_MIPI_DSIM=y +CONFIG_DRM_IMX_SEC_DSIM=y +CONFIG_DRM_TI_SN65DSI83=y +# end of the kernel hack diff --git a/recipes-kernel/linux/kernel-devsrc.bbappend b/recipes-kernel/linux/kernel-devsrc.bbappend index 8bd19bbe..d02d266e 100644 --- a/recipes-kernel/linux/kernel-devsrc.bbappend +++ b/recipes-kernel/linux/kernel-devsrc.bbappend @@ -1,4 +1,33 @@ do_install:append() { + + # Adapted backport from the following langdale commit: + # https://git.openembedded.org/openembedded-core/commit/meta/recipes-kernel/linux/kernel-devsrc.bb?h=langdale&id=7b195d7be1d0db1ad8024494ff990717bd30aea4 + ###################################################################################################### + if [ "${ARCH}" = "arm64" ]; then + ( + cd ${S} + # Needed for kernel 5.19+ + cp -a --parents arch/arm64/tools/gen-sysreg.awk $kerneldir/build/ 2>/dev/null || : + cp -a --parents arch/arm64/tools/sysreg $kerneldir/build/ 2>/dev/null || : + + if [ -e $kerneldir/build/arch/arm64/tools/gen-sysreg.awk ]; then + sed -i -e "s,#!.*awk.*,#!${USRBINPATH}/env awk," $kerneldir/build/arch/arm64/tools/gen-sysreg.awk + fi + + chown -R root:root $kerneldir/build/arch/arm64/tools/ + ) + fi + + if [ "${ARCH}" = "arm" ]; then + ( + cd ${S} + cp -a --parents arch/arm/tools/gen-sysreg.awk $kerneldir/build/ 2>/dev/null || : + + chown -R root:root $kerneldir/build/arch/arm/tools/ + ) + fi + ###################################################################################################### + mv $kerneldir/build $kerneldir/linux tar cjfv ${D}/usr/src/linux.tar.bz2 -C $kerneldir linux rm -rf ${D}/usr/lib ${D}/usr/src/kernel diff --git a/recipes-kernel/linux/linux-bb.org_%.bbappend b/recipes-kernel/linux/linux-bb.org_%.bbappend new file mode 100644 index 00000000..57ce0433 --- /dev/null +++ b/recipes-kernel/linux/linux-bb.org_%.bbappend @@ -0,0 +1,2 @@ + +require common.inc diff --git a/recipes-kernel/linux/linux-intel%.bbappend b/recipes-kernel/linux/linux-intel%.bbappend new file mode 100644 index 00000000..b062f8bc --- /dev/null +++ b/recipes-kernel/linux/linux-intel%.bbappend @@ -0,0 +1,8 @@ + +require common.inc + +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI:append = "\ + file://0001-i915-hwmon-dgfx-check.patch \ +" diff --git a/recipes-kernel/linux/linux-nezha-%.bbappend b/recipes-kernel/linux/linux-nezha-%.bbappend new file mode 100644 index 00000000..57ce0433 --- /dev/null +++ b/recipes-kernel/linux/linux-nezha-%.bbappend @@ -0,0 +1,2 @@ + +require common.inc diff --git a/recipes-kernel/linux/linux-raspberrypi_5.15.bbappend b/recipes-kernel/linux/linux-raspberrypi_5.15.bbappend new file mode 100644 index 00000000..53237e9c --- /dev/null +++ b/recipes-kernel/linux/linux-raspberrypi_5.15.bbappend @@ -0,0 +1,14 @@ + +LINUX_VERSION = "5.15.92" + +# use microhobby kernel Disable bt and use PL011 as console +SRCREV_machine = "361db6f664a26ca785fedf55f4d021a3fbdfd6dd" + +SRC_URI = " \ + git://github.com/microhobby/linus-tree.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \ + file://powersave.cfg \ + file://android-drivers.cfg \ +" + +require common.inc diff --git a/recipes-kernel/linux/linux-toradex%.bbappend b/recipes-kernel/linux/linux-toradex%.bbappend index 5ee21a22..caa6b4fc 100644 --- a/recipes-kernel/linux/linux-toradex%.bbappend +++ b/recipes-kernel/linux/linux-toradex%.bbappend @@ -1,2 +1,8 @@ + +# Make sure to override LOCALVERSION in linux-imx.inc +LOCALVERSION = "-${TDX_VERSION}-labs" + + require linux-torizon.inc require linux-toradex-kmeta.inc +require common.inc diff --git a/recipes-kernel/linux/linux-toradex-kmeta.inc b/recipes-kernel/linux/linux-toradex-kmeta.inc index 807d09d0..e0cfbe22 100644 --- a/recipes-kernel/linux/linux-toradex-kmeta.inc +++ b/recipes-kernel/linux/linux-toradex-kmeta.inc @@ -1,4 +1,4 @@ -SRCREV_meta = "94602d061163aaf7dbeed11dd0384b9f23fef5eb" +SRCREV_meta = "28e4bed443b7fda1bfbd028abf38f655397b6268" SRCREV_meta:use-head-next = "${AUTOREV}" KMETABRANCH = "kirkstone-6.x.y" diff --git a/recipes-kernel/linux/linux-yocto%.bbappend b/recipes-kernel/linux/linux-yocto%.bbappend index 3f86f152..c6697ed2 100644 --- a/recipes-kernel/linux/linux-yocto%.bbappend +++ b/recipes-kernel/linux/linux-yocto%.bbappend @@ -7,3 +7,6 @@ SRC_URI += "\ " inherit toradex-kernel-localversion + +require common.inc +require specific.inc diff --git a/recipes-kernel/linux/specific.inc b/recipes-kernel/linux/specific.inc new file mode 100644 index 00000000..95aeb781 --- /dev/null +++ b/recipes-kernel/linux/specific.inc @@ -0,0 +1,10 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +SRC_URI:append = " \ + file://${MACHINE}/ \ +" + +# prepend custom device trees +do_configure:prepend:beaglebone-yocto() { + cp ${WORKDIR}/${MACHINE}/*.dts* ${S}/arch/arm/boot/dts +} diff --git a/recipes-sota/aktualizr-torizon/aktualizr-torizon_git.bb b/recipes-sota/aktualizr-torizon/aktualizr-torizon_git.bb index 7430c9de..7ffad757 100644 --- a/recipes-sota/aktualizr-torizon/aktualizr-torizon_git.bb +++ b/recipes-sota/aktualizr-torizon/aktualizr-torizon_git.bb @@ -14,7 +14,7 @@ SRC_URI = " \ https://tuf-cli-releases.ota.here.com/cli-${GARAGE_SIGN_PV}.tgz;unpack=0;name=garagesign \ " -SRCREV = "d71f18a1b8139cd4adadb41667b73d7c92fdbd9f" +SRCREV = "72b0ec59a07f7378bfc032c7227204bbd18ec378" SRCREV:use-head-next = "${AUTOREV}" S = "${WORKDIR}/git" diff --git a/recipes-sota/auto-provisioning/auto-provisioning/auto-provisioning.sh b/recipes-sota/auto-provisioning/auto-provisioning/auto-provisioning.sh index 0b662d13..37c1f8bf 100755 --- a/recipes-sota/auto-provisioning/auto-provisioning/auto-provisioning.sh +++ b/recipes-sota/auto-provisioning/auto-provisioning/auto-provisioning.sh @@ -138,6 +138,11 @@ function restart_services() log "Enabling and restarting fluent-bit" touch /etc/fluent-bit/enabled systemctl restart fluent-bit + + if systemctl is-enabled remote-access; then + log "Restarting Remote Access Client (RAC)" + systemctl restart remote-access + fi } function main() diff --git a/recipes-sota/config/aktualizr-default-sec.bb b/recipes-sota/config/aktualizr-default-sec.bb index ff4f1d81..0de1178b 100644 --- a/recipes-sota/config/aktualizr-default-sec.bb +++ b/recipes-sota/config/aktualizr-default-sec.bb @@ -14,6 +14,8 @@ SRC_URI = " \ RDEPENDS:${PN} += "bash coreutils jq util-linux mmc-utils sed u-boot-fw-utils" RDEPENDS:${PN}:remove:genericx86-64 = "u-boot-fw-utils" +RDEPENDS:${PN}:remove:qemux86-64 = "u-boot-fw-utils" +RDEPENDS:${PN}:remove:intel-corei7-64 = "u-boot-fw-utils" do_install:append () { install -m 0700 -d ${D}${libdir}/sota/conf.d diff --git a/recipes-sota/grub-ota-fallback/grub-ota-fallback/99_fallback_logic b/recipes-sota/grub-ota-fallback/grub-ota-fallback/99_fallback_logic new file mode 100644 index 00000000..cb029058 --- /dev/null +++ b/recipes-sota/grub-ota-fallback/grub-ota-fallback/99_fallback_logic @@ -0,0 +1,53 @@ +# GRUB can't add, so we hack an increment +set inc_range="0,1 1,2 2,3" +function inc_bootcount { + set incr="" + regexp --set=1:incr "${bootcount},([0-9]+)" "${inc_range}" + set bootcount=$incr +} + +function inc_default { + set incr="" + regexp --set=1:incr "${default},([0-9]+)" "${inc_range}" + set default=$incr +} + +# Load all the variables needed +load_env + +if [ "${rollback}" == "0" -a "${upgrade_available}" = "1" ]; then + # Make sure to reset default whenever we already performed a rollback + # and deployed a new image. This way we'll be able to boot this new image + # and test it. If all fails we can still fallback. + set default=0 + save_env default +fi + +if [ "${rollback}" == "1" -a "${upgrade_available}" = "1" ]; then + # Make sure to reset upgrade_available to avoid unnecessary wear + # Note this also makes rollback permanent. aktualizr will reset rollback + # when a new (hopefully better) update comes in. + set upgrade_available=0 + save_env upgrade_available +fi + +if [ "${bootcount}" == "${bootlimit}" ]; then + # We've reached our retry limit, marking for OS rollback + set rollback=1 + save_env rollback +else + inc_bootcount + save_env bootcount +fi + +if [ "${upgrade_available}" == "1" ]; then + if [ "${rollback}" == 1 ]; then + # We need to rollback, so we reset 'bootcount' and increase default value. + # Since entries are ordered from newest to oldest, increasing default is + # rolling back to the last entry. + inc_default + set bootcount=0 + save_env default + save_env bootcount + fi +fi diff --git a/recipes-sota/grub-ota-fallback/grub-ota-fallback/fw_printenv b/recipes-sota/grub-ota-fallback/grub-ota-fallback/fw_printenv new file mode 100644 index 00000000..b5569a9b --- /dev/null +++ b/recipes-sota/grub-ota-fallback/grub-ota-fallback/fw_printenv @@ -0,0 +1,8 @@ +#!/bin/bash + +# Aliasing grub-editenv to U-Boot's fw_setenv +if [[ $# -ne 1 ]]; then + grub-editenv /var/rootdirs/media/efi/EFI/BOOT/grubenv list +else + grub-editenv /var/rootdirs/media/efi/EFI/BOOT/grubenv list | grep "^$1=" || echo "$1=" +fi \ No newline at end of file diff --git a/recipes-sota/grub-ota-fallback/grub-ota-fallback/fw_setenv b/recipes-sota/grub-ota-fallback/grub-ota-fallback/fw_setenv new file mode 100644 index 00000000..f01651ee --- /dev/null +++ b/recipes-sota/grub-ota-fallback/grub-ota-fallback/fw_setenv @@ -0,0 +1,6 @@ +#!/bin/bash + +# Aliasing grub-editenv to U-Boot's fw_setenv +if [[ $# -eq 2 ]]; then + grub-editenv /var/rootdirs/media/efi/EFI/BOOT/grubenv set "$1"="$2" +fi \ No newline at end of file diff --git a/recipes-sota/grub-ota-fallback/grub-ota-fallback/grubenv-create.service b/recipes-sota/grub-ota-fallback/grub-ota-fallback/grubenv-create.service new file mode 100644 index 00000000..c99ed932 --- /dev/null +++ b/recipes-sota/grub-ota-fallback/grub-ota-fallback/grubenv-create.service @@ -0,0 +1,13 @@ +[Unit] +Description=Check and create grubenv if not present +After=boot-complete.target +Requires=boot-complete.target +ConditionPathExists=|!/var/rootdirs/media/efi/EFI/BOOT/grubenv + +[Service] +Type=oneshot +WorkingDirectory=/var/rootdirs/media/efi/EFI/BOOT/ +ExecStart=/usr/bin/grub-editenv ./grubenv create ; /usr/bin/grub-editenv ./grubenv set bootcount=0 bootlimit=3 rollback=0 upgrade_available=0 + +[Install] +WantedBy=multi-user.target diff --git a/recipes-sota/grub-ota-fallback/grub-ota-fallback_1.0.bb b/recipes-sota/grub-ota-fallback/grub-ota-fallback_1.0.bb new file mode 100644 index 00000000..85018939 --- /dev/null +++ b/recipes-sota/grub-ota-fallback/grub-ota-fallback_1.0.bb @@ -0,0 +1,37 @@ +SUMMARY = "Adds fallback logic to GRUB boot script" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = "\ + file://99_fallback_logic \ + file://grubenv-create.service \ + file://fw_printenv \ + file://fw_setenv \ +" + +S = "${WORKDIR}" + +inherit systemd + +RDEPENDS:${PN} = "bash" + +SYSTEMD_SERVICE:${PN} = "grubenv-create.service" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/fw_printenv ${D}${bindir}/fw_printenv + install -m 0755 ${WORKDIR}/fw_setenv ${D}${bindir}/fw_setenv + + install -d ${D}${sysconfdir}/ostree.d + install -m 0755 ${WORKDIR}/99_fallback_logic ${D}${sysconfdir}/ostree.d/99_fallback_logic + + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${WORKDIR}/grubenv-create.service ${D}${systemd_unitdir}/system/grubenv-create.service +} + +FILES:${PN} += "\ + ${systemd_unitdir}/system/grubenv-create.service \ + ${bindir}/fw_printenv \ + ${bindir}/fw_setenv \ +" \ No newline at end of file diff --git a/recipes-sota/provision-device/provision-device/provision-device b/recipes-sota/provision-device/provision-device/provision-device new file mode 100644 index 00000000..48af1178 --- /dev/null +++ b/recipes-sota/provision-device/provision-device/provision-device @@ -0,0 +1,189 @@ +#!/usr/bin/env bash + +function GetDeviceID() { + cat "${SYSROOT_PATH_PREFIX}"/etc/hostname +} + +function RegisterDevice() { + + echo "== Registering device (deviceID: ${DEVICE_ID}) in system, and downloading credentials." + cd "$(mktemp -d)" || exit 1 + http_code=$(curl -s -w '%{http_code}' --max-time 30 -X POST -H "Authorization: Bearer $PROVISIONING_TOKEN" "$AUTOPROV_URL" -d "{\"device_id\": \"${DEVICE_ID}\", \"device_name\": \"${DEVICE_NAME}\"}" -o device.zip) + + if [[ ! $http_code -eq 200 ]]; then + # if we failed, device.zip will be a text file with the errors + echo -e "${RED}" + echo "Failed to download token :(" + echo "HTTP ERROR ${http_code}" + cat device.zip + echo -e "${NC}" + exit 1 + fi +} + +function BackupOldCredentials() { + echo "== Backing up any existing ota device creds" + ### move/backup any existing ota device creds + #BACKUP_DIR=$SOTA_DIR/backup/$(date +"%Y-%m-%d_%Hh%Mm%Ss") + BACKUP_DIR="$SOTA_DIR"/backup/$(jq -r .deviceUuid "$SOTA_DIR"/import/info.json)-$(jq -r .registeredName "$SOTA_DIR"/import/info.json) + mkdir -p "$BACKUP_DIR" + + ### If it doesn't already exist + mkdir -p "$SOTA_DIR"/import + + # WE don't care about failures here since there might not be any data + mv "$SOTA_DIR"/import/* "$BACKUP_DIR"/ &> /dev/null + mv "$SOTA_DIR"/sql.db "$BACKUP_DIR"/ &> /dev/null +} + +function WriteCredentials() { + echo "== Extracing device credentials from archive" + unzip device.zip -d "$SOTA_DIR"/import/ || { + echo "Failed to extract zip file" + exit 1 + } + + # Delete the sql.db in case aktualizr re-created it? + rm "$SOTA_DIR"/sql.db &> /dev/null && sync && sleep 3 + + ### WriteOut gateway.url + echo "== Creating new gateway.url ($GW_URL)" + echo "$GW_URL" > "$SOTA_DIR"/import/gateway.url || { + echo "Failed to create gateway.url" + exit 1 + } + + echo "" + echo "== Success!" + echo "Device has been registered with the system and credentials are in place!" + echo -e "${GREEN}" + jq . "$SOTA_DIR"/import/info.json + echo -e "${NC}" + +} + +function EnableDeviceMetrics() { + if [ -d "/som_sysroot" ]; then + # if we're in a container, we can't actually run aktualizr, so instead we just run strings. Ugly, but it works. + strings "${SYSROOT_PATH_PREFIX}"/usr/bin/aktualizr-torizon | grep -q "enable-data-proxy" || DISABLE_DEVICE_METRICS=1 + else + aktualizr-torizon --help | grep -q "enable-data-proxy" || DISABLE_DEVICE_METRICS=1 + fi + + ### Create (or delete) fluent-bit enabling file + if [ -z "$DISABLE_DEVICE_METRICS" ]; then + touch "${SYSROOT_PATH_PREFIX}"/etc/fluent-bit/enabled + else + rm "${SYSROOT_PATH_PREFIX}"/etc/fluent-bit/enabled &> /dev/null + fi + +} + +function StartServices() { + echo "== Restarting services..." + + echo "Restarting aktualizr..." + systemctl restart aktualizr + + if [ -z "$DISABLE_DEVICE_METRICS" ]; then + echo "Restarting fluent-bit..." + systemctl restart fluent-bit + else + echo "" + echo "Skipping fluent-bit because device metrics are disabled..." + fi +} + + +function usage { + cat < -g -t -d -n + + Optional arguments: + -u URL of provisioning endpoint + -g URL of device gateway + -d A device ID to use. If not set, will be generated based on /etc/hostname + -p Opt out of sending device metrics + -n A device Name to use. If not set, it will be autogenerated on the server side + + Required arguments: + -t Your secret token, provided by the OTA server + + Prerequisites: curl, jq, unzip +EOF +} + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' + +NC='\033[0m' # No Color + +# check if we're running in the provisioning container with the SOM sysroot mounted at the expected location +if [ -d "/som_sysroot" ]; then + SYSROOT_PATH_PREFIX=/som_sysroot +fi + +# set default values unless environment variables are set +[ -z "$AUTOPROV_URL" ] && AUTOPROV_URL=https://app.torizon.io/api/accounts/devices +[ -z "$GW_URL" ] && GW_URL=https://ota-ce.torizon.io +[ -z "$DEVICE_ID" ] && DEVICE_ID=$(GetDeviceID) +[ -z "$DEVICE_NAME" ] && DEVICE_NAME='' + +SOTA_DIR="${SYSROOT_PATH_PREFIX}"/var/sota + +while getopts ":hpu:g:t:d:n:" opt; do + case $opt in + h) + usage + exit 0 + ;; + p) + DISABLE_DEVICE_METRICS=1 + ;; + u) + AUTOPROV_URL=$OPTARG + ;; + g) + GW_URL=$OPTARG + ;; + t) + PROVISIONING_TOKEN=$OPTARG + ;; + d) + DEVICE_ID=$OPTARG + ;; + n) + DEVICE_NAME=$OPTARG + ;; + \?) + echo "Invalid option: -$OPTARG" >&2 + exit 1 + ;; + :) + echo "Option -$OPTARG requires an argument." >&2 + exit 1 + ;; + esac +done + +if [ -z "$PROVISIONING_TOKEN" ]; then + echo "Error: provisioning token not provided" >&2 + echo "" + usage + exit 1 +fi + +RegisterDevice +BackupOldCredentials +WriteCredentials +EnableDeviceMetrics +if [ -d "/som_sysroot" ]; then + echo "Running in a container, not restarting services..." +else + StartServices +fi + +echo "" +echo -e " Aktualizr should automatically connect with the server. For logs run: ${YELLOW}sudo journalctl -f -u aktualizr*${NC}" +echo "" \ No newline at end of file diff --git a/recipes-sota/provision-device/provision-device_1.0.bb b/recipes-sota/provision-device/provision-device_1.0.bb new file mode 100644 index 00000000..b18f1af5 --- /dev/null +++ b/recipes-sota/provision-device/provision-device_1.0.bb @@ -0,0 +1,20 @@ +SUMMARY = "Provision-device is a service to manually provision \ +the device to the Platform Services" + +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +SRC_URI = " \ + file://provision-device \ +" + +S = "${WORKDIR}" + +RDEPENDS:${PN} = "bash jq curl unzip" + +inherit allarch + +do_install() { + install -d ${D}${sbindir} + install -m 0755 ${WORKDIR}/provision-device ${D}${sbindir} +} diff --git a/recipes-support/docker-binfmt/docker-binfmt/docker-binfmt b/recipes-support/docker-binfmt/docker-binfmt/docker-binfmt new file mode 100644 index 00000000..a8ce1447 --- /dev/null +++ b/recipes-support/docker-binfmt/docker-binfmt/docker-binfmt @@ -0,0 +1,7 @@ +#!/usr/bin/bash +# +# Copyright (c) MicroHobby 2023 +# All rights reserved. +# + +docker run --rm --privileged torizon/binfmt diff --git a/recipes-support/docker-binfmt/docker-binfmt/docker-binfmt.service b/recipes-support/docker-binfmt/docker-binfmt/docker-binfmt.service new file mode 100644 index 00000000..394aa92d --- /dev/null +++ b/recipes-support/docker-binfmt/docker-binfmt/docker-binfmt.service @@ -0,0 +1,12 @@ +[Unit] +Description=Start binfmt-support from Docker torizon/binfmt +Requires=docker.service +After=docker.service +Wants=docker.service + +[Service] +Type=oneshot +ExecStart=/usr/sbin/docker-binfmt + +[Install] +WantedBy=multi-user.target diff --git a/recipes-support/docker-binfmt/docker-binfmt_0.1.bb b/recipes-support/docker-binfmt/docker-binfmt_0.1.bb new file mode 100644 index 00000000..e110cb4d --- /dev/null +++ b/recipes-support/docker-binfmt/docker-binfmt_0.1.bb @@ -0,0 +1,28 @@ +SUMMARY = "Start binfmt-support from Docker torizon/binfmt" +DESCRIPTION = "Start binfmt-support from Docker torizon/binfmt" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +inherit allarch systemd + +RDEPENDS:${PN} += " bash docker" + +SRC_URI = " \ + file://docker-binfmt \ + file://docker-binfmt.service \ +" + +S = "${WORKDIR}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_install () { + install -d ${D}${sbindir} + install -m 0755 ${S}/docker-binfmt ${D}${sbindir} + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/docker-binfmt.service ${D}${systemd_system_unitdir} +} + +SYSTEMD_SERVICE:${PN} = "docker-binfmt.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" diff --git a/recipes-support/resize-helper/resize-helper/resize-helper b/recipes-support/resize-helper/resize-helper/resize-helper new file mode 100644 index 00000000..4616b5a9 --- /dev/null +++ b/recipes-support/resize-helper/resize-helper/resize-helper @@ -0,0 +1,81 @@ +#!/bin/sh +# Copyright (c) Fathi Boudra +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +# must exit on error +set -e +set -o pipefail + +# we must be root +[ $(whoami) = "root" ] || { echo "E: You must be root" && exit 1; } + +# we must have few tools +SGDISK=$(which sgdisk) || { echo "E: You must have sgdisk" && exit 1; } +FDISK=$(which fdisk) || { echo "E: You must have fdisk" && exit 1; } +PARTX=$(which partx) || { echo "E: You must have partx" && exit 1; } +RESIZE2FS=$(which resize2fs) || { echo "E: You must have resize2fs" && exit 1; } + +# find root device +ROOT_DEVICE=$(findmnt --noheadings --output=SOURCE / | cut -d'[' -f1) +# prune root device (for example UUID) +ROOT_DEVICE=$(realpath ${ROOT_DEVICE}) +# get the partition number and type +INFO=$(udevadm info --query=property --name=${ROOT_DEVICE}) +PART_ENTRY_NUMBER=$(echo "${INFO}" | grep '^ID_PART_ENTRY_NUMBER=' | cut -d'=' -f2) +PART_ENTRY_NAME=$(echo "${INFO}" | grep '^ID_PART_ENTRY_NAME=' || true | cut -d'=' -f2) + +# in case the root device is not on a partitioned media +if [ "x$PART_ENTRY_NUMBER" = "x" ]; then + ${RESIZE2FS} "${ROOT_DEVICE}" + exit 0 +fi + +PART_TABLE_TYPE=$(echo "${INFO}" | grep '^ID_PART_TABLE_TYPE=' | cut -d'=' -f2) +# find the block device +DEVICE=$(udevadm info --query=path --name=${ROOT_DEVICE} | awk -F'/' '{print $(NF-1)}') +DEVICE="/dev/${DEVICE}" + +SIZE=$(blockdev --getsz ${DEVICE}) +TYPE="p\n" +if [ "$PART_TABLE_TYPE" = "gpt" ]; then + ${SGDISK} -e ${DEVICE} + SIZE=$(($SIZE - 33)) # the GPT end of disk is 34 sectors + TYPE="" +fi + +# Use fdisk to repartition +# fdisk uses a ram image of the parition table until a write is performed +# so the sequence is to delete the partition and recreate it at the same +# starting point but making it the size of the available disk. +# +END=$((${SIZE} - 1)) +PARTOF=$(echo "${INFO}" | grep '^ID_PART_ENTRY_OFFSET=' | cut -d'=' -f2) +echo -e "d\n${PART_ENTRY_NUMBER}\nn\n${TYPE}${PART_ENTRY_NUMBER}\n${PARTOF}\n${END}\nw\n" | ${FDISK} ${DEVICE} + +if [ -n "${PART_ENTRY_NAME}" ]; then + ${SGDISK} --change-name=${PART_ENTRY_NUMBER}:"${PART_ENTRY_NAME}" ${DEVICE} +fi + +${PARTX} -u ${DEVICE} +${RESIZE2FS} "${ROOT_DEVICE}" diff --git a/recipes-support/resize-helper/resize-helper/resize-helper.service b/recipes-support/resize-helper/resize-helper/resize-helper.service new file mode 100644 index 00000000..e2262bea --- /dev/null +++ b/recipes-support/resize-helper/resize-helper/resize-helper.service @@ -0,0 +1,13 @@ +[Unit] +Description=Resize root filesystem to fit available disk space +Wants=systemd-udevd.service systemd-udev-trigger.service +After=systemd-remount-fs.service systemd-udevd.service + +[Service] +Type=oneshot +ExecStartPre=-/bin/udevadm settle +ExecStart=/usr/sbin/resize-helper +ExecStartPost=/bin/systemctl disable resize-helper.service + +[Install] +WantedBy=basic.target diff --git a/recipes-support/resize-helper/resize-helper_0.1.bb b/recipes-support/resize-helper/resize-helper_0.1.bb new file mode 100644 index 00000000..34feb23c --- /dev/null +++ b/recipes-support/resize-helper/resize-helper_0.1.bb @@ -0,0 +1,27 @@ +SUMMARY = "Rootfs disk resize-helper" +SECTION = "devel" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f" + +inherit allarch systemd + +RDEPENDS:${PN} += "e2fsprogs-resize2fs gptfdisk util-linux-fdisk util-linux-blockdev util-linux-partx util-linux-findmnt" + +SRC_URI = "file://resize-helper \ + file://resize-helper.service \ +" + +S = "${WORKDIR}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_install () { + install -d ${D}${sbindir} + install -m 0755 ${S}/resize-helper ${D}${sbindir} + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/resize-helper.service ${D}${systemd_system_unitdir} +} + +SYSTEMD_SERVICE:${PN} = "resize-helper.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" diff --git a/recipes-support/tdx-info/tdx-info_%.bbappend b/recipes-support/tdx-info/tdx-info_%.bbappend new file mode 100644 index 00000000..a4b86206 --- /dev/null +++ b/recipes-support/tdx-info/tdx-info_%.bbappend @@ -0,0 +1,3 @@ + +SRC_URI = "git://github.com/commontorizon/tdx-info;protocol=https;branch=kirkstone" +SRCREV = "ca1ac11abc90cf0aa934d5f39c90839298a9faab" diff --git a/recipes-support/telemetry/telemetry/telemetry b/recipes-support/telemetry/telemetry/telemetry new file mode 100644 index 00000000..e6f3bd39 --- /dev/null +++ b/recipes-support/telemetry/telemetry/telemetry @@ -0,0 +1,81 @@ +#!/usr/bin/bash +# +# Copyright (c) MicroHobby 2023 +# All rights reserved. +# + +# check if we have an internet connection +# retry 3x +for i in {1..3} +do + if ping -c 1 google.com + then + break + # else we are in the last iteration exit + elif [ $i -eq 3 ] + then + echo "E: No internet connection" + # exit with success to avoid taint the systemd status + exit 0 + fi + + sleep 60 +done + +export JSON_OUTPUT=1 + +# create the info in json format +tdx-info > /tmp/tdx-info.json + +# get the data +BOARDMODEL=$(cat /tmp/tdx-info.json | jq '."hardware-info"."hw-model"') +BOARDARCH=$(cat /tmp/tdx-info.json | jq '."hardware-info"."processor-arch"') +OSRELEASE=$(cat /tmp/tdx-info.json | jq '."software-summary"."distro-version"') + +# get emerg, alert, crit, err, warning dmesg levels +DMESG=$(dmesg -r --level=emerg,alert,crit,err,warn) + +# query the region +# if the region is null try 3x +for i in {1..3} +do + REGION=$(curl -s https://ipapi.co/city) + # try to set the date and time + dateFromServer=$(curl -v --silent https://google.com/ 2>&1 \ + | grep Date | sed -e 's/< Date: //'); date +"%d%m%Y%H%M%S" -d "$dateFromServer" + + if [ ! -z "$REGION" ] + then + break + # else we are in the last iteration exit + elif [ $i -eq 3 ] + then + echo "E: Region was undefined" + REGION="Undefined" + fi + + sleep 60 +done + +# we should have a date now +DATETIME=$(date +%Y-%m-%d) + +# debug +echo "REGION: $REGION" +echo "BOARDMODEL: $BOARDMODEL" +echo "BOARDARCH: $BOARDARCH" +echo "OSRELEASE: $OSRELEASE" +echo "DATETIME: $DATETIME" +echo "DMESG: $DMESG" + +# do it +curl --request POST \ + --url http://castello.dev.br/api/telemetry/add \ + --data-urlencode "region=$REGION" \ + --data-urlencode "dateTime=$DATETIME" \ + --data-urlencode "boardarch=$BOARDARCH" \ + --data-urlencode "boardmodel=$BOARDMODEL" \ + --data-urlencode "osrelease=$OSRELEASE" \ + --data-urlencode "dmesg=\"$DMESG\"" + +exit 0 diff --git a/recipes-support/telemetry/telemetry/telemetry.service b/recipes-support/telemetry/telemetry/telemetry.service new file mode 100644 index 00000000..ba6294f2 --- /dev/null +++ b/recipes-support/telemetry/telemetry/telemetry.service @@ -0,0 +1,11 @@ +[Unit] +Description=Send Telemetry about the Common TorizonCore usage +Requires=set-hostname.service network-online.target +After=set-hostname.service network-online.target + +[Service] +Type=oneshot +ExecStart=/usr/sbin/telemetry + +[Install] +WantedBy=multi-user.target diff --git a/recipes-support/telemetry/telemetry_0.1.bb b/recipes-support/telemetry/telemetry_0.1.bb new file mode 100644 index 00000000..a3ef5001 --- /dev/null +++ b/recipes-support/telemetry/telemetry_0.1.bb @@ -0,0 +1,28 @@ +SUMMARY = "Common Torizon anonymous Telemetry" +DESCRIPTION = "Script to ping the Common Torizon server and collect information about the hardware that is booting Common Torizon" +LICENSE = "MIT" +LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" + +inherit allarch systemd + +RDEPENDS:${PN} += "curl bash tdx-info" + +SRC_URI = " \ + file://telemetry \ + file://telemetry.service \ +" + +S = "${WORKDIR}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" + +do_install () { + install -d ${D}${sbindir} + install -m 0755 ${S}/telemetry ${D}${sbindir} + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${S}/telemetry.service ${D}${systemd_system_unitdir} +} + +SYSTEMD_SERVICE:${PN} = "telemetry.service" +SYSTEMD_AUTO_ENABLE:${PN} = "enable" diff --git a/scripts/lib/wic/canned-wks/efidisk-sota.wks b/scripts/lib/wic/canned-wks/efidisk-sota.wks index ffe11744..88b98c67 100644 --- a/scripts/lib/wic/canned-wks/efidisk-sota.wks +++ b/scripts/lib/wic/canned-wks/efidisk-sota.wks @@ -2,7 +2,7 @@ # long-description: Creates an OTA-enabled EFI disk image that the user # can directly dd to boot media. -part /boot/efi --source bootimg-sota-efi --sourceparams="loader=grub-efi" --ondisk sda --active --align 1024 --use-uuid +part /boot --source bootimg-sota-efi --sourceparams="loader=grub-efi" --ondisk sda --active --align 1024 --use-uuid part / --source otaimage --ondisk sda --fstype=ext4 --align 1024 --use-uuid bootloader --ptable gpt --configfile="grub-ota.cfg" diff --git a/scripts/lib/wic/canned-wks/efiimage-sota.wks b/scripts/lib/wic/canned-wks/efiimage-sota.wks new file mode 100644 index 00000000..21b2f84d --- /dev/null +++ b/scripts/lib/wic/canned-wks/efiimage-sota.wks @@ -0,0 +1,8 @@ +# short-description: Create an OTA-enabled EFI disk image +# long-description: Creates an OTA-enabled EFI disk image that the user +# can directly dd to boot media. + +part /boot --source bootimg-efi-tmp --sourceparams="loader=grub-efi" --ondisk hda --label efi --active --align 1024 +part / --source otaimage --ondisk hda --fstype=ext4 --align 1024 --use-uuid + +bootloader --ptable gpt --timeout=0 --append="rootfstype=ext4 console=ttyS0,115200 console=tty0" --configfile="grub-ota.cfg" diff --git a/scripts/lib/wic/canned-wks/nezha-sota.wks b/scripts/lib/wic/canned-wks/nezha-sota.wks new file mode 100644 index 00000000..7aa39479 --- /dev/null +++ b/scripts/lib/wic/canned-wks/nezha-sota.wks @@ -0,0 +1,9 @@ +# short-description: Create SD card image for Nezha Allwinner D1 development board + +part boot0 --source rawcopy --sourceparams="file=boot0_sdcard_sun20iw1p1.bin" --offset 16s --ondisk mmcblk0 --no-table + +part u-boot --source rawcopy --sourceparams="file=u-boot.toc1" --offset 32800s --ondisk mmcblk0 --no-table + +part /boot --source bootimg-partition --ondisk mmcblk0 --fstype=vfat --label boot --align 4096 --fixed-size 64 --active + +part / --source otaimage --ondisk mmcblk0 --fstype=ext4 --align 4096 diff --git a/scripts/lib/wic/plugins/source/bootimg-efi-tmp.py b/scripts/lib/wic/plugins/source/bootimg-efi-tmp.py new file mode 100644 index 00000000..dd5217ba --- /dev/null +++ b/scripts/lib/wic/plugins/source/bootimg-efi-tmp.py @@ -0,0 +1,415 @@ +# +# Copyright (c) 2014, Intel Corporation. +# +# SPDX-License-Identifier: GPL-2.0-only +# +# DESCRIPTION +# This implements the 'bootimg-efi' source plugin class for 'wic' +# +# AUTHORS +# Tom Zanussi +# + +import logging +import os +import tempfile +import shutil +import re + +from glob import glob + +from wic import WicError +from wic.engine import get_custom_config +from wic.pluginbase import SourcePlugin +from wic.misc import (exec_cmd, exec_native_cmd, + get_bitbake_var, BOOTDD_EXTRA_SPACE) + +logger = logging.getLogger('wic') + +class BootimgEFIPlugin(SourcePlugin): + """ + Create EFI boot partition. + This plugin supports GRUB 2 and systemd-boot bootloaders. + """ + + name = 'bootimg-efi-tmp' + + @classmethod + def do_configure_grubefi(cls, hdddir, creator, cr_workdir, source_params): + """ + Create loader-specific (grub-efi) config + """ + configfile = creator.ks.bootloader.configfile + custom_cfg = None + if configfile: + custom_cfg = get_custom_config(configfile) + if custom_cfg: + # Use a custom configuration for grub + grubefi_conf = custom_cfg + logger.debug("Using custom configuration file " + "%s for grub.cfg", configfile) + else: + raise WicError("configfile is specified but failed to " + "get it from %s." % configfile) + + initrd = source_params.get('initrd') + + if initrd: + bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") + if not bootimg_dir: + raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting") + + initrds = initrd.split(';') + for rd in initrds: + cp_cmd = "cp %s/%s %s" % (bootimg_dir, rd, hdddir) + exec_cmd(cp_cmd, True) + else: + logger.debug("Ignoring missing initrd") + + if not custom_cfg: + # Create grub configuration using parameters from wks file + bootloader = creator.ks.bootloader + title = source_params.get('title') + + grubefi_conf = "" + grubefi_conf += "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n" + grubefi_conf += "default=boot\n" + grubefi_conf += "timeout=%s\n" % bootloader.timeout + grubefi_conf += "menuentry '%s'{\n" % (title if title else "boot") + + kernel = get_bitbake_var("KERNEL_IMAGETYPE") + if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1": + if get_bitbake_var("INITRAMFS_IMAGE"): + kernel = "%s-%s.bin" % \ + (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME")) + + label = source_params.get('label') + label_conf = "root=%s" % creator.rootdev + if label: + label_conf = "LABEL=%s" % label + + grubefi_conf += "linux /%s %s rootwait %s\n" \ + % (kernel, label_conf, bootloader.append) + + if initrd: + initrds = initrd.split(';') + grubefi_conf += "initrd" + for rd in initrds: + grubefi_conf += " /%s" % rd + grubefi_conf += "\n" + + grubefi_conf += "}\n" + + logger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg", + cr_workdir) + cfg = open("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, "w") + cfg.write(grubefi_conf) + cfg.close() + + @classmethod + def do_configure_systemdboot(cls, hdddir, creator, cr_workdir, source_params): + """ + Create loader-specific systemd-boot/gummiboot config + """ + install_cmd = "install -d %s/loader" % hdddir + exec_cmd(install_cmd) + + install_cmd = "install -d %s/loader/entries" % hdddir + exec_cmd(install_cmd) + + bootloader = creator.ks.bootloader + + loader_conf = "" + if source_params.get('create-unified-kernel-image') != "true": + loader_conf += "default boot\n" + loader_conf += "timeout %d\n" % bootloader.timeout + + initrd = source_params.get('initrd') + + if initrd and source_params.get('create-unified-kernel-image') != "true": + # obviously we need to have a common common deploy var + bootimg_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") + if not bootimg_dir: + raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting") + + initrds = initrd.split(';') + for rd in initrds: + cp_cmd = "cp %s/%s %s" % (bootimg_dir, rd, hdddir) + exec_cmd(cp_cmd, True) + else: + logger.debug("Ignoring missing initrd") + + logger.debug("Writing systemd-boot config " + "%s/hdd/boot/loader/loader.conf", cr_workdir) + cfg = open("%s/hdd/boot/loader/loader.conf" % cr_workdir, "w") + cfg.write(loader_conf) + cfg.close() + + configfile = creator.ks.bootloader.configfile + custom_cfg = None + if configfile: + custom_cfg = get_custom_config(configfile) + if custom_cfg: + # Use a custom configuration for systemd-boot + boot_conf = custom_cfg + logger.debug("Using custom configuration file " + "%s for systemd-boots's boot.conf", configfile) + else: + raise WicError("configfile is specified but failed to " + "get it from %s.", configfile) + + if not custom_cfg: + # Create systemd-boot configuration using parameters from wks file + kernel = get_bitbake_var("KERNEL_IMAGETYPE") + if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1": + if get_bitbake_var("INITRAMFS_IMAGE"): + kernel = "%s-%s.bin" % \ + (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME")) + + title = source_params.get('title') + + boot_conf = "" + boot_conf += "title %s\n" % (title if title else "boot") + boot_conf += "linux /%s\n" % kernel + + label = source_params.get('label') + label_conf = "LABEL=Boot root=%s" % creator.rootdev + if label: + label_conf = "LABEL=%s" % label + + boot_conf += "options %s %s\n" % \ + (label_conf, bootloader.append) + + if initrd: + initrds = initrd.split(';') + for rd in initrds: + boot_conf += "initrd /%s\n" % rd + + if source_params.get('create-unified-kernel-image') != "true": + logger.debug("Writing systemd-boot config " + "%s/hdd/boot/loader/entries/boot.conf", cr_workdir) + cfg = open("%s/hdd/boot/loader/entries/boot.conf" % cr_workdir, "w") + cfg.write(boot_conf) + cfg.close() + + + @classmethod + def do_configure_partition(cls, part, source_params, creator, cr_workdir, + oe_builddir, bootimg_dir, kernel_dir, + native_sysroot): + """ + Called before do_prepare_partition(), creates loader-specific config + """ + hdddir = "%s/hdd/boot" % cr_workdir + + install_cmd = "install -d %s/EFI/BOOT" % hdddir + exec_cmd(install_cmd) + + try: + if source_params['loader'] == 'grub-efi': + cls.do_configure_grubefi(hdddir, creator, cr_workdir, source_params) + elif source_params['loader'] == 'systemd-boot': + cls.do_configure_systemdboot(hdddir, creator, cr_workdir, source_params) + else: + raise WicError("unrecognized bootimg-efi loader: %s" % source_params['loader']) + except KeyError: + raise WicError("bootimg-efi requires a loader, none specified") + + if get_bitbake_var("IMAGE_EFI_BOOT_FILES") is None: + logger.debug('No boot files defined in IMAGE_EFI_BOOT_FILES') + else: + boot_files = None + for (fmt, id) in (("_uuid-%s", part.uuid), ("_label-%s", part.label), (None, None)): + if fmt: + var = fmt % id + else: + var = "" + + boot_files = get_bitbake_var("IMAGE_EFI_BOOT_FILES" + var) + if boot_files: + break + + logger.debug('Boot files: %s', boot_files) + + # list of tuples (src_name, dst_name) + deploy_files = [] + for src_entry in re.findall(r'[\w;\-\./\*]+', boot_files): + if ';' in src_entry: + dst_entry = tuple(src_entry.split(';')) + if not dst_entry[0] or not dst_entry[1]: + raise WicError('Malformed boot file entry: %s' % src_entry) + else: + dst_entry = (src_entry, src_entry) + + logger.debug('Destination entry: %r', dst_entry) + deploy_files.append(dst_entry) + + cls.install_task = []; + for deploy_entry in deploy_files: + src, dst = deploy_entry + if '*' in src: + # by default install files under their basename + entry_name_fn = os.path.basename + if dst != src: + # unless a target name was given, then treat name + # as a directory and append a basename + entry_name_fn = lambda name: \ + os.path.join(dst, + os.path.basename(name)) + + srcs = glob(os.path.join(kernel_dir, src)) + + logger.debug('Globbed sources: %s', ', '.join(srcs)) + for entry in srcs: + src = os.path.relpath(entry, kernel_dir) + entry_dst_name = entry_name_fn(entry) + cls.install_task.append((src, entry_dst_name)) + else: + cls.install_task.append((src, dst)) + + @classmethod + def do_prepare_partition(cls, part, source_params, creator, cr_workdir, + oe_builddir, bootimg_dir, kernel_dir, + rootfs_dir, native_sysroot): + """ + Called to do the actual content population for a partition i.e. it + 'prepares' the partition to be incorporated into the image. + In this case, prepare content for an EFI (grub) boot partition. + """ + if not kernel_dir: + kernel_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") + if not kernel_dir: + raise WicError("Couldn't find DEPLOY_DIR_IMAGE, exiting") + + staging_kernel_dir = kernel_dir + + hdddir = "%s/hdd/boot" % cr_workdir + + kernel = get_bitbake_var("KERNEL_IMAGETYPE") + if get_bitbake_var("INITRAMFS_IMAGE_BUNDLE") == "1": + if get_bitbake_var("INITRAMFS_IMAGE"): + kernel = "%s-%s.bin" % \ + (get_bitbake_var("KERNEL_IMAGETYPE"), get_bitbake_var("INITRAMFS_LINK_NAME")) + + if source_params.get('create-unified-kernel-image') == "true": + initrd = source_params.get('initrd') + if not initrd: + raise WicError("initrd= must be specified when create-unified-kernel-image=true, exiting") + + deploy_dir = get_bitbake_var("DEPLOY_DIR_IMAGE") + efi_stub = glob("%s/%s" % (deploy_dir, "linux*.efi.stub")) + if len(efi_stub) == 0: + raise WicError("Unified Kernel Image EFI stub not found, exiting") + efi_stub = efi_stub[0] + + with tempfile.TemporaryDirectory() as tmp_dir: + label = source_params.get('label') + label_conf = "root=%s" % creator.rootdev + if label: + label_conf = "LABEL=%s" % label + + bootloader = creator.ks.bootloader + cmdline = open("%s/cmdline" % tmp_dir, "w") + cmdline.write("%s %s" % (label_conf, bootloader.append)) + cmdline.close() + + initrds = initrd.split(';') + initrd = open("%s/initrd" % tmp_dir, "wb") + for f in initrds: + with open("%s/%s" % (deploy_dir, f), 'rb') as in_file: + shutil.copyfileobj(in_file, initrd) + initrd.close() + + # Searched by systemd-boot: + # https://systemd.io/BOOT_LOADER_SPECIFICATION/#type-2-efi-unified-kernel-images + install_cmd = "install -d %s/EFI/Linux" % hdddir + exec_cmd(install_cmd) + + staging_dir_host = get_bitbake_var("STAGING_DIR_HOST") + + # https://www.freedesktop.org/software/systemd/man/systemd-stub.html + objcopy_cmd = "objcopy \ + --add-section .osrel=%s --change-section-vma .osrel=0x20000 \ + --add-section .cmdline=%s --change-section-vma .cmdline=0x30000 \ + --add-section .linux=%s --change-section-vma .linux=0x2000000 \ + --add-section .initrd=%s --change-section-vma .initrd=0x3000000 \ + %s %s" % \ + ("%s/usr/lib/os-release" % staging_dir_host, + cmdline.name, + "%s/%s" % (staging_kernel_dir, kernel), + initrd.name, + efi_stub, + "%s/EFI/Linux/linux.efi" % hdddir) + exec_cmd(objcopy_cmd) + else: + install_cmd = "install -m 0644 %s/%s %s/%s" % \ + (staging_kernel_dir, kernel, hdddir, kernel) + exec_cmd(install_cmd) + + if get_bitbake_var("IMAGE_EFI_BOOT_FILES"): + for src_path, dst_path in cls.install_task: + install_cmd = "install -m 0644 -D %s %s" \ + % (os.path.join(kernel_dir, src_path), + os.path.join(hdddir, dst_path)) + exec_cmd(install_cmd) + + try: + if source_params['loader'] == 'grub-efi': + shutil.copyfile("%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir, + "%s/grub.cfg" % cr_workdir) + for mod in [x for x in os.listdir(kernel_dir) if x.startswith("grub-efi-")]: + cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[9:]) + exec_cmd(cp_cmd, True) + shutil.move("%s/grub.cfg" % cr_workdir, + "%s/hdd/boot/EFI/BOOT/grub.cfg" % cr_workdir) + elif source_params['loader'] == 'systemd-boot': + for mod in [x for x in os.listdir(kernel_dir) if x.startswith("systemd-")]: + cp_cmd = "cp %s/%s %s/EFI/BOOT/%s" % (kernel_dir, mod, hdddir, mod[8:]) + exec_cmd(cp_cmd, True) + else: + raise WicError("unrecognized bootimg-efi loader: %s" % + source_params['loader']) + except KeyError: + raise WicError("bootimg-efi requires a loader, none specified") + + startup = os.path.join(kernel_dir, "startup.nsh") + if os.path.exists(startup): + cp_cmd = "cp %s %s/" % (startup, hdddir) + exec_cmd(cp_cmd, True) + + du_cmd = "du -bks %s" % hdddir + out = exec_cmd(du_cmd) + blocks = int(out.split()[0]) + + extra_blocks = part.get_extra_block_count(blocks) + + if extra_blocks < BOOTDD_EXTRA_SPACE: + extra_blocks = BOOTDD_EXTRA_SPACE + + blocks += extra_blocks + + logger.debug("Added %d extra blocks to %s to get to %d total blocks", + extra_blocks, part.mountpoint, blocks) + + # dosfs image, created by mkdosfs + bootimg = "%s/boot.img" % cr_workdir + + label = part.label if part.label else "ESP" + + dosfs_cmd = "mkdosfs -n %s -i %s -C %s %d" % \ + (label, part.fsuuid, bootimg, blocks) + exec_native_cmd(dosfs_cmd, native_sysroot) + + # TODO: upstream it - maintain properties and dates + mcopy_cmd = "mcopy -i %s -s %s/* ::/ -p -m" % (bootimg, hdddir) + exec_native_cmd(mcopy_cmd, native_sysroot) + + chmod_cmd = "chmod 644 %s" % bootimg + exec_cmd(chmod_cmd) + + du_cmd = "du -Lbks %s" % bootimg + out = exec_cmd(du_cmd) + bootimg_size = out.split()[0] + + part.size = int(bootimg_size) + part.source_file = bootimg diff --git a/scripts/setup-environment b/scripts/setup-environment index eac85b79..ec31a234 100755 --- a/scripts/setup-environment +++ b/scripts/setup-environment @@ -18,4 +18,4 @@ # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -. layers/meta-toradex-torizon/scripts/setup-environment-internal $@ +. layers/meta-common-torizon/scripts/setup-environment-internal $@ diff --git a/scripts/setup-environment-internal b/scripts/setup-environment-internal index afac927d..8684c74b 100755 --- a/scripts/setup-environment-internal +++ b/scripts/setup-environment-internal @@ -112,7 +112,7 @@ fi # Create a common list of "()", sorted by # Blacklist unsupported machines of TorizonCore MACHLAYERS=$(find layers/ -print | grep "conf/machine/.*\.conf" | - grep -E '(apalis.*\.conf|colibri.*\.conf|verdin.*\.conf|qemuarm64\.conf|genericx86-64\.conf)' | + grep -E '(apalis.*\.conf|colibri.*\.conf|verdin.*\.conf|qemuarm64\.conf|genericx86-64\.conf|raspberrypi4-64\.conf|raspberrypi3-64\.conf|raspberrypi0-2w-64\.conf|raspberrypi0-wifi\.conf|intel-corei7-64\.conf|nezha-allwinner-d1\.conf|beaglebone-yocto\.conf|beagleplay\.conf|qemux86-64\.conf)' | grep -E -v '(imx7-nand|colibri-vf|tk1|colibri-imx7|colibri-imx6ull|verdin-am62-k3r5)\.conf' | sed -e 's/\.conf//g' -e 's/layers\///' | awk -F'/conf/machine/' '{print $NF "(" $1 ")"}' | LC_ALL=C sort) @@ -129,7 +129,7 @@ DISTRO_DEFAULT="torizon-upstream" && echo "$MACHINE" | grep -E -q '(imx8|am62|qe DISTRO=${DISTRO:-$DISTRO_DEFAULT} # Create a common list of "()" supported by TorizonCore, sorted by -DISTLAYERS=$(find layers/meta-toradex-torizon -print | grep "conf/distro/.*\.conf" | +DISTLAYERS=$(find layers/meta-common-torizon -print | grep "conf/distro/.*\.conf" | sed -e 's/\.conf//g' -e 's/layers\///' | awk -F'/conf/distro/' '{print $NF "(" $1 ")"}' | LC_ALL=C sort) @@ -144,7 +144,7 @@ if [ -z "${SDKMACHINE}" ]; then fi MANIFESTS="${OEROOT}"/.repo/manifests -SCRIPTS="${OEROOT}"/layers/meta-toradex-torizon/scripts +SCRIPTS="${OEROOT}"/layers/meta-common-torizon/scripts # We can be called with only 1 parameter max (build folder) BUILDDIR=${1:-build-$DISTRO} @@ -357,33 +357,33 @@ EOF fi fi -cat <' +# You can now run 'bitbake ' -Some of common targets are: +# Some of common targets are: torizon-core-docker torizon-minimal torizon-core-podman -EOF +# EOF if [ "${MACHINE}" = "qemuarm64" ]; then cat <