diff --git a/conf/machine/include/qcom-common.inc b/conf/machine/include/qcom-common.inc index b82be9ad..dedb9858 100644 --- a/conf/machine/include/qcom-common.inc +++ b/conf/machine/include/qcom-common.inc @@ -87,3 +87,7 @@ RT_KERNEL_CMDLINE = "${RT_ARGS_ISOL} ${RT_ARGS_IRQ} ${RT_ARGS_NOCBS} \ KERNEL_CMDLINE_EXTRA:append = "${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/kernel',\ 'linux-qcom-rt linux-qcom-next-rt', \ ' ${RT_KERNEL_CMDLINE}', '', d)}" + +# Set default runtime provider for virtual-tftp-server to avoid +# warnings when both tqftpserv and tftp-server are available +PREFERRED_RPROVIDER_virtual-tftp-server ?= "tqftpserv" diff --git a/recipes-bsp/packagegroups/packagegroup-qcom.bb b/recipes-bsp/packagegroups/packagegroup-qcom.bb index eb5f74e4..63a134c7 100644 --- a/recipes-bsp/packagegroups/packagegroup-qcom.bb +++ b/recipes-bsp/packagegroups/packagegroup-qcom.bb @@ -14,7 +14,7 @@ RDEPENDS:${PN}-boot-essential = " \ pd-mapper \ qrtr \ rmtfs \ - tqftpserv \ + virtual-tftp-server \ " RDEPENDS:${PN}-boot-additional:append:aarch64 = " \ diff --git a/recipes-support/tftp-server/tftp-server_1.0.1.bb b/recipes-support/tftp-server/tftp-server_1.0.1.bb new file mode 100644 index 00000000..857ce3fa --- /dev/null +++ b/recipes-support/tftp-server/tftp-server_1.0.1.bb @@ -0,0 +1,49 @@ +SUMMARY = "Prebuilt Qualcomm tftp-server application" +DESCRIPTION = "Prebuilt Qualcomm proprietary application for handling Remote File Systems (RFS) Requests" + +inherit systemd + +LICENSE = "LICENSE.qcom-2" +LIC_FILES_CHKSUM = "file://usr/share/doc/tftp-server/NO.LOGIN.BINARY.LICENSE.QTI.pdf;md5=7a5da794b857d786888bbf2b7b7529c8" + +SRC_URI = "https://softwarecenter.qualcomm.com/nexus/generic/software/chip/component/core-technologies.qclinux.0.0/${PBT_BUILD_DATE}/prebuilt_yocto/tftp-server_15.0+really${PV}_armv8a.tar.gz" + +PBT_BUILD_DATE = "260127" +SRC_URI[sha256sum] = "6dffae734607ce7bbde40a839b60960558df45796ed66dfd78a74ddf912a8cbd" + +S = "${UNPACKDIR}" + +DEPENDS += "glib-2.0 qmi-framework libcap" +RPROVIDES:${PN} += "virtual-tftp-server" +DEFAULT_PREFERENCE = "-1" + +# This package is currently only used and tested on ARMv8 (aarch64) machines. +# Therefore, builds for other architectures are not necessary and are explicitly excluded. +COMPATIBLE_MACHINE = "^$" +COMPATIBLE_MACHINE:aarch64 = "(.*)" + +FILES:${PN} += "${nonarch_libdir}/tmpfiles.d/*" + +SYSTEMD_SERVICE:${PN} += "tftp_server.service" + +do_install() { + # Install all files from the prebuilt tarball + cp -r ${S}/* ${D}/ + + # Move tmpfiles.d to correct location + if [ -f ${D}/etc/tmpfiles.d/tftp-server.conf ]; then + install -d ${D}${nonarch_libdir}/tmpfiles.d + cp ${D}/etc/tmpfiles.d/tftp-server.conf ${D}${nonarch_libdir}/tmpfiles.d/ + rm ${D}/etc/tmpfiles.d/tftp-server.conf + fi +} + +pkg_postinst:${PN} () { + if [ -n "$D" ]; then + exit 0 + fi + + if command -v systemd-tmpfiles >/dev/null 2>&1; then + systemd-tmpfiles --create ${nonarch_libdir}/tmpfiles.d/tftp-server.conf 2>/dev/null || true + fi +} diff --git a/recipes-support/tqftpserv/tqftpserv_1.1.1.bb b/recipes-support/tqftpserv/tqftpserv_1.1.1.bb index a2b0d482..64ef4d1b 100644 --- a/recipes-support/tqftpserv/tqftpserv_1.1.1.bb +++ b/recipes-support/tqftpserv/tqftpserv_1.1.1.bb @@ -17,3 +17,5 @@ EXTRA_OEMESON = "-Dsystemd-unit-prefix=${systemd_system_unitdir}" SYSTEMD_SERVICE:${PN} = "tqftpserv.service" RDEPENDS:${PN} += "qrtr" +RPROVIDES:${PN} += "virtual-tftp-server" +DEFAULT_PREFERENCE = "1"