summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260526.0.bb (renamed from meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260107.1.bb)2
-rw-r--r--meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/0001-Avoid-redefining-constants-introduced-in-glibc-2.41.patch172
-rw-r--r--meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/0001-cmake-add-SOVERSION-0-to-crypto-and-ssl-shared-libra.patch62
-rw-r--r--meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/boringssl-go-stub22
-rw-r--r--meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/boringssl-gtest-stub.cc1
-rw-r--r--meta-oe/recipes-devtools/android-libboringssl/android-libboringssl_14.0.0+r45.bb70
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf4
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-setup38
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start9
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb38
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf/10-adbd-configfs.conf7
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-cleanup (renamed from meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-cleanup)0
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup63
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-start16
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb36
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0001-libbacktrace.mk-Link-against-staged-lib7z.patch38
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0002-debian-makefiles-yocto-compat.patch240
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0003-gcc-nullability-and-thread-annotation-compat.patch34
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0004-fastboot-super_flash_helper-include-climits.patch41
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0005-adb-host-usb-compat.patch34
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0006-adbd-enable-root-and-remount-support.patch466
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0007-libcutils-guard-Android-private-header-with-addition.patch36
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0008-adb-GCC-compatibility-fixes-for-usb_linux-and-sysdep.patch197
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0009-libbase-include-stdint.h-in-hex.cpp.patch26
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/0010-adbd-make-systemd-sd_notify-conditional-on-HAVE_SYSTEMD.patch54
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/adb.mk72
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/adbd.mk164
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service2
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch361
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0001-adb-remove-selinux-extensions.patch44
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch35
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0002-adb-Use-local-sockets-where-appropriate.patch70
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0003-adb-define-shell-command.patch29
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0004-adb-Fix-build-on-big-endian-systems.patch47
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0005-adb-add-base64-implementation.patch350
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0006-adb-Musl-fixes.patch130
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch26
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0008-adb-Allow-adbd-to-be-ran-as-root.patch23
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0009-mkbootimg-Add-dt-parameter-to-specify-DT-image.patch110
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0010-Use-linux-capability.h-on-linux-systems-too.patch23
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0011-Remove-bionic-specific-calls.patch64
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0012-Fix-implicit-declaration-of-stlcat-strlcopy-function.patch50
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch191
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch344
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch60
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch188
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch114
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff48
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/core/b64_pton_function_decl.patch14
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-allow-notifying-systemd.patch41
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-allow-usb-on-linux.patch28
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-don-t-require-authorization-on-Linux.patch27
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-usb-drop-property-monitor.patch57
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-dev-typos.patch16
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-Nullable.patch14
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-stdatomic.patch68
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-workaround__builtin_available.patch148
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Added-missing-headers.patch15
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Drop-gki-dependency-from-mkbootimg.patch114
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Implement-const_iterator-operator.patch37
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-add-missing-headers.patch13
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-hard-code-build-number.patch57
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-libusb-header-path.patch17
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-move-log-file-to-proper-dir.patch19
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-stub-out-fastdeploy.patch99
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-throw-exception-on-unknown-os.patch17
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-unwindstack-porting.patch14
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/ext4_utils.mk103
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/extras/0001-ext4_utils-remove-selinux-extensions.patch39
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch78
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch69
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/fastboot.mk89
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/gitignore59
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-Remove-bionic-specific-calls.patch25
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch51
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools/mkbootimg.mk29
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools_35.0.2.bb237
-rw-r--r--meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb189
-rw-r--r--meta-oe/recipes-devtools/b4/b4_0.15.2.bb (renamed from meta-oe/recipes-devtools/b4/b4_0.14.3.bb)2
-rw-r--r--meta-oe/recipes-devtools/canvenient/canvenient_1.01.bb41
-rw-r--r--meta-oe/recipes-devtools/cloc/cloc_2.08.bb (renamed from meta-oe/recipes-devtools/cloc/cloc_1.98.bb)2
-rw-r--r--meta-oe/recipes-devtools/cpuid/cpuid_20260503.bb (renamed from meta-oe/recipes-devtools/cpuid/cpuid_20230614.bb)2
-rw-r--r--meta-oe/recipes-devtools/ctags/ctags_6.2.20260607.0.bb (renamed from meta-oe/recipes-devtools/ctags/ctags_6.2.20260308.0.bb)2
-rw-r--r--meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.144.bb (renamed from meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.142.bb)2
-rw-r--r--meta-oe/recipes-devtools/dmalloc/dmalloc_5.6.5.bb (renamed from meta-oe/recipes-devtools/dmalloc/dmalloc_5.5.2.bb)2
-rw-r--r--meta-oe/recipes-devtools/doxygen/doxygen_1.17.0.bb (renamed from meta-oe/recipes-devtools/doxygen/doxygen_1.16.1.bb)2
-rw-r--r--meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.11.bb (renamed from meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb)6
-rw-r--r--meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb2
-rw-r--r--meta-oe/recipes-devtools/geany/geany_2.1.bb (renamed from meta-oe/recipes-devtools/geany/geany_2.0.bb)2
-rw-r--r--meta-oe/recipes-devtools/giflib/giflib/0001-Makefile-fix-typo-in-soname-argument.patch34
-rw-r--r--meta-oe/recipes-devtools/giflib/giflib_6.1.3.bb (renamed from meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb)7
-rw-r--r--meta-oe/recipes-devtools/grpc/grpc_1.80.0.bb (renamed from meta-oe/recipes-devtools/grpc/grpc_1.78.1.bb)6
-rw-r--r--meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.12.bb (renamed from meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.7.bb)2
-rw-r--r--meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_0.26.bb (renamed from meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_0.25.bb)5
-rw-r--r--meta-oe/recipes-devtools/isocline/isocline_1.1.0.bb28
-rw-r--r--meta-oe/recipes-devtools/jemalloc/files/1a15fe33a48c52bfe26ea83e49f0d317a47da3ea.patch158
-rw-r--r--meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb (renamed from meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb)11
-rw-r--r--meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch44
-rw-r--r--meta-oe/recipes-devtools/jq/jq/CVE-2026-32316.patch53
-rw-r--r--meta-oe/recipes-devtools/jq/jq/CVE-2026-33947.patch104
-rw-r--r--meta-oe/recipes-devtools/jq/jq/CVE-2026-33948.patch49
-rw-r--r--meta-oe/recipes-devtools/jq/jq/CVE-2026-39979.patch31
-rw-r--r--meta-oe/recipes-devtools/jq/jq/CVE-2026-47770.patch484
-rw-r--r--meta-oe/recipes-devtools/jq/jq/CVE-2026-49839.patch34
-rw-r--r--meta-oe/recipes-devtools/jq/jq_1.8.1.bb25
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/files/run-ptest4
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-Fix-C-11-ABI-breakage-when-compiled-with-C-17-1668-1.patch368
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp/71d46ca38e90dc902e8178ba484af4f27fa11947.patch63
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb24
-rw-r--r--meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb48
-rw-r--r--meta-oe/recipes-devtools/libabigail/libabigail_2.10.bb (renamed from meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb)2
-rw-r--r--meta-oe/recipes-devtools/librust-cxx/librust-cxx-crates.inc2
-rw-r--r--meta-oe/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patch34
-rw-r--r--meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb3
-rw-r--r--meta-oe/recipes-devtools/lshw/lshw_02.20.bb4
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch86
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch27
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace/0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch34
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace/0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch86
-rw-r--r--meta-oe/recipes-devtools/ltrace/ltrace_0.8.1.bb (renamed from meta-oe/recipes-devtools/ltrace/ltrace_git.bb)11
-rw-r--r--meta-oe/recipes-devtools/luajit/luajit_git.bb4
-rw-r--r--meta-oe/recipes-devtools/mercurial/mercurial_7.2.2.bb (renamed from meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb)2
-rw-r--r--meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.2.bb (renamed from meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.1.bb)2
-rw-r--r--meta-oe/recipes-devtools/mpich/mpich_5.0.1.bb (renamed from meta-oe/recipes-devtools/mpich/mpich_5.0.0.bb)2
-rw-r--r--meta-oe/recipes-devtools/msgpack/msgpack-cpp_8.0.0.bb (renamed from meta-oe/recipes-devtools/msgpack/msgpack-cpp_7.0.0.bb)2
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0001-Do-not-use-glob-in-deps.patch (renamed from meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch)26
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0002-v8-don-t-override-ARM-CFLAGS.patch (renamed from meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0003-system-c-ares.patch (renamed from meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0004-liftoff-Correct-function-signatures.patch (renamed from meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0006-deps-disable-io_uring-support-in-libuv.patch (renamed from meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0007-positional-args.patch (renamed from meta-oe/recipes-devtools/nodejs/nodejs/0001-positional-args.patch)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0008-custom-env.patch (renamed from meta-oe/recipes-devtools/nodejs/nodejs/0001-custom-env.patch)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0009-Using-native-binaries.patch (renamed from meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-24/0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch52
-rwxr-xr-xmeta-oe/recipes-devtools/nodejs/nodejs-24/run-ptest (renamed from meta-oe/recipes-devtools/nodejs/nodejs/run-ptest)0
-rwxr-xr-xmeta-oe/recipes-devtools/nodejs/nodejs-oe-cache-24.16/oe-npm-cache (renamed from meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.22/oe-npm-cache)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_24.16.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.22.bb)0
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch22
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-build-remove-redundant-mXX-flags-for-V8.patch133
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-detect-aarch64-Neon-correctly.patch51
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-fix-arm-Neon-intrinsics-types.patch59
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-llhttp-fix-NEON-header-value-__builtin_ctzll-undefin.patch60
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch25
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch96
-rw-r--r--meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb (renamed from meta-oe/recipes-devtools/nodejs/nodejs_22.22.1.bb)29
-rw-r--r--meta-oe/recipes-devtools/perl/exiftool_13.59.bb (renamed from meta-oe/recipes-devtools/perl/exiftool_13.52.bb)2
-rw-r--r--meta-oe/recipes-devtools/perl/libdbi-perl_1.648.bb (renamed from meta-oe/recipes-devtools/perl/libdbi-perl_1.647.bb)4
-rw-r--r--meta-oe/recipes-devtools/perl/libio-pty-perl_1.31.bb (renamed from meta-oe/recipes-devtools/perl/libio-pty-perl_1.20.bb)2
-rw-r--r--meta-oe/recipes-devtools/php/php_8.5.7.bb (renamed from meta-oe/recipes-devtools/php/php_8.5.4.bb)4
-rw-r--r--meta-oe/recipes-devtools/poke/poke_4.3.bb (renamed from meta-oe/recipes-devtools/poke/poke_4.2.bb)2
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf-c/protobuf-30.patch1446
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.2.bb (renamed from meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.1.bb)3
-rw-r--r--meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb (renamed from meta-oe/recipes-devtools/protobuf/protobuf_6.33.5.bb)6
-rw-r--r--meta-oe/recipes-devtools/sip/sip_6.15.3.bb (renamed from meta-oe/recipes-devtools/sip/sip_6.15.1.bb)2
-rw-r--r--meta-oe/recipes-devtools/spdm-utils/spdm-utils-crates.inc608
-rw-r--r--meta-oe/recipes-devtools/spdm-utils/spdm-utils_0.7.2.bb4
-rw-r--r--meta-oe/recipes-devtools/xerces-c/xerces-c_3.3.0.bb2
157 files changed, 4657 insertions, 5963 deletions
diff --git a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260107.1.bb b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260526.0.bb
index 128ed81556..d0d0d44610 100644
--- a/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260107.1.bb
+++ b/meta-oe/recipes-devtools/abseil-cpp/abseil-cpp_20260526.0.bb
@@ -11,7 +11,7 @@ SRC_URI = "https://github.com/abseil/${BPN}/releases/download/${PV}/${BP}.tar.gz
11 file://0001-absl-always-use-asm-sgidefs.h.patch \ 11 file://0001-absl-always-use-asm-sgidefs.h.patch \
12 file://0002-abseil-ppc-fixes.patch \ 12 file://0002-abseil-ppc-fixes.patch \
13 " 13 "
14SRC_URI[sha256sum] = "4314e2a7cbac89cac25a2f2322870f343d81579756ceff7f431803c2c9090195" 14SRC_URI[sha256sum] = "6e1aee535473414164bf83e4ebc40240dec71a4701f8a642d906e95bea1aea0c"
15 15
16UPSTREAM_CHECK_URI = "https://github.com/abseil/abseil-cpp/releases" 16UPSTREAM_CHECK_URI = "https://github.com/abseil/abseil-cpp/releases"
17UPSTREAM_CHECK_REGEX = "releases/tag/(?P<pver>\d+(\.\d+)+)" 17UPSTREAM_CHECK_REGEX = "releases/tag/(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/0001-Avoid-redefining-constants-introduced-in-glibc-2.41.patch b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/0001-Avoid-redefining-constants-introduced-in-glibc-2.41.patch
new file mode 100644
index 0000000000..f4133572ca
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/0001-Avoid-redefining-constants-introduced-in-glibc-2.41.patch
@@ -0,0 +1,172 @@
1From 950b8565e333e2ed1a515e2b342009a33ef51733 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Sergio=20G=C3=B3mez?=
3 <sergio.gdr@collabora.corp-partner.google.com>
4Date: Tue, 15 Apr 2025 17:57:46 -0500
5Subject: [PATCH] Avoid redefining constants introduced in glibc 2.41.
6
7These constants are now available through <sys/auxv.h> when using
8glibc >= 2.41, so we get re-define compilation errors.
9Just rename them by prefixing them with "CRYPTO_" to avoid the
10collision.
11
12Change-Id: I61807d8dfc8b5f482ec6191cb41aebfa5676c5b6
13Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/78527
14Commit-Queue: David Benjamin <davidben@google.com>
15Reviewed-by: David Benjamin <davidben@google.com>
16Reviewed-by: Adam Langley <agl@google.com>
17Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
18Upstream-Status: Backport [https://github.com/google/boringssl/commit/ff9475331e72936bc1c00fcda6d4820ba67d4dae]
19Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
20---
21 src/crypto/cpu_arm_linux.c | 33 +++++++++++++++++++++++++++-----
22 src/crypto/cpu_arm_linux.h | 20 ++++++++++---------
23 src/crypto/cpu_arm_linux_test.cc | 12 +++++++-----
24 3 files changed, 46 insertions(+), 19 deletions(-)
25
26diff --git a/src/crypto/cpu_arm_linux.c b/src/crypto/cpu_arm_linux.c
27index d13ac215c4df..7c7cd9dd93f4 100644
28--- a/src/crypto/cpu_arm_linux.c
29+++ b/src/crypto/cpu_arm_linux.c
30@@ -112,7 +112,11 @@ void OPENSSL_cpuid_setup(void) {
31
32 // Matching OpenSSL, only report other features if NEON is present.
33 unsigned long hwcap = getauxval(AT_HWCAP);
34- if (hwcap & HWCAP_NEON) {
35+ if (hwcap & CRYPTO_HWCAP_NEON) {
36+#if defined(HWCAP_ARM_NEON)
37+ static_assert(HWCAP_ARM_NEON == CRYPTO_HWCAP_NEON,
38+ "CRYPTO_HWCAP values must match Linux");
39+#endif
40 OPENSSL_armcap_P |= ARMV7_NEON;
41
42 // Some ARMv8 Android devices don't expose AT_HWCAP2. Fall back to
43@@ -126,16 +130,35 @@ void OPENSSL_cpuid_setup(void) {
44 g_needs_hwcap2_workaround = hwcap2 != 0;
45 }
46
47- if (hwcap2 & HWCAP2_AES) {
48+ // HWCAP2_* values, without the "CRYPTO_" prefix, are exposed through
49+ // <sys/auxv.h> in some versions of glibc(>= 2.41). Assert that we don't
50+ // diverge from those values.
51+ if (hwcap2 & CRYPTO_HWCAP2_AES) {
52+#if defined(HWCAP2_AES)
53+ static_assert(HWCAP2_AES == CRYPTO_HWCAP2_AES,
54+ "CRYPTO_HWCAP2 values must match Linux");
55+#endif
56 OPENSSL_armcap_P |= ARMV8_AES;
57 }
58- if (hwcap2 & HWCAP2_PMULL) {
59+ if (hwcap2 & CRYPTO_HWCAP2_PMULL) {
60+#if defined(HWCAP2_PMULL)
61+ static_assert(HWCAP2_PMULL == CRYPTO_HWCAP2_PMULL,
62+ "CRYPTO_HWCAP2 values must match Linux");
63+#endif
64 OPENSSL_armcap_P |= ARMV8_PMULL;
65 }
66- if (hwcap2 & HWCAP2_SHA1) {
67+ if (hwcap2 & CRYPTO_HWCAP2_SHA1) {
68+#if defined(HWCAP2_SHA1)
69+ static_assert(HWCAP2_SHA1 == CRYPTO_HWCAP2_SHA1,
70+ "CRYPTO_HWCAP2 values must match Linux");
71+#endif
72 OPENSSL_armcap_P |= ARMV8_SHA1;
73 }
74- if (hwcap2 & HWCAP2_SHA2) {
75+ if (hwcap2 & CRYPTO_HWCAP2_SHA2) {
76+#if defined(HWCAP2_SHA2)
77+ static_assert(HWCAP2_SHA2 == CRYPTO_HWCAP2_SHA2,
78+ "CRYPTO_HWCAP2 values must match Linux");
79+#endif
80 OPENSSL_armcap_P |= ARMV8_SHA256;
81 }
82 }
83diff --git a/src/crypto/cpu_arm_linux.h b/src/crypto/cpu_arm_linux.h
84index 895099787439..4b0ecfc77b49 100644
85--- a/src/crypto/cpu_arm_linux.h
86+++ b/src/crypto/cpu_arm_linux.h
87@@ -29,14 +29,16 @@ extern "C" {
88 // The cpuinfo parser lives in a header file so it may be accessible from
89 // cross-platform fuzzers without adding code to those platforms normally.
90
91-#define HWCAP_NEON (1 << 12)
92+#define CRYPTO_HWCAP_NEON (1 << 12)
93
94 // See /usr/include/asm/hwcap.h on an ARM installation for the source of
95 // these values.
96-#define HWCAP2_AES (1 << 0)
97-#define HWCAP2_PMULL (1 << 1)
98-#define HWCAP2_SHA1 (1 << 2)
99-#define HWCAP2_SHA2 (1 << 3)
100+// We add the prefix "CRYPTO_" to the definitions so as not to collide with
101+// some versions of glibc (>= 2.41) that expose them through <sys/auxv.h>.
102+#define CRYPTO_HWCAP2_AES (1 << 0)
103+#define CRYPTO_HWCAP2_PMULL (1 << 1)
104+#define CRYPTO_HWCAP2_SHA1 (1 << 2)
105+#define CRYPTO_HWCAP2_SHA2 (1 << 3)
106
107 typedef struct {
108 const char *data;
109@@ -141,16 +143,16 @@ static unsigned long crypto_get_arm_hwcap2_from_cpuinfo(
110
111 unsigned long ret = 0;
112 if (has_list_item(&features, "aes")) {
113- ret |= HWCAP2_AES;
114+ ret |= CRYPTO_HWCAP2_AES;
115 }
116 if (has_list_item(&features, "pmull")) {
117- ret |= HWCAP2_PMULL;
118+ ret |= CRYPTO_HWCAP2_PMULL;
119 }
120 if (has_list_item(&features, "sha1")) {
121- ret |= HWCAP2_SHA1;
122+ ret |= CRYPTO_HWCAP2_SHA1;
123 }
124 if (has_list_item(&features, "sha2")) {
125- ret |= HWCAP2_SHA2;
126+ ret |= CRYPTO_HWCAP2_SHA2;
127 }
128 return ret;
129 }
130diff --git a/src/crypto/cpu_arm_linux_test.cc b/src/crypto/cpu_arm_linux_test.cc
131index 0b6b02fbe4d1..cd626a90512e 100644
132--- a/src/crypto/cpu_arm_linux_test.cc
133+++ b/src/crypto/cpu_arm_linux_test.cc
134@@ -93,7 +93,8 @@ TEST(ARMLinuxTest, CPUInfo) {
135 // (Extra processors omitted.)
136 "\n"
137 "Hardware : Qualcomm Technologies, Inc MSM8998\n",
138- HWCAP2_AES | HWCAP2_PMULL | HWCAP2_SHA1 | HWCAP2_SHA2,
139+ CRYPTO_HWCAP2_AES | CRYPTO_HWCAP2_PMULL | CRYPTO_HWCAP2_SHA1 |
140+ CRYPTO_HWCAP2_SHA2,
141 },
142 // Garbage should be tolerated.
143 {
144@@ -105,23 +106,24 @@ TEST(ARMLinuxTest, CPUInfo) {
145 {
146 "Features : aes pmull sha1 sha2\n"
147 "CPU architecture: 8\n",
148- HWCAP2_AES | HWCAP2_PMULL | HWCAP2_SHA1 | HWCAP2_SHA2,
149+ CRYPTO_HWCAP2_AES | CRYPTO_HWCAP2_PMULL | CRYPTO_HWCAP2_SHA1 |
150+ CRYPTO_HWCAP2_SHA2,
151 },
152 // Various combinations of ARMv8 flags.
153 {
154 "Features : aes sha1 sha2\n"
155 "CPU architecture: 8\n",
156- HWCAP2_AES | HWCAP2_SHA1 | HWCAP2_SHA2,
157+ CRYPTO_HWCAP2_AES | CRYPTO_HWCAP2_SHA1 | CRYPTO_HWCAP2_SHA2,
158 },
159 {
160 "Features : pmull sha2\n"
161 "CPU architecture: 8\n",
162- HWCAP2_PMULL | HWCAP2_SHA2,
163+ CRYPTO_HWCAP2_PMULL | CRYPTO_HWCAP2_SHA2,
164 },
165 {
166 "Features : aes aes aes not_aes aes aes \n"
167 "CPU architecture: 8\n",
168- HWCAP2_AES,
169+ CRYPTO_HWCAP2_AES,
170 },
171 {
172 "Features : \n"
diff --git a/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/0001-cmake-add-SOVERSION-0-to-crypto-and-ssl-shared-libra.patch b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/0001-cmake-add-SOVERSION-0-to-crypto-and-ssl-shared-libra.patch
new file mode 100644
index 0000000000..74ad93aa8d
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/0001-cmake-add-SOVERSION-0-to-crypto-and-ssl-shared-libra.patch
@@ -0,0 +1,62 @@
1From 03a13ef3ea786286d9317562647e9856c1b71736 Mon Sep 17 00:00:00 2001
2From: Etienne Cordonnier <ecordonnier@snap.com>
3Date: Thu, 11 Jun 2026 00:00:00 +0000
4Subject: [PATCH] cmake: add SOVERSION 0 to crypto and ssl shared libraries
5
6BoringSSL's CMakeLists.txt does not set SOVERSION, so the built shared
7libraries have no SONAME embedded and cmake names them libcrypto.so /
8libssl.so without any version suffix. This causes two problems in a
9Yocto build:
10
111. The Yocto QA check "dev-so" rejects unversioned .so symlinks in
12 non-dev packages, but those symlinks are required at runtime because
13 the DT_NEEDED entry in binaries that link against BoringSSL refers to
14 the bare libcrypto.so name.
15
162. Standard Yocto FILES patterns split libraries by suffix: .so.* goes
17 into the runtime package and .so symlinks go into -dev. Without a
18 SOVERSION these patterns do not apply correctly.
19
20Setting SOVERSION to 0 causes cmake to:
21 - build libcrypto.so.0 as the real ELF with SONAME=libcrypto.so.0
22 - create libcrypto.so as a development symlink
23
24Binaries linked with -l:libcrypto.so.0 (as android-tools does) will
25record DT_NEEDED=libcrypto.so.0 and resolve correctly at runtime.
26
27Upstream-Status: Inappropriate [OE-specific packaging requirement]
28Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
29---
30 crypto/CMakeLists.txt | 2 ++
31 ssl/CMakeLists.txt | 2 ++
32 2 files changed, 4 insertions(+)
33
34diff --git a/crypto/CMakeLists.txt b/crypto/CMakeLists.txt
35index cdb5ddc..fca86cc 100644
36--- a/crypto/CMakeLists.txt
37+++ b/crypto/CMakeLists.txt
38@@ -327,6 +327,8 @@ endif()
39
40 set_target_properties(crypto PROPERTIES LINKER_LANGUAGE C)
41
42+set_target_properties(crypto PROPERTIES SOVERSION 0)
43+
44 if(WIN32)
45 target_link_libraries(crypto ws2_32)
46 endif()
47diff --git a/ssl/CMakeLists.txt b/ssl/CMakeLists.txt
48index d8d997e..e49b350 100644
49--- a/ssl/CMakeLists.txt
50+++ b/ssl/CMakeLists.txt
51@@ -46,6 +46,8 @@ install_if_enabled(TARGETS ssl EXPORT OpenSSLTargets ${INSTALL_DESTINATION_DEFAU
52 set_property(TARGET ssl PROPERTY EXPORT_NAME SSL)
53 target_link_libraries(ssl crypto)
54
55+set_target_properties(ssl PROPERTIES SOVERSION 0)
56+
57 add_executable(
58 ssl_test
59
60--
612.43.0
62
diff --git a/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/boringssl-go-stub b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/boringssl-go-stub
new file mode 100644
index 0000000000..de63f38c9c
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/boringssl-go-stub
@@ -0,0 +1,22 @@
1#!/bin/sh
2if [ "$1" = "run" ] && [ "$2" = "util/embed_test_data.go" ]; then
3 echo 'extern const int boringssl_dummy_crypto_test_data = 0;'
4 exit 0
5fi
6if [ "$1" = "run" ] && [ "$2" = "err_data_generate.go" ]; then
7 cat <<'EOF'
8#include <stddef.h>
9#include <stdint.h>
10
11const uint32_t kOpenSSLReasonValues[] = {0};
12const size_t kOpenSSLReasonValuesLen = 0;
13const char kOpenSSLReasonStringData[] = "";
14EOF
15 exit 0
16fi
17if [ "$1" = "version" ]; then
18 echo 'go version go0.0.0 yocto/stub'
19 exit 0
20fi
21echo "Unexpected Go invocation: $*" >&2
22exit 1
diff --git a/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/boringssl-gtest-stub.cc b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/boringssl-gtest-stub.cc
new file mode 100644
index 0000000000..7477536281
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl/boringssl-gtest-stub.cc
@@ -0,0 +1 @@
int boringssl_dummy_gtest_translation_unit = 0;
diff --git a/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl_14.0.0+r45.bb b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl_14.0.0+r45.bb
new file mode 100644
index 0000000000..ebf125c735
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-libboringssl/android-libboringssl_14.0.0+r45.bb
@@ -0,0 +1,70 @@
1DESCRIPTION = "BoringSSL shared libraries for android-tools"
2SECTION = "libs"
3# This recipe is tightly coupled to android-tools: when upgrading android-tools,
4# update this recipe to the BoringSSL version shipped in the corresponding Debian
5# android-platform-tools source package.
6# BoringSSL is a fork of OpenSSL; new files carry ISC license, OpenSSL license
7# covers the forked parts.
8LICENSE = "OpenSSL & ISC"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=2ca501bc96ce9ed0814e2c592c3f9593"
10
11SRC_URI = "https://deb.debian.org/debian/pool/main/a/android-platform-external-boringssl/android-platform-external-boringssl_${PV}.orig.tar.xz \
12 file://boringssl-go-stub \
13 file://boringssl-gtest-stub.cc \
14 file://0001-cmake-add-SOVERSION-0-to-crypto-and-ssl-shared-libra.patch \
15 file://0001-Avoid-redefining-constants-introduced-in-glibc-2.41.patch;patchdir=.. \
16 "
17SRC_URI[md5sum] = "83d24d2f3136ba6a486b5464369b91b4"
18SRC_URI[sha256sum] = "f9223e8c15ad5d9e3f1cd50861f4c272658864661e2332bea5d60952aa0930cd"
19
20# The Debian orig tarball unpacks to android-platform-external-boringssl-${PV}/
21# with the actual source under a src/ subdirectory.
22S = "${UNPACKDIR}/android-platform-external-boringssl-${PV}/src"
23
24inherit cmake
25
26CFLAGS:append = " -Wno-discarded-qualifiers"
27
28OECMAKE_TARGET_COMPILE = "crypto ssl"
29
30EXTRA_OECMAKE = " \
31 -DBUILD_SHARED_LIBS=ON \
32 -DBUILD_TESTING=OFF \
33 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
34 -DGO_EXECUTABLE=${WORKDIR}/hosttools/go \
35"
36
37do_configure:prepend() {
38 install -d ${WORKDIR}/hosttools
39 install -m 0755 ${UNPACKDIR}/boringssl-go-stub ${WORKDIR}/hosttools/go
40
41 # BoringSSL builds its own minimal gtest from third_party/googletest; provide
42 # an empty stub .cc. We only build the crypto and ssl targets so the test
43 # source files are never compiled, but cmake still needs gtest-all.cc to
44 # exist to create the boringssl_gtest target.
45 if [ ! -f ${S}/third_party/googletest/src/gtest-all.cc ]; then
46 install -d ${S}/third_party/googletest/src
47 install -m 0644 ${UNPACKDIR}/boringssl-gtest-stub.cc \
48 ${S}/third_party/googletest/src/gtest-all.cc
49 fi
50}
51do_install() {
52 # Install headers under a boringssl/ subdirectory to avoid shadowing the
53 # system OpenSSL headers in the sysroot.
54 install -d ${D}${includedir}/boringssl
55 cp -a ${S}/include/openssl ${D}${includedir}/boringssl/
56
57 # Install shared libraries under ${libdir}/android/ to avoid conflicting
58 # with the system libssl/libcrypto in the sysroot.
59 install -d ${D}${libdir}/android
60 install -m 0755 ${B}/crypto/libcrypto.so.0 ${D}${libdir}/android/libcrypto.so.0
61 ln -sf libcrypto.so.0 ${D}${libdir}/android/libcrypto.so
62 install -m 0755 ${B}/ssl/libssl.so.0 ${D}${libdir}/android/libssl.so.0
63 ln -sf libssl.so.0 ${D}${libdir}/android/libssl.so
64
65}
66
67FILES:${PN}-dev = "${includedir}/boringssl ${libdir}/android/libcrypto.so ${libdir}/android/libssl.so"
68FILES:${PN} = "${libdir}/android/libcrypto.so.0 ${libdir}/android/libssl.so.0"
69
70BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf
deleted file mode 100644
index ddf155a907..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/10-adbd-configfs.conf
+++ /dev/null
@@ -1,4 +0,0 @@
1[Service]
2ExecStartPre=/usr/bin/android-gadget-setup
3ExecStartPost=/usr/bin/android-gadget-start
4ExecStopPost=/usr/bin/android-gadget-cleanup
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-setup b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-setup
deleted file mode 100644
index 47e4edb9be..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-setup
+++ /dev/null
@@ -1,38 +0,0 @@
1#!/bin/sh
2
3set -e
4
5conf="Conf 1"
6manufacturer=RPB
7model="Android device"
8product=0xd002
9serial=0123456789ABCDEF
10vendor=0x18d1
11
12if [ -r /etc/android-gadget-setup.machine ] ; then
13 . /etc/android-gadget-setup.machine
14fi
15
16[ -d /sys/kernel/config/usb_gadget ] || modprobe libcomposite
17
18cd /sys/kernel/config/usb_gadget
19
20[ -d adb ] && /usr/bin/android-gadget-cleanup || true
21
22mkdir adb
23cd adb
24
25mkdir configs/c.1
26mkdir functions/ffs.usb0
27mkdir strings/0x409
28mkdir configs/c.1/strings/0x409
29echo -n "$vendor" > idVendor
30echo -n "$product" > idProduct
31echo "$serial" > strings/0x409/serialnumber
32echo "$manufacturer" > strings/0x409/manufacturer
33echo "$model" > strings/0x409/product
34echo "$conf" > configs/c.1/strings/0x409/configuration
35ln -s functions/ffs.usb0 configs/c.1
36
37mkdir -p /dev/usb-ffs/adb
38mount -t functionfs usb0 /dev/usb-ffs/adb
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start
deleted file mode 100644
index 76b5e29624..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start
+++ /dev/null
@@ -1,9 +0,0 @@
1#!/bin/sh
2
3set -e
4
5sleep 10
6
7ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC
8
9echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb
deleted file mode 100644
index 342e7fd1a5..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs_1.0.bb
+++ /dev/null
@@ -1,38 +0,0 @@
1DESCRIPTION = "Different utilities from Android - corressponding configuration files for using ConfigFS"
2SECTION = "console/utils"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6S = "${UNPACKDIR}"
7
8SRC_URI = " \
9 file://android-gadget-setup \
10 file://android-gadget-start \
11 file://android-gadget-cleanup \
12 file://10-adbd-configfs.conf \
13"
14
15PACKAGE_ARCH = "${MACHINE_ARCH}"
16
17do_install() {
18 install -d ${D}${bindir}
19 install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir}
20 install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir}
21 install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir}
22
23 if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then
24 install -d ${D}${sysconfdir}
25 install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir}
26 fi
27
28 install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d
29 install -m 0644 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d
30}
31
32FILES:${PN} += " \
33 ${systemd_unitdir}/system/ \
34"
35
36PROVIDES += "android-tools-conf"
37RPROVIDES:${PN} = "android-tools-conf"
38BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf/10-adbd-configfs.conf b/meta-oe/recipes-devtools/android-tools/android-tools-conf/10-adbd-configfs.conf
new file mode 100644
index 0000000000..7971f319c3
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/10-adbd-configfs.conf
@@ -0,0 +1,7 @@
1[Service]
2# adbd uses sd_notify to signal readiness; ExecStartPost runs only after
3# READY=1 is sent, so no delay is needed before activating the UDC.
4Environment=ANDROID_GADGET_UDC_DELAY=0
5ExecStartPre=/usr/bin/android-gadget-setup
6ExecStartPost=/usr/bin/android-gadget-start
7ExecStopPost=/usr/bin/android-gadget-cleanup
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-cleanup b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-cleanup
index f27d77df51..f27d77df51 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-cleanup
+++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-cleanup
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup
index 26cf30eddd..2744d1e98e 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup
+++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-setup
@@ -1,37 +1,40 @@
1#!/bin/sh 1#!/bin/sh
2 2
3[ ! -e /dev/pts ] && mkdir -p /dev/pts 3set -e
4[ ! -e /dev/pts/0 ] && mount devpts /dev/pts -t devpts 4
5 5conf="Conf 1"
6# TODO enable the lines below once we have support for getprop 6manufacturer=RPB
7# retrieve the product info from Android 7model="Android device"
8# manufacturer=$(getprop ro.product.manufacturer Android) 8product=0xd002
9# model=$(getprop ro.product.model Android) 9serial=0123456789ABCDEF
10# serial=$(getprop ro.serialno 0123456789ABCDEF) 10vendor=0x18d1
11 11
12#below are now needed in order to use FunctionFS for ADB, tested to work with 3.4+ kernels 12if [ -r /etc/android-gadget-setup.machine ] ; then
13if grep -q functionfs /proc/filesystems; then 13 . /etc/android-gadget-setup.machine
14 mkdir -p /dev/usb-ffs/adb
15 mount -t functionfs adb /dev/usb-ffs/adb
16 #android-gadget-setup doesn't provide below 2 and without them it won't work, so we provide them here.
17 echo adb > /sys/class/android_usb/android0/f_ffs/aliases
18 echo ffs > /sys/class/android_usb/android0/functions
19fi 14fi
20 15
21manufacturer="$(cat /system/build.prop | grep -o 'ro.product.manufacturer=.*' | cut -d'=' -f 2)" 16[ -d /sys/kernel/config/usb_gadget ] || modprobe libcomposite
22model="$(cat /system/build.prop | grep -o 'ro.product.model=.*' | cut -d'=' -f 2)" 17
23# get the device serial number from /proc/cmdline directly(since we have no getprop on 18cd /sys/kernel/config/usb_gadget
24# GNU/Linux) 19
25serial="$(cat /proc/cmdline | sed 's/.*androidboot.serialno=//' | sed 's/ .*//')" 20[ -d adb ] && /usr/bin/android-gadget-cleanup || true
26 21
27echo $serial > /sys/class/android_usb/android0/iSerial 22mkdir adb
28echo $manufacturer > /sys/class/android_usb/android0/iManufacturer 23cd adb
29echo $model > /sys/class/android_usb/android0/iProduct
30 24
31echo "0" > /sys/class/android_usb/android0/enable 25mkdir configs/c.1
32echo "18d1" > /sys/class/android_usb/android0/idVendor 26mkdir functions/ffs.usb0
33echo "D002" > /sys/class/android_usb/android0/idProduct 27mkdir strings/0x409
34echo "adb" > /sys/class/android_usb/android0/functions 28mkdir configs/c.1/strings/0x409
35echo "1" > /sys/class/android_usb/android0/enable 29echo -n "$vendor" > idVendor
30echo -n "$product" > idProduct
31echo "$serial" > strings/0x409/serialnumber
32echo "$manufacturer" > strings/0x409/manufacturer
33echo "$model" > strings/0x409/product
34echo "$conf" > configs/c.1/strings/0x409/configuration
35ln -s functions/ffs.usb0 configs/c.1
36 36
37sleep 4 37mkdir -p /dev/usb-ffs/adb
38ADB_UID=$(id -u adb)
39ADB_GID=$(id -g adb)
40mount -t functionfs usb0 /dev/usb-ffs/adb -o "uid=$ADB_UID,gid=$ADB_GID"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-start b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-start
new file mode 100644
index 0000000000..4ea688accb
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf/android-gadget-start
@@ -0,0 +1,16 @@
1#!/bin/sh
2
3set -e
4
5# Wait for adbd to open ep0 before activating the UDC. Without systemd
6# sd_notify synchronisation there is no other signal that adbd is ready, so
7# a fixed delay is used. When this script is invoked via ExecStartPost in a
8# Type=notify service, adbd has already sent READY=1 before this runs and
9# no delay is needed; set ANDROID_GADGET_UDC_DELAY=0 in that case (e.g. via
10# a systemd drop-in Environment= line).
11ANDROID_GADGET_UDC_DELAY="${ANDROID_GADGET_UDC_DELAY:-10}"
12sleep "$ANDROID_GADGET_UDC_DELAY"
13
14ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC
15
16echo "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb b/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb
index 764d6b404f..bb55b3599f 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb
+++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf_1.0.bb
@@ -1,22 +1,40 @@
1DESCRIPTION = "Different utilities from Android - corressponding configuration files" 1DESCRIPTION = "Different utilities from Android - corresponding configuration files for using ConfigFS"
2SECTION = "console/utils" 2SECTION = "console/utils"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" 4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5 5
6SRC_URI = "file://android-gadget-setup"
7
8S = "${UNPACKDIR}" 6S = "${UNPACKDIR}"
9 7
8SRC_URI = " \
9 file://android-gadget-setup \
10 file://android-gadget-start \
11 file://android-gadget-cleanup \
12 file://10-adbd-configfs.conf \
13"
14
10PACKAGE_ARCH = "${MACHINE_ARCH}" 15PACKAGE_ARCH = "${MACHINE_ARCH}"
11 16
12do_install() { 17do_install() {
13 install -d ${D}${bindir} 18 install -d ${D}${bindir}
14 install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir} 19 install -m 0755 ${UNPACKDIR}/android-gadget-setup ${D}${bindir}
15} 20 install -m 0755 ${UNPACKDIR}/android-gadget-start ${D}${bindir}
21 install -m 0755 ${UNPACKDIR}/android-gadget-cleanup ${D}${bindir}
16 22
17python () { 23 if [ -r ${UNPACKDIR}/android-gadget-setup.machine ] ; then
18 pn = d.getVar('PN') 24 install -d ${D}${sysconfdir}
19 profprov = d.getVar("PREFERRED_PROVIDER_" + pn) 25 install -m 0644 ${UNPACKDIR}/android-gadget-setup.machine ${D}${sysconfdir}
20 if profprov and pn != profprov: 26 fi
21 raise bb.parse.SkipRecipe("PREFERRED_PROVIDER_%s set to %s, not %s" % (pn, profprov, pn)) 27
28 install -d ${D}${systemd_unitdir}/system/android-tools-adbd.service.d
29 install -m 0644 ${UNPACKDIR}/10-adbd-configfs.conf ${D}${systemd_unitdir}/system/android-tools-adbd.service.d
22} 30}
31
32FILES:${PN} += " \
33 ${systemd_unitdir}/system/ \
34"
35
36PROVIDES += "android-tools-conf-configfs"
37RPROVIDES:${PN} = "android-tools-conf-configfs"
38RREPLACES:${PN} = "android-tools-conf-configfs"
39RCONFLICTS:${PN} = "android-tools-conf-configfs"
40BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0001-libbacktrace.mk-Link-against-staged-lib7z.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0001-libbacktrace.mk-Link-against-staged-lib7z.patch
new file mode 100644
index 0000000000..845e267c41
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0001-libbacktrace.mk-Link-against-staged-lib7z.patch
@@ -0,0 +1,38 @@
1From 1eab8bc4974c887c09d6b444c5198ec4c0932b36 Mon Sep 17 00:00:00 2001
2From: Mihajlo Marinkovic <mmarinkovic@snap.com>
3Date: Fri, 8 May 2026 12:10:00 +0000
4Subject: [PATCH] libbacktrace.mk: Link against staged lib7z
5
6In the Yocto target sysroot, p7zip installs `lib7z.so` under `/usr/lib`.
7The Debian make fragment hardcodes `/usr/lib/7zip` and links `-l:7z.so`,
8which does not exist in this environment and causes link failure.
9
10Use the standard sysroot library search path and link against `-l7z`
11instead.
12
13Upstream-Status: Inappropriate [OE-specific]
14
15Signed-off-by: Mihajlo Marinkovic <mmarinkovic@snap.com>
16---
17 debian/system/libbacktrace.mk | 4 +---
18 1 file changed, 1 insertion(+), 3 deletions(-)
19
20diff --git a/debian/system/libbacktrace.mk b/debian/system/libbacktrace.mk
21index b106c24..0f798d4 100644
22--- a/debian/system/libbacktrace.mk
23+++ b/debian/system/libbacktrace.mk
24@@ -64,13 +64,11 @@ CPPFLAGS += \
25 -Isystem/unwinding/libunwindstack/include \
26
27 LDFLAGS += \
28- -L/usr/lib/7zip \
29 -Ldebian/out/external \
30 -Ldebian/out/system \
31 -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
32- -Wl,-rpath=/usr/lib/7zip \
33 -Wl,-soname,$(NAME).so.0 \
34- -l:7z.so \
35+ -l7z \
36 -lbase \
37 -llog \
38 -lpthread \
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0002-debian-makefiles-yocto-compat.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0002-debian-makefiles-yocto-compat.patch
new file mode 100644
index 0000000000..a7c8dcf946
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0002-debian-makefiles-yocto-compat.patch
@@ -0,0 +1,240 @@
1From 14058ff506910f19c6e6a49e2bb081c398a7acf0 Mon Sep 17 00:00:00 2001
2From: Mihajlo Marinkovic <mmarinkovic@snap.com>
3Date: Sun, 10 May 2026 15:20:00 +0000
4Subject: [PATCH] debian makefiles: adapt for cross-compilation in Yocto
5
6The Debian make fragments hardcode several assumptions that only work on
7a Debian build host:
8 - include /usr/share/dpkg/architecture.mk (shells out to dpkg-architecture)
9 - /usr/include/android (host path, not sysroot)
10 - /usr/lib/$(DEB_HOST_MULTIARCH)/android (host rpath)
11 - -lcrypto / -lssl (links against system OpenSSL instead of BoringSSL)
12 - -Wexit-time-destructors (Clang-only, rejected by GCC)
13
14Replace each with its Yocto-compatible equivalent: use $(SYSROOT) for
15include paths, rpath relative to $ORIGIN for installed libraries, exact
16soname matching for the staged BoringSSL shared objects, and drop the
17Clang-only warning flag.
18
19Upstream-Status: Inappropriate [OE-specific]
20
21Signed-off-by: Mihajlo Marinkovic <mmarinkovic@snap.com>
22---
23 debian/system/adb.mk | 9 ++++-----
24 debian/system/adbd.mk | 10 ++++------
25 debian/system/extras/libext4_utils.mk | 4 ++--
26 debian/system/fastboot.mk | 13 ++++++-------
27 debian/system/libadb.mk | 3 +--
28 debian/system/libbacktrace.mk | 2 +-
29 debian/system/libbase.mk | 2 +-
30 debian/system/libcrypto_utils.mk | 2 +-
31 debian/system/libcutils.mk | 2 +-
32 debian/system/liblog.mk | 1 +
33 debian/system/libutils.mk | 3 +--
34 11 files changed, 23 insertions(+), 28 deletions(-)
35
36diff --git a/debian/system/adb.mk b/debian/system/adb.mk
37index 89530b0..90a816f 100644
38--- a/debian/system/adb.mk
39+++ b/debian/system/adb.mk
40@@ -82,22 +82,21 @@ CPPFLAGS += \
41 -Isystem/libbase/include \
42 -Isystem/libziparchive/include \
43 \
44- -I/usr/include/android \
45+ -I$(SYSROOT)/usr/include/android \
46
47 LDFLAGS += \
48 -Ldebian/out/system \
49- -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \
50- -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
51+ -Wl,-rpath='$$ORIGIN/../lib/android' \
52 -lbase \
53 -lbrotlidec \
54 -lbrotlienc \
55- -lcrypto \
56+ -l:libcrypto.so.0 \
57 -lcutils \
58 -llog \
59 -llz4 \
60 -lprotobuf \
61 -lpthread \
62- -lssl \
63+ -l:libssl.so.0 \
64 -lusb-1.0 \
65 -lziparchive \
66 -lzstd \
67diff --git a/debian/system/adbd.mk b/debian/system/adbd.mk
68index 9d6abd7..73e49a4 100644
69--- a/debian/system/adbd.mk
70+++ b/debian/system/adbd.mk
71@@ -81,23 +81,21 @@ CPPFLAGS += \
72 -Isystem/libbase/include \
73 -Isystem/logging/liblog/include \
74 \
75- -I/usr/include/android \
76+ -I$(SYSROOT)/usr/include/android \
77
78 LDFLAGS += \
79 -Ldebian/out/system \
80- -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \
81- -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
82+ -Wl,-rpath='$$ORIGIN/../lib/android' \
83 -lbase \
84 -lbrotlidec \
85 -lbrotlienc \
86- -lcrypto \
87+ -l:libcrypto.so.0 \
88 -lcutils \
89 -llog \
90 -llz4 \
91 -lprotobuf \
92 -lresolv \
93- -lssl \
94- -lsystemd \
95+ -l:libssl.so.0 \
96 -lzstd \
97 -pie \
98
99diff --git a/debian/system/extras/libext4_utils.mk b/debian/system/extras/libext4_utils.mk
100index 77455f4..5bfc950 100644
101--- a/debian/system/extras/libext4_utils.mk
102+++ b/debian/system/extras/libext4_utils.mk
103@@ -26,8 +26,8 @@ CPPFLAGS += \
104 -D_LARGEFILE64_SOURCE \
105 -DFEC_NO_KLOG \
106 -DSQUASHFS_NO_KLOG \
107- -I/usr/include/android \
108- -I/usr/include/squashfuse \
109+ -I$(SYSROOT)/usr/include/android \
110+ -I$(SYSROOT)/usr/include/squashfuse \
111 -Isystem/core/libcutils/include \
112 -Isystem/core/libsparse/include \
113 -Isystem/extras/ext4_utils/include \
114diff --git a/debian/system/fastboot.mk b/debian/system/fastboot.mk
115index d68a99a..52f5d8b 100644
116--- a/debian/system/fastboot.mk
117+++ b/debian/system/fastboot.mk
118@@ -56,16 +56,15 @@ CPPFLAGS += \
119 -Isystem/libziparchive/include \
120 -Isystem/tools/mkbootimg/include/bootimg \
121 \
122- -I/usr/include/android \
123+ -I$(SYSROOT)/usr/include/android \
124
125 LDFLAGS += \
126 -Ldebian/out/system \
127- -L/usr/lib/$(DEB_HOST_MULTIARCH)/android \
128- -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
129- -lbase \
130- -lcrypto \
131- -lcutils \
132- -llog \
133+ -Wl,-rpath='$$ORIGIN/../lib/android' \
134+ debian/out/system/libbase.so.0 \
135+ -l:libcrypto.so.0 \
136+ debian/out/system/libcutils.so.0 \
137+ debian/out/system/liblog.so.0 \
138 -lpthread \
139 -lprotobuf \
140 -lsparse \
141diff --git a/debian/system/libadb.mk b/debian/system/libadb.mk
142index 52f2838..ebd52aa 100644
143--- a/debian/system/libadb.mk
144+++ b/debian/system/libadb.mk
145@@ -73,7 +73,6 @@ SOURCES_CC = $(filter %.cc,$(SOURCES))
146 OBJECTS_CC = $(SOURCES_CC:.cc=.o)
147
148 CXXFLAGS += \
149- -Wexit-time-destructors \
150 -Wno-non-virtual-dtor \
151 -Wno-unused-parameter \
152 -Wno-missing-field-initializers \
153@@ -96,7 +95,7 @@ CPPFLAGS += \
154 -Isystem/core/libcutils/include \
155 -Isystem/libbase/include \
156 \
157- -I/usr/include/android \
158+ -I$(SYSROOT)/usr/include/android \
159
160 debian/out/system/$(NAME).a: $(OBJECTS_CC) $(OBJECTS_CPP)
161 ar -rcs $@ $^
162diff --git a/debian/system/libbacktrace.mk b/debian/system/libbacktrace.mk
163index 0f798d4..f004061 100644
164--- a/debian/system/libbacktrace.mk
165+++ b/debian/system/libbacktrace.mk
166@@ -1,4 +1,4 @@
167-include /usr/share/dpkg/architecture.mk
168+DEB_HOST_MULTIARCH ?=
169
170 NAME = libbacktrace
171
172diff --git a/debian/system/libbase.mk b/debian/system/libbase.mk
173index f04d3f9..61f71c6 100644
174--- a/debian/system/libbase.mk
175+++ b/debian/system/libbase.mk
176@@ -42,7 +42,7 @@ CPPFLAGS += \
177
178 LDFLAGS += \
179 -Ldebian/out/system \
180- -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
181+ -Wl,-rpath='$$ORIGIN' \
182 -Wl,-soname,$(NAME).so.0 \
183 -llog \
184 -lpthread \
185diff --git a/debian/system/libcrypto_utils.mk b/debian/system/libcrypto_utils.mk
186index 39fd8a7..82ae46c 100644
187--- a/debian/system/libcrypto_utils.mk
188+++ b/debian/system/libcrypto_utils.mk
189@@ -7,7 +7,7 @@ CPPFLAGS += \
190 -Isystem/core/include \
191 -Isystem/core/libcrypto_utils/include \
192 \
193- -I/usr/include/android \
194+ -I$(SYSROOT)/usr/include/android \
195
196 debian/out/system/$(NAME).a: $(OBJECTS)
197 ar -rcs $@ $^
198diff --git a/debian/system/libcutils.mk b/debian/system/libcutils.mk
199index 596ebd8..ff9e911 100644
200--- a/debian/system/libcutils.mk
201+++ b/debian/system/libcutils.mk
202@@ -50,7 +50,7 @@ CPPFLAGS += \
203
204 LDFLAGS += \
205 -Ldebian/out/system \
206- -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
207+ -Wl,-rpath='$$ORIGIN' \
208 -Wl,-soname,$(NAME).so.0 \
209 -lbase \
210 -llog \
211diff --git a/debian/system/liblog.mk b/debian/system/liblog.mk
212index b08a50c..091ccad 100644
213--- a/debian/system/liblog.mk
214+++ b/debian/system/liblog.mk
215@@ -27,6 +27,7 @@ CPPFLAGS += \
216 -Isystem/logging/liblog/include \
217
218 LDFLAGS += \
219+ -Wl,-rpath='$$ORIGIN' \
220 -Wl,-soname,$(NAME).so.0 \
221 -lpthread \
222 -shared
223diff --git a/debian/system/libutils.mk b/debian/system/libutils.mk
224index 6218c73..c7948e7 100644
225--- a/debian/system/libutils.mk
226+++ b/debian/system/libutils.mk
227@@ -1,4 +1,3 @@
228-include /usr/share/dpkg/architecture.mk
229
230 NAME = libutils
231
232@@ -42,7 +41,7 @@ CPPFLAGS += \
233
234 LDFLAGS += \
235 -Ldebian/out/system \
236- -Wl,-rpath=/usr/lib/$(DEB_HOST_MULTIARCH)/android \
237+ -Wl,-rpath='$$ORIGIN' \
238 -Wl,-soname,$(NAME).so.0 \
239 -lbacktrace \
240 -lcutils \
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0003-gcc-nullability-and-thread-annotation-compat.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0003-gcc-nullability-and-thread-annotation-compat.patch
new file mode 100644
index 0000000000..c3cf572ebd
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0003-gcc-nullability-and-thread-annotation-compat.patch
@@ -0,0 +1,34 @@
1From 793ad99196c5b9cf2922689d993b8f798e87174c Mon Sep 17 00:00:00 2001
2From: Mihajlo Marinkovic <mmarinkovic@snap.com>
3Date: Sun, 10 May 2026 12:00:00 +0200
4Subject: [PATCH] GCC nullability and thread annotation compat
5
6GCC does not understand the Clang-only nullability markers used in adb,
7and it rejects function-definition attributes emitted by the thread
8annotation macros. The nullability markers are injected from the Yocto
9recipe flags, while thread annotation attributes are made Clang-only so
10the sources parse under Yocto's GCC toolchain.
11
12Upstream-Status: Inappropriate [OE-specific]
13
14Signed-off-by: Mihajlo Marinkovic <mmarinkovic@snap.com>
15---
16 system/libbase/include/android-base/thread_annotations.h | 4 ++++
17 1 file changed, 4 insertions(+)
18
19diff --git a/system/libbase/include/android-base/thread_annotations.h b/system/libbase/include/android-base/thread_annotations.h
20index 53fe6da..5523521 100644
21--- a/system/libbase/include/android-base/thread_annotations.h
22+++ b/system/libbase/include/android-base/thread_annotations.h
23@@ -18,7 +18,11 @@
24
25 #include <mutex>
26
27+#if defined(__clang__)
28 #define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
29+#else
30+#define THREAD_ANNOTATION_ATTRIBUTE__(x)
31+#endif
32
33 #define CAPABILITY(x) \
34 THREAD_ANNOTATION_ATTRIBUTE__(capability(x))
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0004-fastboot-super_flash_helper-include-climits.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0004-fastboot-super_flash_helper-include-climits.patch
new file mode 100644
index 0000000000..2b155e6a71
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0004-fastboot-super_flash_helper-include-climits.patch
@@ -0,0 +1,41 @@
1From fe7c2aa9a9032d11cb14ff7ab2a1a000237edaa3 Mon Sep 17 00:00:00 2001
2From: Mihajlo Marinkovic <mmarinkovic@snap.com>
3Date: Tue, 26 May 2026 17:41:00 +0200
4Subject: [PATCH] adb: include <climits> for missing integer constants
5
6GCC rejects builds where IOV_MAX (sysdeps/uio.h) or UINT_MAX
7(super_flash_helper.cpp) are used without the header that defines them.
8Add #include <climits> in both files.
9
10Upstream-Status: Inappropriate [OE-specific sysroot compat]
11
12Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
13---
14 packages/modules/adb/sysdeps/uio.h | 1 +
15 system/core/fastboot/super_flash_helper.cpp | 1 +
16 2 files changed, 2 insertions(+)
17
18diff --git a/packages/modules/adb/sysdeps/uio.h b/packages/modules/adb/sysdeps/uio.h
19index f3ace64..163b4a8 100644
20--- a/packages/modules/adb/sysdeps/uio.h
21+++ b/packages/modules/adb/sysdeps/uio.h
22@@ -35,6 +35,7 @@ ssize_t adb_writev(borrowed_fd fd, const adb_iovec* iov, int iovcnt);
23 #else
24
25 #include <sys/uio.h>
26+#include <climits>
27 using adb_iovec = struct iovec;
28 inline ssize_t adb_writev(borrowed_fd fd, const adb_iovec* iov, int iovcnt) {
29 return writev(fd.get(), iov, std::min(iovcnt, IOV_MAX));
30diff --git a/system/core/fastboot/super_flash_helper.cpp b/system/core/fastboot/super_flash_helper.cpp
31index b617ce8..8c1edde 100644
32--- a/system/core/fastboot/super_flash_helper.cpp
33+++ b/system/core/fastboot/super_flash_helper.cpp
34@@ -16,6 +16,7 @@
35
36 #include "super_flash_helper.h"
37
38+#include <climits>
39 #include <android-base/logging.h>
40
41 #include "util.h"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0005-adb-host-usb-compat.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0005-adb-host-usb-compat.patch
new file mode 100644
index 0000000000..6f396b7e9d
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0005-adb-host-usb-compat.patch
@@ -0,0 +1,34 @@
1From da0746f90c80bb5621d01f35d505412cd26898e2 Mon Sep 17 00:00:00 2001
2From: Mihajlo Marinkovic <mmarinkovic@snap.com>
3Date: Thu, 21 May 2026 14:10:00 +0200
4Subject: [PATCH] adb: replace socket_get_local_port with inline getsockname
5
6The libcutils socket_get_local_port helper is not available in the native
7libcutils build. Replace the call with an inline getsockname implementation.
8
9Upstream-Status: Inappropriate [OE-specific]
10
11Signed-off-by: Mihajlo Marinkovic <mmarinkovic@snap.com>
12---
13 packages/modules/adb/sysdeps.h | 8 +++++++-
14 1 file changed, 7 insertions(+), 1 deletion(-)
15
16diff --git a/packages/modules/adb/sysdeps.h b/packages/modules/adb/sysdeps.h
17index 99f6b74..9a99295 100644
18--- a/packages/modules/adb/sysdeps.h
19+++ b/packages/modules/adb/sysdeps.h
20@@ -626,7 +626,13 @@ inline int adb_getsockname(borrowed_fd fd, struct sockaddr* sockaddr, socklen_t*
21 }
22
23 inline int adb_socket_get_local_port(borrowed_fd fd) {
24- return socket_get_local_port(fd.get());
25+ sockaddr_storage addr;
26+ socklen_t addr_size = sizeof(addr);
27+
28+ if (getsockname(fd.get(), reinterpret_cast<sockaddr*>(&addr), &addr_size) == 0) {
29+ return ntohs(reinterpret_cast<sockaddr_in*>(&addr)->sin_port);
30+ }
31+ return -1;
32 }
33
34 // Operate on a file descriptor returned from unix_open() or a well-known file
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0006-adbd-enable-root-and-remount-support.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0006-adbd-enable-root-and-remount-support.patch
new file mode 100644
index 0000000000..700e64f06d
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0006-adbd-enable-root-and-remount-support.patch
@@ -0,0 +1,466 @@
1From d247444cf5ef0c8ee2fcf207febe09f5101c2215 Mon Sep 17 00:00:00 2001
2From: Mihajlo Marinkovic <mmarinkovic@snap.com>
3Date: Fri, 29 May 2026 12:10:00 +0200
4Subject: [PATCH] adbd: enable root and remount support
5
6Enable root/unroot and remount support for the non-Android adbd build.
7
8Upstream-Status: Inappropriate [embedded Linux integration]
9
10Signed-off-by: Mihajlo Marinkovic <mmarinkovic@snap.com>
11---
12 debian/system/adbd.mk | 3 +
13 .../modules/adb/daemon/framebuffer_service.h | 2 +-
14 packages/modules/adb/daemon/main.cpp | 93 +++++++++++++++----
15 .../modules/adb/daemon/restart_service.cpp | 40 +++++++-
16 packages/modules/adb/daemon/restart_service.h | 2 +-
17 packages/modules/adb/daemon/services.cpp | 81 ++++++++++++++--
18 packages/modules/adb/sockets.cpp | 20 +++-
19 packages/modules/adb/transport.cpp | 1 -
20 8 files changed, 204 insertions(+), 38 deletions(-)
21
22diff --git a/debian/system/adbd.mk b/debian/system/adbd.mk
23index 73e49a4..beb412e 100644
24--- a/debian/system/adbd.mk
25+++ b/debian/system/adbd.mk
26@@ -17,6 +17,8 @@ ADBD_SRC_FILES = \
27 daemon/jdwp_service.cpp \
28 daemon/logging.cpp \
29 daemon/main.cpp \
30+ daemon/framebuffer_service.cpp \
31+ daemon/restart_service.cpp \
32 daemon/transport_local.cpp \
33 daemon/usb.cpp \
34 daemon/usb_ffs.cpp \
35@@ -64,6 +66,7 @@ CPPFLAGS += \
36 -DPLATFORM_TOOLS_VERSION='"$(PLATFORM_TOOLS_VERSION)"' \
37 -DADB_HOST=0 \
38 -DADB_VERSION='"$(DEB_VERSION)"' \
39+ -DALLOW_ADBD_ROOT=1 \
40 -DANDROID_BASE_UNIQUE_FD_DISABLE_IMPLICIT_CONVERSION=1 \
41 -DPAGE_SIZE=4096 \
42 -Iframeworks/native/libs/adbd_auth/include/ \
43diff --git a/packages/modules/adb/daemon/framebuffer_service.h b/packages/modules/adb/daemon/framebuffer_service.h
44index bab44be..0a8c822 100644
45--- a/packages/modules/adb/daemon/framebuffer_service.h
46+++ b/packages/modules/adb/daemon/framebuffer_service.h
47@@ -18,6 +18,6 @@
48
49 #include "adb_unique_fd.h"
50
51-#if defined(__ANDROID__)
52+#if !defined(__ANDROID_RECOVERY__)
53 void framebuffer_service(unique_fd fd);
54 #endif
55diff --git a/packages/modules/adb/daemon/main.cpp b/packages/modules/adb/daemon/main.cpp
56index 83905d3..f177abf 100644
57--- a/packages/modules/adb/daemon/main.cpp
58+++ b/packages/modules/adb/daemon/main.cpp
59@@ -19,11 +19,15 @@
60 #include "sysdeps.h"
61
62 #include <errno.h>
63+#include <fcntl.h>
64 #include <getopt.h>
65+#include <grp.h>
66 #include <malloc.h>
67+#include <pwd.h>
68 #include <signal.h>
69 #include <stdio.h>
70 #include <stdlib.h>
71+#include <string.h>
72 #include <sys/capability.h>
73 #include <sys/prctl.h>
74
75@@ -61,6 +65,13 @@
76 #include "daemon/mdns.h"
77 #include "daemon/watchdog.h"
78
79+namespace {
80+constexpr char kAdbRootStatePath[] = "/run/.adb.root";
81+constexpr char kRootMagic[] = "#ROOT#";
82+constexpr char kNoRootMagic[] = "#NOROOT#";
83+constexpr size_t kRootMagicSize = sizeof(kRootMagic) - 1;
84+}
85+
86 #if defined(__ANDROID__)
87 static const char* root_seclabel = nullptr;
88
89@@ -75,24 +86,16 @@ static bool should_drop_privileges() {
90 //
91 // ro.secure:
92 // Drop privileges by default. Set to 1 on userdebug and user builds.
93- bool ro_secure = android::base::GetBoolProperty("ro.secure", true);
94- bool ro_debuggable = __android_log_is_debuggable();
95-
96- // Drop privileges if ro.secure is set...
97- bool drop = ro_secure;
98-
99- // ... except "adb root" lets you keep privileges in a debuggable build.
100- std::string prop = android::base::GetProperty("service.adb.root", "");
101- bool adb_root = (prop == "1");
102- bool adb_unroot = (prop == "0");
103- if (ro_debuggable && adb_root) {
104- drop = false;
105+ int f = unix_open(kAdbRootStatePath, O_RDONLY | O_CLOEXEC);
106+ if (f < 0) {
107+ return true;
108 }
109- // ... and "adb unroot" lets you explicitly drop privileges.
110- if (adb_unroot) {
111- drop = true;
112+ char buf[kRootMagicSize];
113+ bool drop = true;
114+ if (unix_read(f, buf, sizeof(buf)) != -1 && !strncmp(buf, kRootMagic, kRootMagicSize)) {
115+ drop = false;
116 }
117-
118+ unix_close(f);
119 return drop;
120 }
121
122@@ -122,6 +125,17 @@ static void drop_privileges(int server_port) {
123 // Don't listen on a port (default 5037) if running in secure mode.
124 // Don't run as root if running in secure mode.
125 if (should_drop_privileges()) {
126+ int f = unix_open(kAdbRootStatePath, O_WRONLY | O_CREAT | O_CLOEXEC, 0666);
127+ if (f >= 0) {
128+ if (fchmod(f, 0666) == -1) {
129+ PLOG(ERROR) << "failed to set root state permissions";
130+ }
131+ if (unix_write(f, kNoRootMagic, sizeof(kNoRootMagic) - 1) == -1) {
132+ PLOG(ERROR) << "failed to initialize root state";
133+ }
134+ unix_close(f);
135+ }
136+
137 const bool should_drop_caps = !__android_log_is_debuggable();
138
139 if (should_drop_caps) {
140@@ -182,6 +196,51 @@ static void drop_privileges(int server_port) {
141 }
142 #endif
143
144+#if !defined(__ANDROID__)
145+static bool should_drop_privileges() {
146+ int f = unix_open(kAdbRootStatePath, O_RDONLY | O_CLOEXEC);
147+ if (f < 0) {
148+ return true;
149+ }
150+ char buf[kRootMagicSize];
151+ bool drop = true;
152+ if (unix_read(f, buf, sizeof(buf)) != -1 && !strncmp(buf, kRootMagic, kRootMagicSize)) {
153+ drop = false;
154+ }
155+ unix_close(f);
156+ return drop;
157+}
158+
159+static void drop_privileges(int) {
160+ if (!should_drop_privileges()) {
161+ return;
162+ }
163+ int f = unix_open(kAdbRootStatePath, O_WRONLY | O_CREAT | O_CLOEXEC, 0666);
164+ if (f >= 0) {
165+ if (fchmod(f, 0666) == -1) {
166+ PLOG(ERROR) << "failed to set root state permissions";
167+ }
168+ if (unix_write(f, kNoRootMagic, sizeof(kNoRootMagic) - 1) == -1) {
169+ PLOG(ERROR) << "failed to initialize root state";
170+ }
171+ unix_close(f);
172+ }
173+ passwd* adb_user = getpwnam("adb");
174+ if (adb_user == nullptr) {
175+ PLOG(FATAL) << "getpwnam(adb) failed";
176+ }
177+ if (initgroups(adb_user->pw_name, adb_user->pw_gid) != 0) {
178+ PLOG(FATAL) << "initgroups(adb) failed";
179+ }
180+ if (setgid(adb_user->pw_gid) != 0) {
181+ PLOG(FATAL) << "setgid(adb) failed";
182+ }
183+ if (setuid(adb_user->pw_uid) != 0) {
184+ PLOG(FATAL) << "setuid(adb) failed";
185+ }
186+}
187+#endif
188+
189 static void setup_adb(const std::vector<std::string>& addrs) {
190 #if defined(__ANDROID__)
191 // Get the first valid port from addrs and setup mDNS.
192@@ -242,9 +301,7 @@ int adbd_main(int server_port) {
193 " unchanged.\n");
194 }
195
196-#if defined(__ANDROID__)
197 drop_privileges(server_port);
198-#endif
199
200 #if defined(__ANDROID__)
201 // A thread gets spawned as a side-effect of initializing the watchdog, so it needs to happen
202diff --git a/packages/modules/adb/daemon/restart_service.cpp b/packages/modules/adb/daemon/restart_service.cpp
203index 16d2627..fcba9c8 100644
204--- a/packages/modules/adb/daemon/restart_service.cpp
205+++ b/packages/modules/adb/daemon/restart_service.cpp
206@@ -18,6 +18,9 @@
207
208 #include "sysdeps.h"
209
210+#include <errno.h>
211+#include <fcntl.h>
212+#include <string.h>
213 #include <unistd.h>
214
215 #include <android-base/logging.h>
216@@ -28,6 +31,26 @@
217 #include "adb_io.h"
218 #include "adb_unique_fd.h"
219
220+namespace {
221+constexpr char kAdbRootStatePath[] = "/run/.adb.root";
222+constexpr char kRootMagic[] = "#ROOT#";
223+constexpr char kNoRootMagic[] = "#NOROOT#";
224+constexpr size_t kRootMagicSize = sizeof(kRootMagic) - 1;
225+
226+bool write_root_state(const char* value, size_t size) {
227+ int f = unix_open(kAdbRootStatePath, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, 0666);
228+ if (f < 0) {
229+ return false;
230+ }
231+ bool ok = unix_write(f, value, size) == static_cast<int>(size);
232+ if (ok) {
233+ ok = fsync(f) == 0;
234+ }
235+ unix_close(f);
236+ return ok;
237+}
238+}
239+
240 void restart_root_service(unique_fd fd) {
241 if (getuid() == 0) {
242 WriteFdExactly(fd.get(), "adbd is already running as root\n");
243@@ -38,9 +61,15 @@ void restart_root_service(unique_fd fd) {
244 return;
245 }
246
247- LOG(INFO) << "adbd restarting as root";
248- android::base::SetProperty("service.adb.root", "1");
249- WriteFdExactly(fd.get(), "restarting adbd as root\n");
250+ for (int retry = 5; retry-- > 0;) {
251+ if (write_root_state(kRootMagic, kRootMagicSize)) {
252+ LOG(INFO) << "adbd restarting as root";
253+ WriteFdExactly(fd.get(), "restarting adbd as root\n");
254+ return;
255+ }
256+ usleep(100000);
257+ }
258+ WriteFdExactly(fd.get(), "failed to switch adbd to root\n");
259 }
260
261 void restart_unroot_service(unique_fd fd) {
262@@ -49,8 +78,11 @@ void restart_unroot_service(unique_fd fd) {
263 return;
264 }
265
266+ if (!write_root_state(kNoRootMagic, sizeof(kNoRootMagic) - 1)) {
267+ PLOG(ERROR) << "failed to write root state";
268+ return;
269+ }
270 LOG(INFO) << "adbd restarting as nonroot";
271- android::base::SetProperty("service.adb.root", "0");
272 WriteFdExactly(fd.get(), "restarting adbd as non root\n");
273 }
274
275diff --git a/packages/modules/adb/daemon/restart_service.h b/packages/modules/adb/daemon/restart_service.h
276index 19840bd..2d239db 100644
277--- a/packages/modules/adb/daemon/restart_service.h
278+++ b/packages/modules/adb/daemon/restart_service.h
279@@ -18,7 +18,7 @@
280
281 #include "adb_unique_fd.h"
282
283-#if defined(__ANDROID__)
284+#if !defined(__ANDROID_RECOVERY__)
285 void restart_root_service(unique_fd fd);
286 void restart_unroot_service(unique_fd fd);
287 void restart_tcp_service(unique_fd fd, int port);
288diff --git a/packages/modules/adb/daemon/services.cpp b/packages/modules/adb/daemon/services.cpp
289index 5090441..1b27314 100644
290--- a/packages/modules/adb/daemon/services.cpp
291+++ b/packages/modules/adb/daemon/services.cpp
292@@ -19,12 +19,18 @@
293 #include "sysdeps.h"
294
295 #include <errno.h>
296+#include <fcntl.h>
297+#include <linux/fs.h>
298+#include <linux/reboot.h>
299+#include <mntent.h>
300 #include <netdb.h>
301 #include <netinet/in.h>
302 #include <stddef.h>
303 #include <stdio.h>
304 #include <stdlib.h>
305 #include <string.h>
306+#include <sys/mount.h>
307+#include <sys/syscall.h>
308 #include <sys/ioctl.h>
309 #include <sys/socket.h>
310 #include <sys/un.h>
311@@ -40,7 +46,6 @@
312 #include <android-base/stringprintf.h>
313 #include <android-base/strings.h>
314 #include <android-base/unique_fd.h>
315-#include <cutils/android_reboot.h>
316 #include <cutils/sockets.h>
317 #include <log/log_properties.h>
318
319@@ -143,6 +148,60 @@ static void spin_service(unique_fd fd) {
320 WriteFdExactly(fd.get(), "spinning\n");
321 }
322
323+static std::string find_mount(std::string_view dir) {
324+ std::unique_ptr<FILE, int (*)(FILE*)> fp(setmntent("/proc/mounts", "r"), endmntent);
325+ if (!fp) {
326+ return {};
327+ }
328+ while (mntent* entry = getmntent(fp.get())) {
329+ if (dir == entry->mnt_dir) {
330+ return entry->mnt_fsname;
331+ }
332+ }
333+ return {};
334+}
335+
336+static bool make_block_device_writable(const std::string& dev) {
337+ android::base::unique_fd fd(unix_open(dev.c_str(), O_RDONLY | O_CLOEXEC));
338+ if (fd == -1) {
339+ return false;
340+ }
341+ int off = 0;
342+ return ioctl(fd.get(), BLKROSET, &off) != -1;
343+}
344+
345+static bool remount_partition(unique_fd& fd, std::string_view dir) {
346+ std::string mount_point(dir);
347+ if (!directory_exists(mount_point)) {
348+ return true;
349+ }
350+ std::string dev = find_mount(dir);
351+ if (dev.empty()) {
352+ WriteFdFmt(fd.get(), "remount of %.*s failed; mount not found\n",
353+ static_cast<int>(dir.size()), dir.data());
354+ return false;
355+ }
356+ if (!make_block_device_writable(dev)) {
357+ WriteFdFmt(fd.get(), "remount of %.*s failed; couldn't make block device %s writable: %s\n",
358+ static_cast<int>(dir.size()), dir.data(), dev.c_str(), strerror(errno));
359+ return false;
360+ }
361+ if (mount(dev.c_str(), mount_point.c_str(), "none", MS_REMOUNT, nullptr) == -1) {
362+ WriteFdFmt(fd.get(), "remount of %.*s failed: %s\n", static_cast<int>(dir.size()), dir.data(), strerror(errno));
363+ return false;
364+ }
365+ return true;
366+}
367+
368+static void remount_service(unique_fd fd) {
369+ if (getuid() != 0) {
370+ WriteFdExactly(fd.get(), "Not running as root. Try \"adb root\" first.\n");
371+ return;
372+ }
373+ bool success = remount_partition(fd, "/");
374+ WriteFdExactly(fd.get(), success ? "remount succeeded\n" : "remount failed\n");
375+}
376+
377 [[maybe_unused]] static unique_fd reboot_device(const std::string& name) {
378 #if defined(__ANDROID_RECOVERY__)
379 if (!__android_log_is_debuggable()) {
380@@ -157,10 +216,16 @@ static void spin_service(unique_fd fd) {
381 return create_service_thread("reboot", reboot_service);
382 }
383 #endif
384- // Fall through
385- std::string cmd = "/system/bin/reboot ";
386- cmd += name;
387- return StartSubprocess(cmd, nullptr, SubprocessType::kRaw, SubprocessProtocol::kNone);
388+ auto reboot_service = [name](unique_fd fd) {
389+ sync();
390+ if (syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2,
391+ LINUX_REBOOT_CMD_RESTART2, "adb") != 0) {
392+ WriteFdFmt(fd.get(), "reboot (%s) failed: %s\n", name.c_str(), strerror(errno));
393+ return;
394+ }
395+ while (true) pause();
396+ };
397+ return create_service_thread("reboot", reboot_service);
398 }
399
400 struct ServiceSocket : public asocket {
401@@ -281,13 +346,11 @@ unique_fd daemon_service_to_fd(std::string_view name, atransport* transport) {
402 }
403 #endif
404
405-#if defined(__ANDROID__)
406+#if !defined(__ANDROID_RECOVERY__)
407 if (name.starts_with("framebuffer:")) {
408 return create_service_thread("fb", framebuffer_service);
409 } else if (android::base::ConsumePrefix(&name, "remount:")) {
410- std::string cmd = "/system/bin/remount ";
411- cmd += name;
412- return StartSubprocess(cmd, nullptr, SubprocessType::kRaw, SubprocessProtocol::kNone);
413+ return create_service_thread("remount", remount_service);
414 } else if (android::base::ConsumePrefix(&name, "reboot:")) {
415 return reboot_device(std::string(name));
416 } else if (name.starts_with("root:")) {
417diff --git a/packages/modules/adb/sockets.cpp b/packages/modules/adb/sockets.cpp
418index f766f7e..8aa1e2b 100644
419--- a/packages/modules/adb/sockets.cpp
420+++ b/packages/modules/adb/sockets.cpp
421@@ -337,7 +337,7 @@ static void local_socket_destroy(asocket* s) {
422
423 if (exit_on_close) {
424 D("local_socket_destroy: exiting");
425- exit(0);
426+ exit(exit_on_close - 1);
427 }
428 }
429
430@@ -473,9 +473,21 @@ asocket* create_local_service_socket(std::string_view name, atransport* transpor
431 LOG(VERBOSE) << "LS(" << s->id << "): bound to '" << name << "' via " << fd_value;
432
433 #if !ADB_HOST
434- if ((name.starts_with("root:") && getuid() != 0 && __android_log_is_debuggable()) ||
435- (name.starts_with("unroot:") && getuid() == 0) || name.starts_with("usb:") ||
436- name.starts_with("tcpip:")) {
437+ bool exit_on_close = false;
438+#if defined(__ANDROID__)
439+ exit_on_close = (name.starts_with("root:") && getuid() != 0 &&
440+ __android_log_is_debuggable()) ||
441+ (name.starts_with("unroot:") && getuid() == 0);
442+#else
443+ exit_on_close = (name.starts_with("root:") && getuid() != 0) ||
444+ (name.starts_with("unroot:") && getuid() == 0);
445+#endif
446+ // exit_on_close == 2: exit(1) — triggers Restart=on-failure (root/unroot)
447+ // exit_on_close == 1: exit(0) — clean exit (usb/tcpip)
448+ if (exit_on_close) {
449+ D("LS(%d): enabling exit_on_close", s->id);
450+ s->exit_on_close = 2;
451+ } else if (name.starts_with("usb:") || name.starts_with("tcpip:")) {
452 D("LS(%d): enabling exit_on_close", s->id);
453 s->exit_on_close = 1;
454 }
455diff --git a/packages/modules/adb/transport.cpp b/packages/modules/adb/transport.cpp
456index b99e8bc..b89f495 100644
457--- a/packages/modules/adb/transport.cpp
458+++ b/packages/modules/adb/transport.cpp
459@@ -1200,7 +1200,6 @@ const FeatureSet& supported_features() {
460 kFeatureAbb,
461 kFeatureFixedPushSymlinkTimestamp,
462 kFeatureAbbExec,
463- kFeatureRemountShell,
464 kFeatureTrackApp,
465 kFeatureSendRecv2,
466 kFeatureSendRecv2Brotli,
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0007-libcutils-guard-Android-private-header-with-addition.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0007-libcutils-guard-Android-private-header-with-addition.patch
new file mode 100644
index 0000000000..aa5ffc2825
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0007-libcutils-guard-Android-private-header-with-addition.patch
@@ -0,0 +1,36 @@
1From 35e41ab351e03abcd2709f136c57df7bc4855532 Mon Sep 17 00:00:00 2001
2From: Etienne Cordonnier <ecordonnier@snap.com>
3Date: Wed, 10 Jun 2026 00:00:00 +0000
4Subject: [PATCH] libcutils: guard Android-private header with additional
5 __has_include check
6
7The properties.cpp file uses __has_include(<sys/system_properties.h>) to
8conditionally compile the Android bionic property system implementation.
9However, some Linux host environments (e.g. those with Android SDK headers
10installed in /usr/local/include) have sys/system_properties.h without the
11accompanying private header sys/_system_properties.h.
12
13Guard both the public and private header inclusion to prevent a fatal error
14on such hosts.
15
16Upstream-Status: Inappropriate [OE-specific, guards against host header contamination]
17
18Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
19---
20 system/core/libcutils/properties.cpp | 3 ++-
21 1 file changed, 2 insertions(+), 1 deletion(-)
22
23diff --git a/system/core/libcutils/properties.cpp b/system/core/libcutils/properties.cpp
24index 03f0496..fd0f6c3 100644
25--- a/system/core/libcutils/properties.cpp
26+++ b/system/core/libcutils/properties.cpp
27@@ -91,7 +91,8 @@ int property_get(const char* key, char* value, const char* default_value) {
28 return len;
29 }
30
31-#if __has_include(<sys/system_properties.h>)
32+#if __has_include(<sys/system_properties.h>) && \
33+ __has_include(<sys/_system_properties.h>)
34
35 #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
36 #include <sys/_system_properties.h>
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0008-adb-GCC-compatibility-fixes-for-usb_linux-and-sysdep.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0008-adb-GCC-compatibility-fixes-for-usb_linux-and-sysdep.patch
new file mode 100644
index 0000000000..ae7de97e49
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0008-adb-GCC-compatibility-fixes-for-usb_linux-and-sysdep.patch
@@ -0,0 +1,197 @@
1From 67a400310c07fad8f9ecc0058203942237ab6325 Mon Sep 17 00:00:00 2001
2From: Etienne Cordonnier <ecordonnier@snap.com>
3Date: Wed, 10 Jun 2026 00:00:00 +0000
4Subject: [PATCH] adb: GCC compatibility fixes for usb_linux, sysdeps, and adbd
5
6GCC-specific issues when building adb/adbd with GCC instead of Clang:
7
81. usb_linux.cpp embeds usbdevfs_urb (which ends in a flexible array member
9 iso_frame_desc[]) in a non-last position inside struct usb_handle. GCC
10 rejects this as a hard error. Introduce usbdevfs_urb_bulk, a copy of the
11 struct without the FAM, for use in embedding contexts.
12
132. sysdeps.h uses #define write/pwrite to redirect callers to adb_write/
14 adb_pwrite. GCC's newer abseil in the native sysroot calls ostream::write()
15 which gets incorrectly macro-expanded. Replace the #define redirects with
16 #pragma GCC poison.
17
183. adbd.mk links -lprotobuf but with protobuf 6.x the abseil log helpers are
19 no longer pulled in transitively. Add -labsl_log_internal_message and
20 -labsl_log_internal_check_op explicitly.
21
22Upstream-Status: Inappropriate [OE-specific, GCC compat]
23
24Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
25---
26 debian/system/adb.mk | 2 ++
27 debian/system/adbd.mk | 2 ++
28 packages/modules/adb/client/usb_linux.cpp | 44 ++++++++++++++++-------
29 packages/modules/adb/sysdeps.h | 11 ++----
30 4 files changed, 37 insertions(+), 22 deletions(-)
31
32diff --git a/debian/system/adb.mk b/debian/system/adb.mk
33index 90a816f..6c9b4ce 100644
34--- a/debian/system/adb.mk
35+++ b/debian/system/adb.mk
36@@ -95,6 +95,8 @@ LDFLAGS += \
37 -llog \
38 -llz4 \
39 -lprotobuf \
40+ -labsl_log_internal_message \
41+ -labsl_log_internal_check_op \
42 -lpthread \
43 -l:libssl.so.0 \
44 -lusb-1.0 \
45diff --git a/debian/system/adbd.mk b/debian/system/adbd.mk
46index beb412e..e755f20 100644
47--- a/debian/system/adbd.mk
48+++ b/debian/system/adbd.mk
49@@ -97,6 +97,8 @@ LDFLAGS += \
50 -llog \
51 -llz4 \
52 -lprotobuf \
53+ -labsl_log_internal_message \
54+ -labsl_log_internal_check_op \
55 -lresolv \
56 -l:libssl.so.0 \
57 -lzstd \
58diff --git a/packages/modules/adb/client/usb_linux.cpp b/packages/modules/adb/client/usb_linux.cpp
59index 96d7a8a..ecc1035 100644
60--- a/packages/modules/adb/client/usb_linux.cpp
61+++ b/packages/modules/adb/client/usb_linux.cpp
62@@ -57,6 +57,27 @@ using namespace std::literals;
63 /* usb scan debugging is waaaay too verbose */
64 #define DBGX(x...)
65
66+// usbdevfs_urb embeds a flexible array member iso_frame_desc[]. Embedding this
67+// struct in another struct in a non-last position is a hard GCC error. Since
68+// ADB only uses bulk endpoints (never ISO), define a wrapper type without the
69+// FAM to use for struct embedding.
70+struct usbdevfs_urb_bulk {
71+ unsigned char type;
72+ unsigned char endpoint;
73+ int status;
74+ unsigned int flags;
75+ void* buffer;
76+ int buffer_length;
77+ int actual_length;
78+ int start_frame;
79+ union { int number_of_packets; unsigned int stream_id; };
80+ int error_count;
81+ unsigned int signr;
82+ void* usercontext;
83+};
84+static_assert(sizeof(usbdevfs_urb_bulk) == sizeof(usbdevfs_urb),
85+ "usbdevfs_urb_bulk size mismatch");
86+
87 struct usb_handle {
88 ~usb_handle() {
89 if (fd != -1) unix_close(fd);
90@@ -74,11 +95,8 @@ struct usb_handle {
91 // The usbdevfs_urb structure ends in a variable length array of
92 // usbdevfs_iso_packet_desc. Since none of the usb calls ever attempt
93 // to fill in those values, ignore this warning.
94-#pragma clang diagnostic push
95-#pragma clang diagnostic ignored "-Wgnu-variable-sized-type-not-at-end"
96- usbdevfs_urb urb_in;
97- usbdevfs_urb urb_out;
98-#pragma clang diagnostic pop
99+ usbdevfs_urb_bulk urb_in;
100+ usbdevfs_urb_bulk urb_out;
101
102 bool urb_in_busy = false;
103 bool urb_out_busy = false;
104@@ -316,7 +334,7 @@ static int usb_bulk_write(usb_handle* h, const void* data, int len) {
105 std::unique_lock<std::mutex> lock(h->mutex);
106 D("++ usb_bulk_write ++");
107
108- usbdevfs_urb* urb = &h->urb_out;
109+ usbdevfs_urb_bulk* urb = &h->urb_out;
110 memset(urb, 0, sizeof(*urb));
111 urb->type = USBDEVFS_URB_TYPE_BULK;
112 urb->endpoint = h->ep_out;
113@@ -329,7 +347,7 @@ static int usb_bulk_write(usb_handle* h, const void* data, int len) {
114 return -1;
115 }
116
117- if (TEMP_FAILURE_RETRY(ioctl(h->fd, USBDEVFS_SUBMITURB, urb)) == -1) {
118+ if (TEMP_FAILURE_RETRY(ioctl(h->fd, USBDEVFS_SUBMITURB, reinterpret_cast<usbdevfs_urb*>(urb))) == -1) {
119 return -1;
120 }
121
122@@ -355,7 +373,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
123 std::unique_lock<std::mutex> lock(h->mutex);
124 D("++ usb_bulk_read ++");
125
126- usbdevfs_urb* urb = &h->urb_in;
127+ usbdevfs_urb_bulk* urb = &h->urb_in;
128 memset(urb, 0, sizeof(*urb));
129 urb->type = USBDEVFS_URB_TYPE_BULK;
130 urb->endpoint = h->ep_in;
131@@ -368,7 +386,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
132 return -1;
133 }
134
135- if (TEMP_FAILURE_RETRY(ioctl(h->fd, USBDEVFS_SUBMITURB, urb)) == -1) {
136+ if (TEMP_FAILURE_RETRY(ioctl(h->fd, USBDEVFS_SUBMITURB, reinterpret_cast<usbdevfs_urb*>(urb))) == -1) {
137 return -1;
138 }
139
140@@ -400,7 +418,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
141 }
142 D("[ urb @%p status = %d, actual = %d ]", out, out->status, out->actual_length);
143
144- if (out == &h->urb_in) {
145+ if (out == reinterpret_cast<usbdevfs_urb*>(&h->urb_in)) {
146 D("[ reap urb - IN complete ]");
147 h->urb_in_busy = false;
148 if (urb->status != 0) {
149@@ -409,7 +427,7 @@ static int usb_bulk_read(usb_handle* h, void* data, int len) {
150 }
151 return urb->actual_length;
152 }
153- if (out == &h->urb_out) {
154+ if (out == reinterpret_cast<usbdevfs_urb*>(&h->urb_out)) {
155 D("[ reap urb - OUT compelete ]");
156 h->urb_out_busy = false;
157 h->cv.notify_all();
158@@ -513,8 +531,8 @@ void usb_kick(usb_handle* h) {
159 ** but this ensures that a reader blocked on REAPURB
160 ** will get unblocked
161 */
162- ioctl(h->fd, USBDEVFS_DISCARDURB, &h->urb_in);
163- ioctl(h->fd, USBDEVFS_DISCARDURB, &h->urb_out);
164+ ioctl(h->fd, USBDEVFS_DISCARDURB, reinterpret_cast<usbdevfs_urb*>(&h->urb_in));
165+ ioctl(h->fd, USBDEVFS_DISCARDURB, reinterpret_cast<usbdevfs_urb*>(&h->urb_out));
166 h->urb_in.status = -ENODEV;
167 h->urb_out.status = -ENODEV;
168 h->urb_in_busy = false;
169diff --git a/packages/modules/adb/sysdeps.h b/packages/modules/adb/sysdeps.h
170index 9a99295..b364a47 100644
171--- a/packages/modules/adb/sysdeps.h
172+++ b/packages/modules/adb/sysdeps.h
173@@ -141,11 +141,7 @@ static inline int unix_read(borrowed_fd fd, void* buf, size_t len) {
174 static inline int unix_write(borrowed_fd fd, const void* buf, size_t len) {
175 return write(fd.get(), buf, len);
176 }
177-#undef write
178-#define write ___xxx_write
179-
180-#undef pwrite
181-#define pwrite ___xxx_pwrite
182+// (write and pwrite macros omitted: incompatible with GCC/abseil compat)
183
184 // See the comments for the !defined(_WIN32) version of unix_lseek().
185 static inline int unix_lseek(borrowed_fd fd, int pos, int where) {
186@@ -549,10 +545,7 @@ static inline int adb_pwrite(int fd, const void* buf, size_t len, off64_t offset
187 #endif
188 }
189
190-#undef write
191-#define write ___xxx_write
192-#undef pwrite
193-#define pwrite ___xxx_pwrite
194+// (write and pwrite macros omitted: incompatible with GCC/abseil compat)
195
196 static inline int64_t adb_lseek(borrowed_fd fd, int64_t pos, int where) {
197 #if defined(__APPLE__)
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0009-libbase-include-stdint.h-in-hex.cpp.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0009-libbase-include-stdint.h-in-hex.cpp.patch
new file mode 100644
index 0000000000..179f97363f
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0009-libbase-include-stdint.h-in-hex.cpp.patch
@@ -0,0 +1,26 @@
1From 164b4261fd5abd851a432c7d56280b1b1adc7f2b Mon Sep 17 00:00:00 2001
2From: Etienne Cordonnier <ecordonnier@snap.com>
3Date: Wed, 10 Jun 2026 00:00:00 +0000
4Subject: [PATCH] libbase: include stdint.h in hex.cpp
5
6hex.cpp uses uint8_t but neither the file nor its transitive headers
7always pull in <stdint.h> on every sysroot. Add an explicit include.
8
9Upstream-Status: Inappropriate [OE-specific sysroot compat]
10Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
11---
12 system/libbase/hex.cpp | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/system/libbase/hex.cpp b/system/libbase/hex.cpp
16index a4b7715..857ff29 100644
17--- a/system/libbase/hex.cpp
18+++ b/system/libbase/hex.cpp
19@@ -15,6 +15,7 @@
20 */
21
22 #include "android-base/hex.h"
23+#include <stdint.h>
24
25 #include "android-base/logging.h"
26
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/0010-adbd-make-systemd-sd_notify-conditional-on-HAVE_SYSTEMD.patch b/meta-oe/recipes-devtools/android-tools/android-tools/0010-adbd-make-systemd-sd_notify-conditional-on-HAVE_SYSTEMD.patch
new file mode 100644
index 0000000000..a8c16a41d4
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/0010-adbd-make-systemd-sd_notify-conditional-on-HAVE_SYSTEMD.patch
@@ -0,0 +1,54 @@
1From 8874be8b9a3906c5720d75320b176b51523b6c15 Mon Sep 17 00:00:00 2001
2From: Etienne Cordonnier <ecordonnier@snap.com>
3Date: Fri, 12 Jun 2026 15:54:47 +0200
4Subject: [PATCH] adbd: make systemd sd_notify conditional on HAVE_SYSTEMD
5
6Guard the sd-daemon.h include and sd_notify() call behind HAVE_SYSTEMD
7instead of __linux__, so the feature is opt-in via a recipe PACKAGECONFIG.
8Add a corresponding ifeq block in debian/system/adbd.mk to pass
9-DHAVE_SYSTEMD and -lsystemd only when the flag is set.
10
11Upstream-Status: Inappropriate [OE-specific]
12---
13 debian/system/adbd.mk | 5 +++++
14 packages/modules/adb/daemon/main.cpp | 4 ++--
15 2 files changed, 7 insertions(+), 2 deletions(-)
16
17diff --git a/debian/system/adbd.mk b/debian/system/adbd.mk
18index e755f20..a3f88f1 100644
19--- a/debian/system/adbd.mk
20+++ b/debian/system/adbd.mk
21@@ -104,6 +104,11 @@ LDFLAGS += \
22 -lzstd \
23 -pie \
24
25+ifeq ($(HAVE_SYSTEMD),1)
26+LDFLAGS += -lsystemd
27+CPPFLAGS += -DHAVE_SYSTEMD
28+endif
29+
30 STATIC_LIBS = \
31 debian/out/system/libadb.a \
32 debian/out/system/libcrypto_utils.a \
33diff --git a/packages/modules/adb/daemon/main.cpp b/packages/modules/adb/daemon/main.cpp
34index f177abf..789c25b 100644
35--- a/packages/modules/adb/daemon/main.cpp
36+++ b/packages/modules/adb/daemon/main.cpp
37@@ -49,7 +49,7 @@
38 #include "selinux/android.h"
39 #endif
40
41-#if defined(__linux__)
42+#if defined(HAVE_SYSTEMD)
43 #include <systemd/sd-daemon.h>
44 #endif
45
46@@ -365,7 +365,7 @@ int adbd_main(int server_port) {
47 init_jdwp();
48 D("adbd_main(): post init_jdwp()");
49
50-#if defined(__linux__)
51+#if defined(HAVE_SYSTEMD)
52 sd_notify(1, "READY=1");
53 #endif
54
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/adb.mk b/meta-oe/recipes-devtools/android-tools/android-tools/adb.mk
deleted file mode 100644
index 0687c22c17..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/adb.mk
+++ /dev/null
@@ -1,72 +0,0 @@
1# Makefile for adb
2
3SRCDIR ?= $(S)
4
5VPATH += $(SRCDIR)/system/core/adb
6adb_SRC_FILES += adb.c
7adb_SRC_FILES += console.c
8adb_SRC_FILES += transport.c
9adb_SRC_FILES += transport_local.c
10adb_SRC_FILES += transport_usb.c
11adb_SRC_FILES += commandline.c
12adb_SRC_FILES += adb_client.c
13adb_SRC_FILES += adb_auth_host.c
14adb_SRC_FILES += sockets.c
15adb_SRC_FILES += services.c
16adb_SRC_FILES += file_sync_client.c
17adb_SRC_FILES += get_my_path_linux.c
18adb_SRC_FILES += usb_linux.c
19adb_SRC_FILES += usb_vendors.c
20adb_SRC_FILES += fdevent.c
21adb_OBJS := $(adb_SRC_FILES:.c=.o)
22
23VPATH += $(SRCDIR)/system/core/libcutils
24libcutils_SRC_FILES += atomic.c
25libcutils_SRC_FILES += hashmap.c
26libcutils_SRC_FILES += native_handle.c
27libcutils_SRC_FILES += config_utils.c
28libcutils_SRC_FILES += cpu_info.c
29libcutils_SRC_FILES += load_file.c
30# libcutils_SRC_FILES += open_memstream.c
31# libcutils_SRC_FILES += strdup16to8.c
32# libcutils_SRC_FILES += strdup8to16.c
33# libcutils_SRC_FILES += record_stream.c
34# libcutils_SRC_FILES += process_name.c
35# libcutils_SRC_FILES += threads.c
36# libcutils_SRC_FILES += sched_policy.c
37# libcutils_SRC_FILES += iosched_policy.c
38libcutils_SRC_FILES += str_parms.c
39libcutils_SRC_FILES += fs.c
40libcutils_SRC_FILES += multiuser.c
41libcutils_SRC_FILES += socket_inaddr_any_server.c
42libcutils_SRC_FILES += socket_local_client.c
43libcutils_SRC_FILES += socket_local_server.c
44libcutils_SRC_FILES += socket_loopback_client.c
45libcutils_SRC_FILES += socket_loopback_server.c
46libcutils_SRC_FILES += socket_network_client.c
47libcutils_SRC_FILES += sockets.c
48libcutils_SRC_FILES += ashmem-host.c
49libcutils_SRC_FILES += dlmalloc_stubs.c
50libcutils_OBJS := $(libcutils_SRC_FILES:.c=.o)
51
52CFLAGS += -DANDROID
53CFLAGS += -DWORKAROUND_BUG6558362
54CFLAGS += -DADB_HOST=1
55CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
56CFLAGS += -DANDROID_SMP=0
57CFLAGS += -I$(SRCDIR)/system/core/adb
58CFLAGS += -I$(SRCDIR)/system/core/include
59CFLAGS += -include $(SRCDIR)/build/core/combo/include/arch/$(android_arch)/AndroidConfig.h
60
61LIBS += libcutils.a -lpthread -lcrypto
62
63all: adb
64
65adb: libcutils.a $(adb_OBJS)
66 $(CC) -o $@ $(LDFLAGS) $(adb_OBJS) $(LIBS)
67
68libcutils.a: $(libcutils_OBJS)
69 $(AR) rcs $@ $(libcutils_OBJS)
70
71clean:
72 $(RM) $(adb_OBJS) $(libcutils_OBJS) adb *.a
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/adbd.mk b/meta-oe/recipes-devtools/android-tools/android-tools/adbd.mk
deleted file mode 100644
index 31452ae104..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/adbd.mk
+++ /dev/null
@@ -1,164 +0,0 @@
1# Makefile for adbd
2
3SRCDIR ?= $(S)
4
5VPATH += $(SRCDIR)/system/core/adb
6adbd_SRC_FILES += adb.c
7adbd_SRC_FILES += fdevent.c
8adbd_SRC_FILES += transport.c
9adbd_SRC_FILES += transport_local.c
10adbd_SRC_FILES += transport_usb.c
11adbd_SRC_FILES += adb_auth_client.c
12adbd_SRC_FILES += sockets.c
13adbd_SRC_FILES += services.c
14adbd_SRC_FILES += file_sync_service.c
15adbd_SRC_FILES += jdwp_service.c
16adbd_SRC_FILES += framebuffer_service.c
17adbd_SRC_FILES += remount_service.c
18adbd_SRC_FILES += disable_verity_service.c
19adbd_SRC_FILES += base64.c
20adbd_SRC_FILES += usb_linux_client.c
21adbd_OBJS := $(adbd_SRC_FILES:.c=.o)
22
23VPATH += $(SRCDIR)/system/core/liblog
24liblog_SRC_FILES += logd_write.c
25liblog_SRC_FILES += log_event_write.c
26liblog_SRC_FILES += logprint.c
27liblog_SRC_FILES += event_tag_map.c
28liblog_SRC_FILES += fake_log_device.c
29liblog_OBJS := $(liblog_SRC_FILES:.c=.o)
30
31VPATH += $(SRCDIR)/system/core/fs_mgr
32fs_mgr_SRC_FILES += fs_mgr_fstab.c
33fs_mgr_OBJS := $(fs_mgr_SRC_FILES:.c=.o)
34
35VPATH += $(SRCDIR)/system/core/libcutils
36libcutils_SRC_FILES += atomic.c
37libcutils_SRC_FILES += hashmap.c
38libcutils_SRC_FILES += native_handle.c
39libcutils_SRC_FILES += config_utils.c
40libcutils_SRC_FILES += cpu_info.c
41libcutils_SRC_FILES += load_file.c
42# libcutils_SRC_FILES += open_memstream.c
43# libcutils_SRC_FILES += strdup16to8.c
44# libcutils_SRC_FILES += strdup8to16.c
45# libcutils_SRC_FILES += record_stream.c
46# libcutils_SRC_FILES += process_name.c
47# libcutils_SRC_FILES += threads.c
48# libcutils_SRC_FILES += sched_policy.c
49# libcutils_SRC_FILES += iosched_policy.c
50libcutils_SRC_FILES += str_parms.c
51libcutils_SRC_FILES += fs.c
52libcutils_SRC_FILES += multiuser.c
53libcutils_SRC_FILES += socket_inaddr_any_server.c
54libcutils_SRC_FILES += socket_local_client.c
55libcutils_SRC_FILES += socket_local_server.c
56libcutils_SRC_FILES += socket_loopback_client.c
57libcutils_SRC_FILES += socket_loopback_server.c
58libcutils_SRC_FILES += socket_network_client.c
59libcutils_SRC_FILES += sockets.c
60libcutils_SRC_FILES += ashmem-host.c
61libcutils_SRC_FILES += dlmalloc_stubs.c
62libcutils_SRC_FILES += klog.c
63libcutils_SRC_FILES += properties.c
64libcutils_OBJS := $(libcutils_SRC_FILES:.c=.o)
65
66VPATH += $(SRCDIR)/external/libselinux/src
67libselinux_SRC_FILES += booleans.c
68libselinux_SRC_FILES += canonicalize_context.c
69libselinux_SRC_FILES += disable.c
70libselinux_SRC_FILES += enabled.c
71libselinux_SRC_FILES += fgetfilecon.c
72libselinux_SRC_FILES += fsetfilecon.c
73libselinux_SRC_FILES += getenforce.c
74libselinux_SRC_FILES += getfilecon.c
75libselinux_SRC_FILES += getpeercon.c
76libselinux_SRC_FILES += lgetfilecon.c
77libselinux_SRC_FILES += load_policy.c
78libselinux_SRC_FILES += lsetfilecon.c
79libselinux_SRC_FILES += policyvers.c
80libselinux_SRC_FILES += procattr.c
81libselinux_SRC_FILES += setenforce.c
82libselinux_SRC_FILES += setfilecon.c
83libselinux_SRC_FILES += context.c
84libselinux_SRC_FILES += mapping.c
85libselinux_SRC_FILES += stringrep.c
86libselinux_SRC_FILES += compute_create.c
87libselinux_SRC_FILES += compute_av.c
88libselinux_SRC_FILES += avc.c
89libselinux_SRC_FILES += avc_internal.c
90libselinux_SRC_FILES += avc_sidtab.c
91libselinux_SRC_FILES += get_initial_context.c
92libselinux_SRC_FILES += checkAccess.c
93libselinux_SRC_FILES += sestatus.c
94libselinux_SRC_FILES += deny_unknown.c
95
96libselinux_SRC_FILES += callbacks.c
97libselinux_SRC_FILES += check_context.c
98libselinux_SRC_FILES += freecon.c
99libselinux_SRC_FILES += init.c
100libselinux_SRC_FILES += label.c
101libselinux_SRC_FILES += label_file.c
102libselinux_SRC_FILES += label_android_property.c
103libselinux_OBJS := $(libselinux_SRC_FILES:.c=.o)
104
105VPATH += $(SRCDIR)/system/extras/ext4_utils
106libext4_utils_SRC_FILES += make_ext4fs.c
107libext4_utils_SRC_FILES += ext4fixup.c
108libext4_utils_SRC_FILES += ext4_utils.c
109libext4_utils_SRC_FILES += allocate.c
110libext4_utils_SRC_FILES += contents.c
111libext4_utils_SRC_FILES += extent.c
112libext4_utils_SRC_FILES += indirect.c
113libext4_utils_SRC_FILES += uuid.c
114libext4_utils_SRC_FILES += sha1.c
115libext4_utils_SRC_FILES += wipe.c
116libext4_utils_SRC_FILES += crc16.c
117libext4_utils_SRC_FILES += ext4_sb.c
118libext4_utils_OBJS := $(libext4_utils_SRC_FILES:.c=.o)
119
120CFLAGS += -std=gnu11
121CFLAGS += -DANDROID
122CFLAGS += -DADB_HOST=0
123CFLAGS += -D_XOPEN_SOURCE -D_GNU_SOURCE
124CFLAGS += -DALLOW_ADBD_ROOT=1
125CFLAGS += -DALLOW_ADBD_DISABLE_VERITY=1
126CFLAGS += -DPROP_NAME_MAX=32
127CFLAGS += -DPROP_VALUE_MAX=92
128CFLAGS += -DAUDITD_LOG_TAG=1003
129# CFLAGS += -DHOST
130CFLAGS += -DANDROID_SMP=0
131CFLAGS += -I$(SRCDIR)/system/core/adb
132CFLAGS += -I$(SRCDIR)/system/core/include
133CFLAGS += -I$(SRCDIR)/system/core/libsparse/include
134CFLAGS += -I$(SRCDIR)/system/extras/ext4_utils
135CFLAGS += -I$(SRCDIR)/system/core/fs_mgr/include
136CFLAGS += -I$(SRCDIR)/hardware/libhardware/include
137CFLAGS += -I$(SRCDIR)/external/libselinux/include
138CFLAGS += -include $(SRCDIR)/build/core/combo/include/arch/$(android_arch)/AndroidConfig.h
139
140LIBS += liblog.a libfs_mgr.a libcutils.a libselinux.a libext4_utils.a -lpthread -lbsd -lpcre -lresolv -lcrypto
141
142all: adbd
143
144adbd: liblog.a libfs_mgr.a libcutils.a libselinux.a libext4_utils.a $(adbd_OBJS)
145 $(CC) -o $@ $(LDFLAGS) $(adbd_OBJS) $(LIBS)
146
147liblog.a: $(liblog_OBJS)
148 $(AR) rcs $@ $(liblog_OBJS)
149
150libfs_mgr.a: $(fs_mgr_OBJS)
151 $(AR) rcs $@ $(fs_mgr_OBJS)
152
153libcutils.a: $(libcutils_OBJS)
154 $(AR) rcs $@ $(libcutils_OBJS)
155
156libselinux.a: $(libselinux_OBJS)
157 export CFLAGS="-DANDROID -DHOST"
158 $(AR) rcs $@ $(libselinux_OBJS)
159
160libext4_utils.a: $(libext4_utils_OBJS)
161 $(AR) rcs $@ $(libext4_utils_OBJS)
162
163clean:
164 $(RM) *.o *.a adbd
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service
index b6661f2e39..7c16b5cea2 100644
--- a/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/android-tools-adbd.service
@@ -4,7 +4,7 @@ ConditionPathExists=/etc/usb-debugging-enabled
4Before=android-system.service 4Before=android-system.service
5 5
6[Service] 6[Service]
7Type=simple 7Type=notify
8Restart=on-failure 8Restart=on-failure
9ExecStartPre=-/usr/bin/android-gadget-setup adb 9ExecStartPre=-/usr/bin/android-gadget-setup adb
10ExecStart=/usr/bin/adbd 10ExecStart=/usr/bin/adbd
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch b/meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch
deleted file mode 100644
index c091fd404b..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/build/0001-Riscv-Add-risc-v-Android-config-header.patch
+++ /dev/null
@@ -1,361 +0,0 @@
1From 82dce13ea7b5b31c63851bd67f66072413917e73 Mon Sep 17 00:00:00 2001
2From: Chenxi Mao <maochenxi@eswin.com>
3Date: Mon, 20 Apr 2020 15:32:40 +0800
4Subject: [PATCH 1/1] Riscv: Add risc-v Android config header
5
6---
7Upstream-Status: Pending
8
9 .../arch/linux-riscv64/AndroidConfig.h | 340 ++++++++++++++++++
10 1 file changed, 340 insertions(+)
11 create mode 100644 core/combo/include/arch/linux-riscv64/AndroidConfig.h
12
13diff --git a/core/combo/include/arch/linux-riscv64/AndroidConfig.h b/core/combo/include/arch/linux-riscv64/AndroidConfig.h
14new file mode 100644
15index 0000000000..bcbda8f87f
16--- /dev/null
17+++ b/core/combo/include/arch/linux-riscv64/AndroidConfig.h
18@@ -0,0 +1,340 @@
19+/*
20+ * Copyright (C) 2013 The Android Open Source Project
21+ *
22+ * Licensed under the Apache License, Version 2.0 (the "License");
23+ * you may not use this file except in compliance with the License.
24+ * You may obtain a copy of the License at
25+ *
26+ * http://www.apache.org/licenses/LICENSE-2.0
27+ *
28+ * Unless required by applicable law or agreed to in writing, software
29+ * distributed under the License is distributed on an "AS IS" BASIS,
30+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31+ * See the License for the specific language governing permissions and
32+ * limitations under the License.
33+ */
34+
35+/*
36+ * Android config -- "android-aarch64". Used for ARM aarch64 device builds.
37+ */
38+#ifndef _ANDROID_CONFIG_H
39+#define _ANDROID_CONFIG_H
40+
41+/*
42+ * ===========================================================================
43+ * !!! IMPORTANT !!!
44+ * ===========================================================================
45+ *
46+ * This file is included by ALL C/C++ source files. Don't put anything in
47+ * here unless you are absolutely certain it can't go anywhere else.
48+ *
49+ * Any C++ stuff must be wrapped with "#ifdef __cplusplus". Do not use "//"
50+ * comments.
51+ */
52+
53+/*
54+ * Threading model. Choose one:
55+ *
56+ * HAVE_PTHREADS - use the pthreads library.
57+ * HAVE_WIN32_THREADS - use Win32 thread primitives.
58+ * -- combine HAVE_CREATETHREAD, HAVE_CREATEMUTEX, and HAVE__BEGINTHREADEX
59+ */
60+#define HAVE_PTHREADS
61+
62+/*
63+ * Do we have pthread_setname_np()?
64+ *
65+ * (HAVE_PTHREAD_SETNAME_NP is used by WebKit to enable a function with
66+ * the same name but different parameters, so we can't use that here.)
67+ */
68+#define HAVE_ANDROID_PTHREAD_SETNAME_NP
69+
70+/*
71+ * Do we have the futex syscall?
72+ */
73+#define HAVE_FUTEX
74+
75+/*
76+ * Process creation model. Choose one:
77+ *
78+ * HAVE_FORKEXEC - use fork() and exec()
79+ * HAVE_WIN32_PROC - use CreateProcess()
80+ */
81+#define HAVE_FORKEXEC
82+
83+/*
84+ * Process out-of-memory adjustment. Set if running on Linux,
85+ * where we can write to /proc/<pid>/oom_adj to modify the out-of-memory
86+ * badness adjustment.
87+ */
88+#define HAVE_OOM_ADJ
89+
90+/*
91+ * IPC model. Choose one:
92+ *
93+ * HAVE_SYSV_IPC - use the classic SysV IPC mechanisms (semget, shmget).
94+ * HAVE_MACOSX_IPC - use Macintosh IPC mechanisms (sem_open, mmap).
95+ * HAVE_WIN32_IPC - use Win32 IPC (CreateSemaphore, CreateFileMapping).
96+ * HAVE_ANDROID_IPC - use Android versions (?, mmap).
97+ */
98+#define HAVE_ANDROID_IPC
99+
100+/*
101+ * Memory-mapping model. Choose one:
102+ *
103+ * HAVE_POSIX_FILEMAP - use the Posix sys/mmap.h
104+ * HAVE_WIN32_FILEMAP - use Win32 filemaps
105+ */
106+#define HAVE_POSIX_FILEMAP
107+
108+/*
109+ * Define this if you have <termio.h>
110+ */
111+#define HAVE_TERMIO_H 1
112+
113+/*
114+ * Define this if you have <sys/sendfile.h>
115+ */
116+#define HAVE_SYS_SENDFILE_H 1
117+
118+/*
119+ * Define this if you build against MSVCRT.DLL
120+ */
121+/* #define HAVE_MS_C_RUNTIME */
122+
123+/*
124+ * Define this if you have sys/uio.h
125+ */
126+#define HAVE_SYS_UIO_H 1
127+
128+/*
129+ * Define this if your platforms implements symbolic links
130+ * in its filesystems
131+ */
132+#define HAVE_SYMLINKS
133+
134+/*
135+ * Define this if we have localtime_r().
136+ */
137+/* #define HAVE_LOCALTIME_R 1 */
138+
139+/*
140+ * Define this if we have gethostbyname_r().
141+ */
142+/* #define HAVE_GETHOSTBYNAME_R */
143+
144+/*
145+ * Define this if we have ioctl().
146+ */
147+#define HAVE_IOCTL
148+
149+/*
150+ * Define this if we want to use WinSock.
151+ */
152+/* #define HAVE_WINSOCK */
153+
154+/*
155+ * Define this if have clock_gettime() and friends
156+ */
157+#define HAVE_POSIX_CLOCKS
158+
159+/*
160+ * Define this if we have linux style epoll()
161+ */
162+#define HAVE_EPOLL
163+
164+/*
165+ * Endianness of the target machine. Choose one:
166+ *
167+ * HAVE_ENDIAN_H -- have endian.h header we can include.
168+ * HAVE_LITTLE_ENDIAN -- we are little endian.
169+ * HAVE_BIG_ENDIAN -- we are big endian.
170+ */
171+#define HAVE_ENDIAN_H
172+#define HAVE_LITTLE_ENDIAN
173+
174+#define _FILE_OFFSET_BITS 64
175+/* #define _LARGEFILE_SOURCE 1 */
176+
177+/*
178+ * Define if platform has off64_t (and lseek64 and other xxx64 functions)
179+ */
180+#define HAVE_OFF64_T
181+
182+/*
183+ * Defined if we have the backtrace() call for retrieving a stack trace.
184+ * Needed for CallStack to operate; if not defined, CallStack is
185+ * non-functional.
186+ */
187+#define HAVE_BACKTRACE 0
188+
189+/*
190+ * Defined if we have the cxxabi.h header for demangling C++ symbols. If
191+ * not defined, stack crawls will be displayed with raw mangled symbols
192+ */
193+#define HAVE_CXXABI 0
194+
195+/*
196+ * Defined if we have the gettid() system call.
197+ */
198+#define HAVE_GETTID
199+
200+/*
201+ * Defined if we have the sched_setscheduler() call
202+ */
203+#define HAVE_SCHED_SETSCHEDULER
204+
205+/*
206+ * Add any extra platform-specific defines here.
207+ */
208+#ifndef __linux__
209+#define __linux__
210+#endif
211+
212+/*
213+ * Define if we have <malloc.h> header
214+ */
215+#define HAVE_MALLOC_H
216+
217+/*
218+ * Define if we're running on *our* linux on device or emulator.
219+ */
220+#define HAVE_ANDROID_OS 1
221+
222+/*
223+ * Define if we have Linux-style non-filesystem Unix Domain Sockets
224+ */
225+#define HAVE_LINUX_LOCAL_SOCKET_NAMESPACE 1
226+
227+/*
228+ * Define if we have Linux's inotify in <sys/inotify.h>.
229+ */
230+#define HAVE_INOTIFY 1
231+
232+/*
233+ * Define if we have madvise() in <sys/mman.h>
234+ */
235+#define HAVE_MADVISE 1
236+
237+/*
238+ * Define if tm struct has tm_gmtoff field
239+ */
240+#define HAVE_TM_GMTOFF 1
241+
242+/*
243+ * Define if dirent struct has d_type field
244+ */
245+#define HAVE_DIRENT_D_TYPE 1
246+
247+/*
248+ * Define if libc includes Android system properties implementation.
249+ */
250+#define HAVE_LIBC_SYSTEM_PROPERTIES 1
251+
252+/*
253+ * Define if system provides a system property server (should be
254+ * mutually exclusive with HAVE_LIBC_SYSTEM_PROPERTIES).
255+ */
256+/* #define HAVE_SYSTEM_PROPERTY_SERVER */
257+
258+/*
259+ * What CPU architecture does this platform use?
260+ */
261+#define ARCH_AARCH64
262+
263+/*
264+ * Define if the size of enums is as short as possible,
265+ */
266+/* #define HAVE_SHORT_ENUMS */
267+
268+/*
269+ * sprintf() format string for shared library naming.
270+ */
271+#define OS_SHARED_LIB_FORMAT_STR "lib%s.so"
272+
273+/*
274+ * type for the third argument to mincore().
275+ */
276+#define MINCORE_POINTER_TYPE unsigned char *
277+
278+/*
279+ * The default path separator for the platform
280+ */
281+#define OS_PATH_SEPARATOR '/'
282+
283+/*
284+ * Is the filesystem case sensitive?
285+ */
286+#define OS_CASE_SENSITIVE
287+
288+/*
289+ * Define if <sys/socket.h> exists.
290+ */
291+#define HAVE_SYS_SOCKET_H 1
292+
293+/*
294+ * Define if the strlcpy() function exists on the system.
295+ */
296+#define HAVE_STRLCPY 1
297+
298+/*
299+ * Define if the open_memstream() function exists on the system.
300+ */
301+/* #define HAVE_OPEN_MEMSTREAM 1 */
302+
303+/*
304+ * Define if the BSD funopen() function exists on the system.
305+ */
306+#define HAVE_FUNOPEN 1
307+
308+/*
309+ * Define if prctl() exists
310+ */
311+#define HAVE_PRCTL 1
312+
313+/*
314+ * Define if writev() exists
315+ */
316+#define HAVE_WRITEV 1
317+
318+/*
319+ * Define if <stdint.h> exists.
320+ */
321+#define HAVE_STDINT_H 1
322+
323+/*
324+ * Define if <stdbool.h> exists.
325+ */
326+#define HAVE_STDBOOL_H 1
327+
328+/*
329+ * Define if <sched.h> exists.
330+ */
331+#define HAVE_SCHED_H 1
332+
333+/*
334+ * Define if pread() exists
335+ */
336+#define HAVE_PREAD 1
337+
338+/*
339+ * Define if we have st_mtim in struct stat
340+ */
341+#define HAVE_STAT_ST_MTIM 1
342+
343+/*
344+ * Define if printf() supports %zd for size_t arguments
345+ */
346+#define HAVE_PRINTF_ZD 1
347+
348+/*
349+ * Define to 1 if <stdlib.h> provides qsort_r() with a BSD style function prototype.
350+ */
351+#define HAVE_BSD_QSORT_R 0
352+
353+/*
354+ * Define to 1 if <stdlib.h> provides qsort_r() with a GNU style function prototype.
355+ */
356+#define HAVE_GNU_QSORT_R 0
357+
358+#endif /* _ANDROID_CONFIG_H */
359--
3602.17.1
361
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-adb-remove-selinux-extensions.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-adb-remove-selinux-extensions.patch
deleted file mode 100644
index 7d20c50680..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-adb-remove-selinux-extensions.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 7b7200727413ca4a9bb132221c543ec033dffafa Mon Sep 17 00:00:00 2001
2From: Sergio Schvezov <sergio.schvezov@canonical.com>
3Date: Wed, 7 Sep 2016 12:58:47 +0300
4Subject: [PATCH] adb: remove selinux extensions
5
6* drop useless includes of Android SELINUX extensions
7* avoids having to clone another module
8* this should be sent upstream
9
10Upstream-Status: Inappropriate
11
12Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
13---
14 adb/file_sync_service.c | 3 ---
15 1 file changed, 3 deletions(-)
16
17diff --git a/adb/file_sync_service.c b/adb/file_sync_service.c
18index 7933858516..3cbd0cd863 100644
19--- a/adb/file_sync_service.c
20+++ b/adb/file_sync_service.c
21@@ -26,7 +26,6 @@
22
23 #include <errno.h>
24 #include <private/android_filesystem_config.h>
25-#include <selinux/android.h>
26 #include "sysdeps.h"
27
28 #define TRACE_TAG TRACE_SYNC
29@@ -73,7 +72,6 @@ static int mkdirs(char *name)
30 *x = '/';
31 return ret;
32 }
33- selinux_android_restorecon(name, 0);
34 }
35 *x++ = '/';
36 }
37@@ -251,7 +249,6 @@ static int handle_send_file(int s, char *path, uid_t uid,
38 if(fd >= 0) {
39 struct utimbuf u;
40 adb_close(fd);
41- selinux_android_restorecon(path, 0);
42 u.actime = timestamp;
43 u.modtime = timestamp;
44 utime(path, &u);
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch
deleted file mode 100644
index 82e97152be..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From db3a3714be07c8ab51b9ae7b035e4afe9f39c645 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 7 Sep 2022 13:20:22 -0700
4Subject: [PATCH] memory.h: Always define strlcpy for glibc based systems
5
6android-config.h file includes on compiler cmdline sets HAVE_STRLCPY
7unconditionally, since bionic supports it, its no big deal on android
8and also no problem when using musl since implementation exists for musl
9too, but glibc does not provide this. So either we include libbsd or use
10the implementation provided by android-tools here. We are currently
11using the in tree implementation for systems which do not provide it
12
13Upstream-Status: Pending
14
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 include/cutils/memory.h | 2 +-
18 1 file changed, 1 insertion(+), 1 deletion(-)
19
20diff --git a/include/cutils/memory.h b/include/cutils/memory.h
21index e725cdd032..9e99353c58 100644
22--- a/include/cutils/memory.h
23+++ b/include/cutils/memory.h
24@@ -30,7 +30,7 @@ void android_memset16(uint16_t* dst, uint16_t value, size_t size);
25 /* size is given in bytes and must be multiple of 4 */
26 void android_memset32(uint32_t* dst, uint32_t value, size_t size);
27
28-#if !HAVE_STRLCPY
29+#if !HAVE_STRLCPY || defined(__GLIBC__)
30 /* Declaration of strlcpy() for platforms that don't already have it. */
31 size_t strlcpy(char *dst, const char *src, size_t size);
32 #endif
33--
342.37.3
35
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0002-adb-Use-local-sockets-where-appropriate.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0002-adb-Use-local-sockets-where-appropriate.patch
deleted file mode 100644
index 3627110ad8..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0002-adb-Use-local-sockets-where-appropriate.patch
+++ /dev/null
@@ -1,70 +0,0 @@
1From d855f042ca09a358cebe2d3c1d29d512afd7ebb8 Mon Sep 17 00:00:00 2001
2From: Hilko Bengen <bengen@debian.org>
3Date: Wed, 7 Sep 2016 12:58:47 +0300
4Subject: [PATCH] adb: Use local sockets where appropriate
5
6Upstream-Status: Inappropriate
7---
8 adb/adb.c | 6 +++++-
9 adb/adb_client.c | 5 +++--
10 adb/transport_local.c | 3 ++-
11 3 files changed, 10 insertions(+), 4 deletions(-)
12
13diff --git a/adb/adb.c b/adb/adb.c
14index 10a1e0da26..027edd9359 100644
15--- a/adb/adb.c
16+++ b/adb/adb.c
17@@ -1230,7 +1230,11 @@ int launch_server(int server_port)
18 */
19 void build_local_name(char* target_str, size_t target_size, int server_port)
20 {
21- snprintf(target_str, target_size, "tcp:%d", server_port);
22+ if (gListenAll > 0) {
23+ snprintf(target_str, target_size, "tcp:%d", server_port);
24+ } else {
25+ snprintf(target_str, target_size, "local:%d", server_port);
26+ }
27 }
28
29 #if !ADB_HOST
30diff --git a/adb/adb_client.c b/adb/adb_client.c
31index eb1720d22c..a383faefe3 100644
32--- a/adb/adb_client.c
33+++ b/adb/adb_client.c
34@@ -185,12 +185,12 @@ int _adb_connect(const char *service)
35 strcpy(__adb_error, "service name too long");
36 return -1;
37 }
38- snprintf(tmp, sizeof tmp, "%04x", len);
39+ snprintf(tmp, sizeof tmp, "%d", __adb_server_port);
40
41 if (__adb_server_name)
42 fd = socket_network_client(__adb_server_name, __adb_server_port, SOCK_STREAM);
43 else
44- fd = socket_loopback_client(__adb_server_port, SOCK_STREAM);
45+ fd = socket_local_client(tmp, ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM);
46
47 if(fd < 0) {
48 strcpy(__adb_error, "cannot connect to daemon");
49@@ -201,6 +201,7 @@ int _adb_connect(const char *service)
50 return -1;
51 }
52
53+ snprintf(tmp, sizeof tmp, "%04x", len);
54 if(writex(fd, tmp, 4) || writex(fd, service, len)) {
55 strcpy(__adb_error, "write failure during connection");
56 adb_close(fd);
57diff --git a/adb/transport_local.c b/adb/transport_local.c
58index 948cc15812..71582a8c88 100644
59--- a/adb/transport_local.c
60+++ b/adb/transport_local.c
61@@ -121,7 +121,8 @@ int local_connect_arbitrary_ports(int console_port, int adb_port)
62 }
63 #endif
64 if (fd < 0) {
65- fd = socket_loopback_client(adb_port, SOCK_STREAM);
66+ snprintf(buf, sizeof buf, "%d", adb_port);
67+ fd = socket_local_client(buf, ANDROID_SOCKET_NAMESPACE_ABSTRACT, SOCK_STREAM);
68 }
69
70 if (fd >= 0) {
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0003-adb-define-shell-command.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0003-adb-define-shell-command.patch
deleted file mode 100644
index cf1d9cbc3d..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0003-adb-define-shell-command.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1From 4421c2e19946dcd651fd8ac022b96627fc526149 Mon Sep 17 00:00:00 2001
2From: Fathi Boudra <fabo@debian.org>
3Date: Wed, 7 Sep 2016 12:58:47 +0300
4Subject: [PATCH] adb: define shell command
5
6we intend to run on Linux system so the shell is always /bin/sh,
7for the host or the target.
8
9Upstream-Status: Inappropriate
10---
11 adb/services.c | 4 ----
12 1 file changed, 4 deletions(-)
13
14diff --git a/adb/services.c b/adb/services.c
15index 21b08dc201..d44b0c5068 100644
16--- a/adb/services.c
17+++ b/adb/services.c
18@@ -299,11 +299,7 @@ static int create_subproc_raw(const char *cmd, const char *arg0, const char *arg
19 }
20 #endif /* !ABD_HOST */
21
22-#if ADB_HOST
23 #define SHELL_COMMAND "/bin/sh"
24-#else
25-#define SHELL_COMMAND "/system/bin/sh"
26-#endif
27
28 #if !ADB_HOST
29 static void subproc_waiter_service(int fd, void *cookie)
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0004-adb-Fix-build-on-big-endian-systems.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0004-adb-Fix-build-on-big-endian-systems.patch
deleted file mode 100644
index 7f03cd2beb..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0004-adb-Fix-build-on-big-endian-systems.patch
+++ /dev/null
@@ -1,47 +0,0 @@
1From 548b8ca62c64a16305929e2eaf3d546d48de9c25 Mon Sep 17 00:00:00 2001
2From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3Date: Tue, 21 Feb 2017 19:46:24 +0100
4Subject: [PATCH] adb: Fix build on big endian systems
5
6The usb_linux_client.c file defines cpu_to_le16/32 by using the C
7library htole16/32 function calls. However, cpu_to_le16/32 are used
8when initializing structures, i.e in a context where a function call
9is not allowed.
10
11It works fine on little endian systems because htole16/32 are defined
12by the C library as no-ops. But on big-endian systems, they are
13actually doing something, which might involve calling a function,
14causing build failures.
15
16To solve this, we simply open-code cpu_to_le16/32 in a way that allows
17them to be used when initializing structures.
18
19Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
20---
21Upstream-Status: Pending
22
23 adb/usb_linux_client.c | 11 +++++++++--
24 1 file changed, 9 insertions(+), 2 deletions(-)
25
26diff --git a/adb/usb_linux_client.c b/adb/usb_linux_client.c
27index 8426e0ea14..6e8b5bbbd2 100644
28--- a/adb/usb_linux_client.c
29+++ b/adb/usb_linux_client.c
30@@ -34,8 +34,15 @@
31 #define MAX_PACKET_SIZE_FS 64
32 #define MAX_PACKET_SIZE_HS 512
33
34-#define cpu_to_le16(x) htole16(x)
35-#define cpu_to_le32(x) htole32(x)
36+#if __BYTE_ORDER == __LITTLE_ENDIAN
37+# define cpu_to_le16(x) (x)
38+# define cpu_to_le32(x) (x)
39+#else
40+# define cpu_to_le16(x) ((((x) >> 8) & 0xffu) | (((x) & 0xffu) << 8))
41+# define cpu_to_le32(x) \
42+ ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | \
43+ (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
44+#endif
45
46 struct usb_handle
47 {
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0005-adb-add-base64-implementation.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0005-adb-add-base64-implementation.patch
deleted file mode 100644
index 4827ffe042..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0005-adb-add-base64-implementation.patch
+++ /dev/null
@@ -1,350 +0,0 @@
1From 753bcb5971401b82fb2e6197d31c9e386f6d0392 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 15 Sep 2017 15:46:38 -0700
4Subject: [PATCH] adb: add base64 implementation
5
6musl needs it
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Pending
11
12 adb/adb_auth_client.c | 2 +-
13 adb/base64.c | 315 ++++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 316 insertions(+), 1 deletion(-)
15 create mode 100644 adb/base64.c
16
17diff --git a/adb/adb_auth_client.c b/adb/adb_auth_client.c
18index 55e9dcad19..104b413b8b 100644
19--- a/adb/adb_auth_client.c
20+++ b/adb/adb_auth_client.c
21@@ -75,7 +75,7 @@ static void read_keys(const char *file, struct listnode *list)
22 if (sep)
23 *sep = '\0';
24
25- ret = __b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
26+ ret = b64_pton(buf, (u_char *)&key->key, sizeof(key->key) + 4);
27 if (ret != sizeof(key->key)) {
28 D("%s: Invalid base64 data ret=%d\n", file, ret);
29 free(key);
30diff --git a/adb/base64.c b/adb/base64.c
31new file mode 100644
32index 0000000000..95da284d0d
33--- /dev/null
34+++ b/adb/base64.c
35@@ -0,0 +1,315 @@
36+/*
37+ * Copyright (c) 1996-1999 by Internet Software Consortium.
38+ *
39+ * Permission to use, copy, modify, and distribute this software for any
40+ * purpose with or without fee is hereby granted, provided that the above
41+ * copyright notice and this permission notice appear in all copies.
42+ *
43+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
44+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
45+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
46+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
47+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
48+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
49+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
50+ * SOFTWARE.
51+ */
52+
53+/*
54+ * Portions Copyright (c) 1995 by International Business Machines, Inc.
55+ *
56+ * International Business Machines, Inc. (hereinafter called IBM) grants
57+ * permission under its copyrights to use, copy, modify, and distribute this
58+ * Software with or without fee, provided that the above copyright notice and
59+ * all paragraphs of this notice appear in all copies, and that the name of IBM
60+ * not be used in connection with the marketing of any product incorporating
61+ * the Software or modifications thereof, without specific, written prior
62+ * permission.
63+ *
64+ * To the extent it has a right to do so, IBM grants an immunity from suit
65+ * under its patents, if any, for the use, sale or manufacture of products to
66+ * the extent that such products are used for performing Domain Name System
67+ * dynamic updates in TCP/IP networks by means of the Software. No immunity is
68+ * granted for any product per se or for any other function of any product.
69+ *
70+ * THE SOFTWARE IS PROVIDED "AS IS", AND IBM DISCLAIMS ALL WARRANTIES,
71+ * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
72+ * PARTICULAR PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL,
73+ * DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER ARISING
74+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE, EVEN
75+ * IF IBM IS APPRISED OF THE POSSIBILITY OF SUCH DAMAGES.
76+ */
77+
78+#if !defined(LINT) && !defined(CODECENTER)
79+static const char rcsid[] = "$BINDId: base64.c,v 8.7 1999/10/13 16:39:33 vixie Exp $";
80+#endif /* not lint */
81+
82+#include <sys/types.h>
83+#include <sys/param.h>
84+#include <sys/socket.h>
85+
86+#include <netinet/in.h>
87+#include <arpa/inet.h>
88+#include <arpa/nameser.h>
89+
90+#include <ctype.h>
91+#include <resolv.h>
92+#include <stdio.h>
93+#include <stdlib.h>
94+#include <stdint.h>
95+#include <string.h>
96+
97+#define Assert(Cond) if (!(Cond)) abort()
98+
99+static const char Base64[] =
100+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
101+static const char Pad64 = '=';
102+
103+/* (From RFC1521 and draft-ietf-dnssec-secext-03.txt)
104+ The following encoding technique is taken from RFC 1521 by Borenstein
105+ and Freed. It is reproduced here in a slightly edited form for
106+ convenience.
107+
108+ A 65-character subset of US-ASCII is used, enabling 6 bits to be
109+ represented per printable character. (The extra 65th character, "=",
110+ is used to signify a special processing function.)
111+
112+ The encoding process represents 24-bit groups of input bits as output
113+ strings of 4 encoded characters. Proceeding from left to right, a
114+ 24-bit input group is formed by concatenating 3 8-bit input groups.
115+ These 24 bits are then treated as 4 concatenated 6-bit groups, each
116+ of which is translated into a single digit in the base64 alphabet.
117+
118+ Each 6-bit group is used as an index into an array of 64 printable
119+ characters. The character referenced by the index is placed in the
120+ output string.
121+
122+ Table 1: The Base64 Alphabet
123+
124+ Value Encoding Value Encoding Value Encoding Value Encoding
125+ 0 A 17 R 34 i 51 z
126+ 1 B 18 S 35 j 52 0
127+ 2 C 19 T 36 k 53 1
128+ 3 D 20 U 37 l 54 2
129+ 4 E 21 V 38 m 55 3
130+ 5 F 22 W 39 n 56 4
131+ 6 G 23 X 40 o 57 5
132+ 7 H 24 Y 41 p 58 6
133+ 8 I 25 Z 42 q 59 7
134+ 9 J 26 a 43 r 60 8
135+ 10 K 27 b 44 s 61 9
136+ 11 L 28 c 45 t 62 +
137+ 12 M 29 d 46 u 63 /
138+ 13 N 30 e 47 v
139+ 14 O 31 f 48 w (pad) =
140+ 15 P 32 g 49 x
141+ 16 Q 33 h 50 y
142+
143+ Special processing is performed if fewer than 24 bits are available
144+ at the end of the data being encoded. A full encoding quantum is
145+ always completed at the end of a quantity. When fewer than 24 input
146+ bits are available in an input group, zero bits are added (on the
147+ right) to form an integral number of 6-bit groups. Padding at the
148+ end of the data is performed using the '=' character.
149+
150+ Since all base64 input is an integral number of octets, only the
151+ -------------------------------------------------
152+ following cases can arise:
153+
154+ (1) the final quantum of encoding input is an integral
155+ multiple of 24 bits; here, the final unit of encoded
156+ output will be an integral multiple of 4 characters
157+ with no "=" padding,
158+ (2) the final quantum of encoding input is exactly 8 bits;
159+ here, the final unit of encoded output will be two
160+ characters followed by two "=" padding characters, or
161+ (3) the final quantum of encoding input is exactly 16 bits;
162+ here, the final unit of encoded output will be three
163+ characters followed by one "=" padding character.
164+ */
165+
166+int
167+b64_ntop(const uint8_t* src, size_t srclength, char* target, size_t targsize)
168+{
169+ size_t datalength = 0;
170+ uint8_t input[3];
171+ uint8_t output[4];
172+ size_t i;
173+
174+ while (2 < srclength) {
175+ input[0] = *src++;
176+ input[1] = *src++;
177+ input[2] = *src++;
178+ srclength -= 3;
179+
180+ output[0] = input[0] >> 2;
181+ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
182+ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
183+ output[3] = input[2] & 0x3f;
184+ Assert(output[0] < 64);
185+ Assert(output[1] < 64);
186+ Assert(output[2] < 64);
187+ Assert(output[3] < 64);
188+
189+ if (datalength + 4 > targsize)
190+ return (-1);
191+ target[datalength++] = Base64[output[0]];
192+ target[datalength++] = Base64[output[1]];
193+ target[datalength++] = Base64[output[2]];
194+ target[datalength++] = Base64[output[3]];
195+ }
196+
197+ /* Now we worry about padding. */
198+ if (0 != srclength) {
199+ /* Get what's left. */
200+ input[0] = input[1] = input[2] = '\0';
201+ for (i = 0; i < srclength; i++)
202+ input[i] = *src++;
203+
204+ output[0] = input[0] >> 2;
205+ output[1] = ((input[0] & 0x03) << 4) + (input[1] >> 4);
206+ output[2] = ((input[1] & 0x0f) << 2) + (input[2] >> 6);
207+ Assert(output[0] < 64);
208+ Assert(output[1] < 64);
209+ Assert(output[2] < 64);
210+
211+ if (datalength + 4 > targsize)
212+ return (-1);
213+ target[datalength++] = Base64[output[0]];
214+ target[datalength++] = Base64[output[1]];
215+ if (srclength == 1)
216+ target[datalength++] = Pad64;
217+ else
218+ target[datalength++] = Base64[output[2]];
219+ target[datalength++] = Pad64;
220+ }
221+ if (datalength >= targsize)
222+ return (-1);
223+ target[datalength] = '\0'; /* Returned value doesn't count \0. */
224+ return (datalength);
225+}
226+
227+/* skips all whitespace anywhere.
228+ converts characters, four at a time, starting at (or after)
229+ src from base - 64 numbers into three 8 bit bytes in the target area.
230+ it returns the number of data bytes stored at the target, or -1 on error.
231+ */
232+
233+int b64_pton(const char* src, uint8_t* target, size_t targsize)
234+{
235+ int tarindex, state, ch;
236+ char *pos;
237+
238+ state = 0;
239+ tarindex = 0;
240+
241+ while ((ch = *src++) != '\0') {
242+ if (isspace(ch)) /* Skip whitespace anywhere. */
243+ continue;
244+
245+ if (ch == Pad64)
246+ break;
247+
248+ pos = strchr(Base64, ch);
249+ if (pos == 0) /* A non-base64 character. */
250+ return (-1);
251+
252+ switch (state) {
253+ case 0:
254+ if (target) {
255+ if ((size_t)tarindex >= targsize)
256+ return (-1);
257+ target[tarindex] = (pos - Base64) << 2;
258+ }
259+ state = 1;
260+ break;
261+ case 1:
262+ if (target) {
263+ if ((size_t)tarindex + 1 >= targsize)
264+ return (-1);
265+ target[tarindex] |= (pos - Base64) >> 4;
266+ target[tarindex+1] = ((pos - Base64) & 0x0f)
267+ << 4 ;
268+ }
269+ tarindex++;
270+ state = 2;
271+ break;
272+ case 2:
273+ if (target) {
274+ if ((size_t)tarindex + 1 >= targsize)
275+ return (-1);
276+ target[tarindex] |= (pos - Base64) >> 2;
277+ target[tarindex+1] = ((pos - Base64) & 0x03)
278+ << 6;
279+ }
280+ tarindex++;
281+ state = 3;
282+ break;
283+ case 3:
284+ if (target) {
285+ if ((size_t)tarindex >= targsize)
286+ return (-1);
287+ target[tarindex] |= (pos - Base64);
288+ }
289+ tarindex++;
290+ state = 0;
291+ break;
292+ default:
293+ abort();
294+ }
295+ }
296+
297+ /*
298+ * We are done decoding Base-64 chars. Let's see if we ended
299+ * on a byte boundary, and/or with erroneous trailing characters.
300+ */
301+
302+ if (ch == Pad64) { /* We got a pad char. */
303+ ch = *src++; /* Skip it, get next. */
304+ switch (state) {
305+ case 0: /* Invalid = in first position */
306+ case 1: /* Invalid = in second position */
307+ return (-1);
308+
309+ case 2: /* Valid, means one byte of info */
310+ /* Skip any number of spaces. */
311+ for ((void)NULL; ch != '\0'; ch = *src++)
312+ if (!isspace(ch))
313+ break;
314+ /* Make sure there is another trailing = sign. */
315+ if (ch != Pad64)
316+ return (-1);
317+ ch = *src++; /* Skip the = */
318+ /* Fall through to "single trailing =" case. */
319+ /* FALLTHROUGH */
320+
321+ case 3: /* Valid, means two bytes of info */
322+ /*
323+ * We know this char is an =. Is there anything but
324+ * whitespace after it?
325+ */
326+ for ((void)NULL; ch != '\0'; ch = *src++)
327+ if (!isspace(ch))
328+ return (-1);
329+
330+ /*
331+ * Now make sure for cases 2 and 3 that the "extra"
332+ * bits that slopped past the last full byte were
333+ * zeros. If we don't check them, they become a
334+ * subliminal channel.
335+ */
336+ if (target && target[tarindex] != 0)
337+ return (-1);
338+ }
339+ } else {
340+ /*
341+ * We ended by seeing the end of the string. Make sure we
342+ * have no partial bytes lying around.
343+ */
344+ if (state != 0)
345+ return (-1);
346+ }
347+
348+ return (tarindex);
349+}
350+
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0006-adb-Musl-fixes.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0006-adb-Musl-fixes.patch
deleted file mode 100644
index 182b1eb29e..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0006-adb-Musl-fixes.patch
+++ /dev/null
@@ -1,130 +0,0 @@
1From 62d957a1271c88ec08d67984fbe31601f0bd41a9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 15 Sep 2017 15:50:57 -0700
4Subject: [PATCH] adb: Musl fixes
5
6__nonnull is gcc specific
7include sys/types.h for size_t
8Do not redefine close() and lseek()
9
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12Upstream-Status: Pending
13
14 adb/adb.h | 2 ++
15 adb/disable_verity_service.c | 13 ++++++++-----
16 adb/framebuffer_service.c | 7 ++++---
17 adb/sysdeps.h | 12 ++++++------
18 4 files changed, 20 insertions(+), 14 deletions(-)
19
20--- a/adb/adb.h
21+++ b/adb/adb.h
22@@ -18,7 +18,9 @@
23 #define __ADB_H
24
25 #include <limits.h>
26+#include <sys/types.h>
27
28+#include "fdevent.h"
29 #include "adb_trace.h"
30 #include "transport.h" /* readx(), writex() */
31
32--- a/adb/disable_verity_service.c
33+++ b/adb/disable_verity_service.c
34@@ -14,25 +14,32 @@
35 * limitations under the License.
36 */
37
38-#include "sysdeps.h"
39
40 #define TRACE_TAG TRACE_ADB
41 #include "adb.h"
42+#include "sysdeps.h"
43+#include "cutils/properties.h"
44+#include "ext4_sb.h"
45+#include <fs_mgr.h>
46
47 #include <stdio.h>
48 #include <stdarg.h>
49 #include <sys/stat.h>
50 #include <fcntl.h>
51 #include <inttypes.h>
52-
53-#include "cutils/properties.h"
54-#include "ext4_sb.h"
55-#include <fs_mgr.h>
56+#include <unistd.h>
57+#include <errno.h>
58+#include <stdbool.h>
59+
60+#if defined(__linux__) && !defined(__GLIBC__)
61+#define lseek64 lseek
62+#define off64_t off_t
63+#endif
64
65 #define FSTAB_PREFIX "/fstab."
66 struct fstab *fstab;
67
68-__attribute__((__format__(printf, 2, 3))) __nonnull((2))
69+__attribute__((__format__(printf, 2, 3))) __attribute__((nonnull((2))))
70 static void write_console(int fd, const char* format, ...)
71 {
72 char buffer[256];
73--- a/adb/framebuffer_service.c
74+++ b/adb/framebuffer_service.c
75@@ -14,6 +14,10 @@
76 * limitations under the License.
77 */
78
79+#include "fdevent.h"
80+#include "adb.h"
81+#include "sysdeps.h"
82+
83 #include <stdlib.h>
84 #include <stdio.h>
85 #include <unistd.h>
86@@ -23,9 +27,6 @@
87 #include <sys/types.h>
88 #include <sys/wait.h>
89
90-#include "fdevent.h"
91-#include "adb.h"
92-
93 #include <linux/fb.h>
94 #include <sys/ioctl.h>
95 #include <sys/mman.h>
96--- a/adb/sysdeps.h
97+++ b/adb/sysdeps.h
98@@ -123,8 +123,8 @@ static __inline__ int unix_close(int fd
99 {
100 return close(fd);
101 }
102-#undef close
103-#define close ____xxx_close
104+//#undef close
105+//#define close ____xxx_close
106
107 static __inline__ int unix_read(int fd, void* buf, size_t len)
108 {
109@@ -369,8 +369,8 @@ static __inline__ int adb_close(int fd)
110 {
111 return close(fd);
112 }
113-#undef close
114-#define close ____xxx_close
115+//#undef close
116+//#define close ____xxx_close
117
118
119 static __inline__ int adb_read(int fd, void* buf, size_t len)
120@@ -392,8 +392,8 @@ static __inline__ int adb_lseek(int f
121 {
122 return lseek(fd, pos, where);
123 }
124-#undef lseek
125-#define lseek ___xxx_lseek
126+//#undef lseek
127+//#define lseek ___xxx_lseek
128
129 static __inline__ int adb_unlink(const char* path)
130 {
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch
deleted file mode 100644
index 64fbce4cbe..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From de393bba41c8feff932c77d6c30233945f380d42 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Sat, 11 Aug 2018 13:23:37 +0000
4Subject: [PATCH] adb: usb_linux.c: fix build with glibc-2.28
5
6* include sysmacros for major, minor
7
8Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
9---
10Upstream-Status: Pending
11
12 adb/usb_linux.c | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/adb/usb_linux.c b/adb/usb_linux.c
16index f16bdd0361..c8a7732441 100644
17--- a/adb/usb_linux.c
18+++ b/adb/usb_linux.c
19@@ -22,6 +22,7 @@
20 #include <sys/ioctl.h>
21 #include <sys/types.h>
22 #include <sys/time.h>
23+#include <sys/sysmacros.h>
24 #include <dirent.h>
25 #include <fcntl.h>
26 #include <errno.h>
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0008-adb-Allow-adbd-to-be-ran-as-root.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0008-adb-Allow-adbd-to-be-ran-as-root.patch
deleted file mode 100644
index ad21b5aaa6..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0008-adb-Allow-adbd-to-be-ran-as-root.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1From 3a788e9168c9b9eac66c4fa479413f4a95c61be4 Mon Sep 17 00:00:00 2001
2From: Florent Revest <revestflo@gmail.com>
3Date: Mon, 30 Oct 2017 21:05:46 +0100
4Subject: [PATCH] adb: Allow adbd to be ran as root
5
6---
7Upstream-Status: Pending
8
9 adb/adb.c | 1 +
10 1 file changed, 1 insertion(+)
11
12diff --git a/adb/adb.c b/adb/adb.c
13index 027edd9359..e0f7ecde45 100644
14--- a/adb/adb.c
15+++ b/adb/adb.c
16@@ -1271,6 +1271,7 @@ static int should_drop_privileges() {
17 int secure = 0;
18 char value[PROPERTY_VALUE_MAX];
19
20+ return 0;
21 /* run adbd in secure mode if ro.secure is set and
22 ** we are not in the emulator
23 */
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0009-mkbootimg-Add-dt-parameter-to-specify-DT-image.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0009-mkbootimg-Add-dt-parameter-to-specify-DT-image.patch
deleted file mode 100644
index a4dc6e1e35..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0009-mkbootimg-Add-dt-parameter-to-specify-DT-image.patch
+++ /dev/null
@@ -1,110 +0,0 @@
1From dd195778a9930b7967b21a3b8eb390b70253dbad Mon Sep 17 00:00:00 2001
2From: David Ng <dave@codeaurora.org>
3Date: Fri, 27 Jul 2012 17:15:03 -0700
4Subject: [PATCH] mkbootimg: Add --dt parameter to specify DT image
5
6New optional --dt parameter to specify a kernel device
7tree image.
8
9Upstream-Status: Inappropriate
10---
11 mkbootimg/bootimg.h | 7 +++++--
12 mkbootimg/mkbootimg.c | 21 +++++++++++++++++++++
13 2 files changed, 26 insertions(+), 2 deletions(-)
14
15diff --git a/mkbootimg/bootimg.h b/mkbootimg/bootimg.h
16index 9171d85a7b..308c537d6b 100644
17--- a/mkbootimg/bootimg.h
18+++ b/mkbootimg/bootimg.h
19@@ -41,8 +41,8 @@ struct boot_img_hdr
20
21 unsigned tags_addr; /* physical addr for kernel tags */
22 unsigned page_size; /* flash page size we assume */
23- unsigned unused[2]; /* future expansion: should be 0 */
24-
25+ unsigned dt_size; /* device tree in bytes */
26+ unsigned unused; /* future expansion: should be 0 */
27 unsigned char name[BOOT_NAME_SIZE]; /* asciiz product name */
28
29 unsigned char cmdline[BOOT_ARGS_SIZE];
30@@ -64,10 +64,13 @@ struct boot_img_hdr
31 ** +-----------------+
32 ** | second stage | o pages
33 ** +-----------------+
34+** | device tree | p pages
35+** +-----------------+
36 **
37 ** n = (kernel_size + page_size - 1) / page_size
38 ** m = (ramdisk_size + page_size - 1) / page_size
39 ** o = (second_size + page_size - 1) / page_size
40+** p = (dt_size + page_size - 1) / page_size
41 **
42 ** 0. all entities are page_size aligned in flash
43 ** 1. kernel and ramdisk are required (size != 0)
44diff --git a/mkbootimg/mkbootimg.c b/mkbootimg/mkbootimg.c
45index fc92b4dc30..658052cdf2 100644
46--- a/mkbootimg/mkbootimg.c
47+++ b/mkbootimg/mkbootimg.c
48@@ -65,6 +65,7 @@ int usage(void)
49 " [ --board <boardname> ]\n"
50 " [ --base <address> ]\n"
51 " [ --pagesize <pagesize> ]\n"
52+ " [ --dt <filename> ]\n"
53 " -o|--output <filename>\n"
54 );
55 return 1;
56@@ -105,6 +106,8 @@ int main(int argc, char **argv)
57 char *cmdline = "";
58 char *bootimg = 0;
59 char *board = "";
60+ char *dt_fn = 0;
61+ void *dt_data = 0;
62 unsigned pagesize = 2048;
63 int fd;
64 SHA_CTX ctx;
65@@ -158,6 +161,8 @@ int main(int argc, char **argv)
66 fprintf(stderr,"error: unsupported page size %d\n", pagesize);
67 return -1;
68 }
69+ } else if(!strcmp(arg, "--dt")) {
70+ dt_fn = val;
71 } else {
72 return usage();
73 }
74@@ -232,6 +237,14 @@ int main(int argc, char **argv)
75 }
76 }
77
78+ if(dt_fn) {
79+ dt_data = load_file(dt_fn, &hdr.dt_size);
80+ if (dt_data == 0) {
81+ fprintf(stderr,"error: could not load device tree image '%s'\n", dt_fn);
82+ return 1;
83+ }
84+ }
85+
86 /* put a hash of the contents in the header so boot images can be
87 * differentiated based on their first 2k.
88 */
89@@ -242,6 +255,10 @@ int main(int argc, char **argv)
90 SHA_update(&ctx, &hdr.ramdisk_size, sizeof(hdr.ramdisk_size));
91 SHA_update(&ctx, second_data, hdr.second_size);
92 SHA_update(&ctx, &hdr.second_size, sizeof(hdr.second_size));
93+ if(dt_data) {
94+ SHA_update(&ctx, dt_data, hdr.dt_size);
95+ SHA_update(&ctx, &hdr.dt_size, sizeof(hdr.dt_size));
96+ }
97 sha = SHA_final(&ctx);
98 memcpy(hdr.id, sha,
99 SHA_DIGEST_SIZE > sizeof(hdr.id) ? sizeof(hdr.id) : SHA_DIGEST_SIZE);
100@@ -266,6 +283,10 @@ int main(int argc, char **argv)
101 if(write_padding(fd, pagesize, hdr.second_size)) goto fail;
102 }
103
104+ if(dt_data) {
105+ if(write(fd, dt_data, hdr.dt_size) != (ssize_t) hdr.dt_size) goto fail;
106+ if(write_padding(fd, pagesize, hdr.dt_size)) goto fail;
107+ }
108 return 0;
109
110 fail:
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0010-Use-linux-capability.h-on-linux-systems-too.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0010-Use-linux-capability.h-on-linux-systems-too.patch
deleted file mode 100644
index 2c607ff67c..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0010-Use-linux-capability.h-on-linux-systems-too.patch
+++ /dev/null
@@ -1,23 +0,0 @@
1From ef743c9c3c7452ae904a5c343ee2b759ab3a87cb Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Lo=C3=AFc=20Minier?= <loic.minier@ubuntu.com>
3Date: Wed, 7 Sep 2016 12:58:47 +0300
4Subject: [PATCH] Use linux/capability.h on linux systems too
5
6Upstream-Status: Inappropriate
7---
8 include/private/android_filesystem_config.h | 2 +-
9 1 file changed, 1 insertion(+), 1 deletion(-)
10
11diff --git a/include/private/android_filesystem_config.h b/include/private/android_filesystem_config.h
12index 2f528b95c8..3e0b00928e 100644
13--- a/include/private/android_filesystem_config.h
14+++ b/include/private/android_filesystem_config.h
15@@ -27,7 +27,7 @@
16 #include <sys/types.h>
17 #include <stdint.h>
18
19-#ifdef HAVE_ANDROID_OS
20+#if defined(HAVE_ANDROID_OS) || defined(__linux__)
21 #include <linux/capability.h>
22 #else
23 #include "android_filesystem_capability.h"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0011-Remove-bionic-specific-calls.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0011-Remove-bionic-specific-calls.patch
deleted file mode 100644
index 5b18f461a3..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0011-Remove-bionic-specific-calls.patch
+++ /dev/null
@@ -1,64 +0,0 @@
1From 9eff8799831961c0edf6e37e5d4cbf43baa7c748 Mon Sep 17 00:00:00 2001
2From: Fathi Boudra <fabo@debian.org>
3Date: Wed, 7 Sep 2016 12:58:47 +0300
4Subject: [PATCH] Remove bionic specific calls
5
6Upstream-Status: Inappropriate
7---
8 include/cutils/properties.h | 1 -
9 libcutils/properties.c | 2 +-
10 liblog/logd_write.c | 5 +++++
11 3 files changed, 6 insertions(+), 2 deletions(-)
12
13diff --git a/include/cutils/properties.h b/include/cutils/properties.h
14index 798db8b36f..7d01f28d6e 100644
15--- a/include/cutils/properties.h
16+++ b/include/cutils/properties.h
17@@ -19,7 +19,6 @@
18
19 #include <sys/cdefs.h>
20 #include <stddef.h>
21-#include <sys/system_properties.h>
22 #include <stdint.h>
23
24 #ifdef __cplusplus
25diff --git a/libcutils/properties.c b/libcutils/properties.c
26index b283658aa4..4151e7882c 100644
27--- a/libcutils/properties.c
28+++ b/libcutils/properties.c
29@@ -104,10 +104,10 @@ int32_t property_get_int32(const char *key, int32_t default_value) {
30 return (int32_t)property_get_imax(key, INT32_MIN, INT32_MAX, default_value);
31 }
32
33+#undef HAVE_LIBC_SYSTEM_PROPERTIES
34 #ifdef HAVE_LIBC_SYSTEM_PROPERTIES
35
36 #define _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
37-#include <sys/_system_properties.h>
38
39 int property_set(const char *key, const char *value)
40 {
41diff --git a/liblog/logd_write.c b/liblog/logd_write.c
42index b2668cedb7..f5a44fe901 100644
43--- a/liblog/logd_write.c
44+++ b/liblog/logd_write.c
45@@ -23,6 +23,7 @@
46 #include <stdlib.h>
47 #include <string.h>
48 #include <sys/stat.h>
49+#include <sys/syscall.h>
50 #include <sys/types.h>
51 #if (FAKE_LOG_DEVICE == 0)
52 #include <sys/socket.h>
53@@ -205,7 +206,11 @@ static int __write_to_log_kernel(log_id_t log_id, struct iovec *vec, size_t nr)
54 realtime_ts.tv_nsec = ts.tv_nsec;
55
56 log_id_buf = log_id;
57+#ifdef __BIONIC__
58 tid = gettid();
59+#else
60+ tid = (pid_t) syscall(__NR_gettid);
61+#endif
62
63 newVec[0].iov_base = (unsigned char *) &log_id_buf;
64 newVec[0].iov_len = sizeof_log_id_t;
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0012-Fix-implicit-declaration-of-stlcat-strlcopy-function.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0012-Fix-implicit-declaration-of-stlcat-strlcopy-function.patch
deleted file mode 100644
index b0feb65921..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0012-Fix-implicit-declaration-of-stlcat-strlcopy-function.patch
+++ /dev/null
@@ -1,50 +0,0 @@
1From cd4525d760c6f88c9bf85f7bf488da79cd0d3264 Mon Sep 17 00:00:00 2001
2From: Fathi Boudra <fabo@debian.org>
3Date: Wed, 7 Sep 2016 12:58:47 +0300
4Subject: [PATCH] Fix implicit declaration of stlcat/strlcopy functions
5
6Upstream-Status: Inappropriate
7---
8 adb/adb.c | 1 +
9 fs_mgr/fs_mgr_fstab.c | 2 +-
10 include/cutils/sockets.h | 2 +-
11 3 files changed, 3 insertions(+), 2 deletions(-)
12
13diff --git a/adb/adb.c b/adb/adb.c
14index e0f7ecde45..aaefd9b401 100644
15--- a/adb/adb.c
16+++ b/adb/adb.c
17@@ -41,6 +41,7 @@
18 #include <sys/prctl.h>
19 #include <getopt.h>
20 #include <selinux/selinux.h>
21+#include <grp.h>
22 #else
23 #include "usb_vendors.h"
24 #endif
25diff --git a/fs_mgr/fs_mgr_fstab.c b/fs_mgr/fs_mgr_fstab.c
26index edd9591164..9ddb4643b5 100644
27--- a/fs_mgr/fs_mgr_fstab.c
28+++ b/fs_mgr/fs_mgr_fstab.c
29@@ -17,7 +17,7 @@
30 #include <ctype.h>
31 #include <stdio.h>
32 #include <stdlib.h>
33-#include <string.h>
34+#include <bsd/string.h>
35 #include <sys/mount.h>
36
37 #include "fs_mgr_priv.h"
38diff --git a/include/cutils/sockets.h b/include/cutils/sockets.h
39index daf43ec944..d3270c69e7 100644
40--- a/include/cutils/sockets.h
41+++ b/include/cutils/sockets.h
42@@ -19,7 +19,7 @@
43
44 #include <errno.h>
45 #include <stdlib.h>
46-#include <string.h>
47+#include <bsd/string.h>
48 #include <stdbool.h>
49
50 #ifdef HAVE_WINSOCK
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch
deleted file mode 100644
index 5138556d63..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0013-adb-Support-riscv64.patch
+++ /dev/null
@@ -1,191 +0,0 @@
1From 48ddf4fb999931942c359350fb31cd557514e1c6 Mon Sep 17 00:00:00 2001
2From: Chenxi Mao <maochenxi@eswin.com>
3Date: Mon, 20 Apr 2020 15:27:22 +0800
4Subject: [PATCH 1/1] adb: Support riscv64
5
6---
7Upstream-Status: Pending
8
9 include/cutils/atomic-inline.h | 2 +
10 include/cutils/atomic-riscv64.h | 156 ++++++++++++++++++++++++++++++++
11 2 files changed, 158 insertions(+)
12 create mode 100644 include/cutils/atomic-riscv64.h
13
14diff --git a/include/cutils/atomic-inline.h b/include/cutils/atomic-inline.h
15index a31e913579..b5dc38209c 100644
16--- a/include/cutils/atomic-inline.h
17+++ b/include/cutils/atomic-inline.h
18@@ -55,6 +55,8 @@ extern "C" {
19 #include <cutils/atomic-mips64.h>
20 #elif defined(__mips__)
21 #include <cutils/atomic-mips.h>
22+#elif defined(__riscv) && __riscv_xlen == 64
23+#include <cutils/atomic-riscv64.h>
24 #else
25 #error atomic operations are unsupported
26 #endif
27diff --git a/include/cutils/atomic-riscv64.h b/include/cutils/atomic-riscv64.h
28new file mode 100644
29index 0000000000..2664db5a86
30--- /dev/null
31+++ b/include/cutils/atomic-riscv64.h
32@@ -0,0 +1,156 @@
33+/*
34+ * Copyright (C) 2014 The Android Open Source Project
35+ * All rights reserved.
36+ *
37+ * Redistribution and use in source and binary forms, with or without
38+ * modification, are permitted provided that the following conditions
39+ * are met:
40+ * * Redistributions of source code must retain the above copyright
41+ * notice, this list of conditions and the following disclaimer.
42+ * * Redistributions in binary form must reproduce the above copyright
43+ * notice, this list of conditions and the following disclaimer in
44+ * the documentation and/or other materials provided with the
45+ * distribution.
46+ *
47+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
48+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
49+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
50+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
51+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
52+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
53+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
54+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
55+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
56+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
57+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
58+ * SUCH DAMAGE.
59+ */
60+
61+#ifndef ANDROID_CUTILS_ATOMIC_RISCV64_H
62+#define ANDROID_CUTILS_ATOMIC_RISCV64_H
63+
64+#include <stdint.h>
65+
66+#ifndef ANDROID_ATOMIC_INLINE
67+#define ANDROID_ATOMIC_INLINE inline __attribute__((always_inline))
68+#endif
69+
70+/*
71+ TODOAArch64: Revisit the below functions and check for potential
72+ optimizations using assembly code or otherwise.
73+*/
74+
75+extern ANDROID_ATOMIC_INLINE
76+void android_compiler_barrier(void)
77+{
78+ __asm__ __volatile__ ("" : : : "memory");
79+}
80+
81+extern ANDROID_ATOMIC_INLINE
82+void android_memory_barrier(void)
83+{
84+ __asm__ __volatile__ ("fence rw,rw" : : : "memory");
85+}
86+
87+extern ANDROID_ATOMIC_INLINE
88+int32_t android_atomic_acquire_load(volatile const int32_t *ptr)
89+{
90+ int32_t value = *ptr;
91+ android_memory_barrier();
92+ return value;
93+}
94+
95+extern ANDROID_ATOMIC_INLINE
96+int32_t android_atomic_release_load(volatile const int32_t *ptr)
97+{
98+ android_memory_barrier();
99+ return *ptr;
100+}
101+
102+extern ANDROID_ATOMIC_INLINE
103+void android_atomic_acquire_store(int32_t value, volatile int32_t *ptr)
104+{
105+ *ptr = value;
106+ android_memory_barrier();
107+}
108+
109+extern ANDROID_ATOMIC_INLINE
110+void android_atomic_release_store(int32_t value, volatile int32_t *ptr)
111+{
112+ android_memory_barrier();
113+ *ptr = value;
114+}
115+
116+extern ANDROID_ATOMIC_INLINE
117+int android_atomic_cas(int32_t old_value, int32_t new_value,
118+ volatile int32_t *ptr)
119+{
120+ return __sync_val_compare_and_swap(ptr, old_value, new_value) != old_value;
121+}
122+
123+extern ANDROID_ATOMIC_INLINE
124+int android_atomic_acquire_cas(int32_t old_value, int32_t new_value,
125+ volatile int32_t *ptr)
126+{
127+ int status = android_atomic_cas(old_value, new_value, ptr);
128+ android_memory_barrier();
129+ return status;
130+}
131+
132+extern ANDROID_ATOMIC_INLINE
133+int android_atomic_release_cas(int32_t old_value, int32_t new_value,
134+ volatile int32_t *ptr)
135+{
136+ android_memory_barrier();
137+ return android_atomic_cas(old_value, new_value, ptr);
138+}
139+
140+extern ANDROID_ATOMIC_INLINE
141+int32_t android_atomic_add(int32_t increment, volatile int32_t *ptr)
142+{
143+ int32_t prev, status;
144+ android_memory_barrier();
145+ do {
146+ prev = *ptr;
147+ status = android_atomic_cas(prev, prev + increment, ptr);
148+ } while (__builtin_expect(status != 0, 0));
149+ return prev;
150+}
151+
152+extern ANDROID_ATOMIC_INLINE
153+int32_t android_atomic_inc(volatile int32_t *addr)
154+{
155+ return android_atomic_add(1, addr);
156+}
157+
158+extern ANDROID_ATOMIC_INLINE
159+int32_t android_atomic_dec(volatile int32_t *addr)
160+{
161+ return android_atomic_add(-1, addr);
162+}
163+
164+extern ANDROID_ATOMIC_INLINE
165+int32_t android_atomic_and(int32_t value, volatile int32_t *ptr)
166+{
167+ int32_t prev, status;
168+ android_memory_barrier();
169+ do {
170+ prev = *ptr;
171+ status = android_atomic_cas(prev, prev & value, ptr);
172+ } while (__builtin_expect(status != 0, 0));
173+ return prev;
174+}
175+
176+extern ANDROID_ATOMIC_INLINE
177+int32_t android_atomic_or(int32_t value, volatile int32_t *ptr)
178+{
179+ int32_t prev, status;
180+ android_memory_barrier();
181+ do {
182+ prev = *ptr;
183+ status = android_atomic_cas(prev, prev | value, ptr);
184+ } while (__builtin_expect(status != 0, 0));
185+ return prev;
186+}
187+
188+#endif /* ANDROID_CUTILS_ATOMIC_RISCV_H */
189--
1902.17.1
191
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch
deleted file mode 100644
index cf23f3c251..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0014-add-u3-ss-descriptor-support-for-adb.patch
+++ /dev/null
@@ -1,344 +0,0 @@
1From dae9a11f3a158357966399aef97c48b5f16934d9 Mon Sep 17 00:00:00 2001
2From: Jiacheng Liu <jiacheng.liu@mediatek.com>
3Date: Sat, 24 Jul 2021 11:01:18 +0800
4Subject: [PATCH] android-tools: adb: add u3 ss descriptor support
5
6Porting u3 Superspeed descriptor support to open-embedded android-tools package.
7This patch origins from the the patch in android project [1], but has been
8modified for backporting to android-tools_5.1.1.r37.
9
10[1] https://android.googlesource.com/platform/system/core/+/d6ee9f26a5163af4121f4380264fcbd4e6851a17%5E%21
11
12Signed-off-by: Macpaul Lin <macpaul.lin@mediatek.com>
13Signed-off-by: Jiacheng Liu <jiacheng.liu@mediatek.com>
14---
15Upstream-Status: Pending
16
17 adb/usb_linux_client.c | 275 +++++++++++++++++++++++++++++++----------
18 1 file changed, 207 insertions(+), 68 deletions(-)
19
20diff --git a/adb/usb_linux_client.c b/adb/usb_linux_client.c
21index 6e8b5bb..884e85e 100644
22--- a/adb/usb_linux_client.c
23+++ b/adb/usb_linux_client.c
24@@ -31,8 +31,10 @@
25 #define TRACE_TAG TRACE_USB
26 #include "adb.h"
27
28+#define USB_EXT_PROP_UNICODE 1
29 #define MAX_PACKET_SIZE_FS 64
30 #define MAX_PACKET_SIZE_HS 512
31+#define MAX_PACKET_SIZE_SS 1024
32
33 #if __BYTE_ORDER == __LITTLE_ENDIAN
34 # define cpu_to_le16(x) (x)
35@@ -62,74 +64,185 @@ struct usb_handle
36 int bulk_in; /* "in" from the host's perspective => sink for adbd */
37 };
38
39-static const struct {
40- struct usb_functionfs_descs_head header;
41- struct {
42- struct usb_interface_descriptor intf;
43- struct usb_endpoint_descriptor_no_audio source;
44- struct usb_endpoint_descriptor_no_audio sink;
45- } __attribute__((packed)) fs_descs, hs_descs;
46-} __attribute__((packed)) descriptors = {
47- .header = {
48- .magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC),
49- .length = cpu_to_le32(sizeof(descriptors)),
50- .fs_count = 3,
51- .hs_count = 3,
52+struct func_desc {
53+ struct usb_interface_descriptor intf;
54+ struct usb_endpoint_descriptor_no_audio source;
55+ struct usb_endpoint_descriptor_no_audio sink;
56+} __attribute__((packed));
57+
58+struct ss_func_desc {
59+ struct usb_interface_descriptor intf;
60+ struct usb_endpoint_descriptor_no_audio source;
61+ struct usb_ss_ep_comp_descriptor source_comp;
62+ struct usb_endpoint_descriptor_no_audio sink;
63+ struct usb_ss_ep_comp_descriptor sink_comp;
64+} __attribute__((packed));
65+
66+struct desc_v1 {
67+ struct usb_functionfs_descs_head_v1 {
68+ __le32 magic;
69+ __le32 length;
70+ __le32 fs_count;
71+ __le32 hs_count;
72+ } __attribute__((packed)) header;
73+ struct func_desc fs_descs, hs_descs;
74+} __attribute__((packed));
75+
76+struct usb_os_desc_ext_prop {
77+ uint32_t dwSize;
78+ uint32_t dwPropertyDataType;
79+
80+ // Property name and value are transmitted as UTF-16, but the kernel only
81+ // accepts ASCII values and performs the conversion for us.
82+ uint16_t wPropertyNameLength;
83+ char bPropertyName[20];
84+
85+ uint32_t dwPropertyDataLength;
86+ char bProperty[39];
87+} __attribute__((packed)) os_desc_guid = {
88+ .dwSize = sizeof(struct usb_os_desc_ext_prop),
89+ .dwPropertyDataType = cpu_to_le32(USB_EXT_PROP_UNICODE),
90+ .wPropertyNameLength = cpu_to_le16(20),
91+ .bPropertyName = "DeviceInterfaceGUID",
92+ .dwPropertyDataLength = cpu_to_le32(39),
93+ .bProperty = "{F72FE0D4-CBCB-407D-8814-9ED673D0DD6B}",
94+};
95+
96+struct usb_ext_prop_values {
97+ struct usb_os_desc_ext_prop guid;
98+} __attribute__((packed));
99+
100+struct desc_v2 {
101+ struct usb_functionfs_descs_head_v2 header;
102+ // The rest of the structure depends on the flags in the header.
103+ __le32 fs_count;
104+ __le32 hs_count;
105+ __le32 ss_count;
106+ __le32 os_count;
107+ struct func_desc fs_descs, hs_descs;
108+ struct ss_func_desc ss_descs;
109+ struct usb_os_desc_header os_header;
110+ struct usb_ext_compat_desc os_desc;
111+ struct usb_os_desc_header os_prop_header;
112+ struct usb_ext_prop_values os_prop_values;
113+} __attribute__((packed));
114+
115+static struct func_desc fs_descriptors = {
116+ .intf = {
117+ .bLength = sizeof(fs_descriptors.intf),
118+ .bDescriptorType = USB_DT_INTERFACE,
119+ .bInterfaceNumber = 0,
120+ .bNumEndpoints = 2,
121+ .bInterfaceClass = ADB_CLASS,
122+ .bInterfaceSubClass = ADB_SUBCLASS,
123+ .bInterfaceProtocol = ADB_PROTOCOL,
124+ .iInterface = 1, /* first string from the provided table */
125+ },
126+ .source = {
127+ .bLength = sizeof(fs_descriptors.source),
128+ .bDescriptorType = USB_DT_ENDPOINT,
129+ .bEndpointAddress = 1 | USB_DIR_OUT,
130+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
131+ .wMaxPacketSize = MAX_PACKET_SIZE_FS,
132+ },
133+ .sink = {
134+ .bLength = sizeof(fs_descriptors.sink),
135+ .bDescriptorType = USB_DT_ENDPOINT,
136+ .bEndpointAddress = 2 | USB_DIR_IN,
137+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
138+ .wMaxPacketSize = MAX_PACKET_SIZE_FS,
139+ },
140+};
141+
142+static struct func_desc hs_descriptors = {
143+ .intf = {
144+ .bLength = sizeof(hs_descriptors.intf),
145+ .bDescriptorType = USB_DT_INTERFACE,
146+ .bInterfaceNumber = 0,
147+ .bNumEndpoints = 2,
148+ .bInterfaceClass = ADB_CLASS,
149+ .bInterfaceSubClass = ADB_SUBCLASS,
150+ .bInterfaceProtocol = ADB_PROTOCOL,
151+ .iInterface = 1, /* first string from the provided table */
152+ },
153+ .source = {
154+ .bLength = sizeof(hs_descriptors.source),
155+ .bDescriptorType = USB_DT_ENDPOINT,
156+ .bEndpointAddress = 1 | USB_DIR_OUT,
157+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
158+ .wMaxPacketSize = MAX_PACKET_SIZE_HS,
159+ },
160+ .sink = {
161+ .bLength = sizeof(hs_descriptors.sink),
162+ .bDescriptorType = USB_DT_ENDPOINT,
163+ .bEndpointAddress = 2 | USB_DIR_IN,
164+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
165+ .wMaxPacketSize = MAX_PACKET_SIZE_HS,
166+ },
167+};
168+
169+static struct ss_func_desc ss_descriptors = {
170+ .intf = {
171+ .bLength = sizeof(ss_descriptors.intf),
172+ .bDescriptorType = USB_DT_INTERFACE,
173+ .bInterfaceNumber = 0,
174+ .bNumEndpoints = 2,
175+ .bInterfaceClass = ADB_CLASS,
176+ .bInterfaceSubClass = ADB_SUBCLASS,
177+ .bInterfaceProtocol = ADB_PROTOCOL,
178+ .iInterface = 1, /* first string from the provided table */
179+ },
180+ .source = {
181+ .bLength = sizeof(ss_descriptors.source),
182+ .bDescriptorType = USB_DT_ENDPOINT,
183+ .bEndpointAddress = 1 | USB_DIR_OUT,
184+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
185+ .wMaxPacketSize = MAX_PACKET_SIZE_SS,
186+ },
187+ .source_comp = {
188+ .bLength = sizeof(ss_descriptors.source_comp),
189+ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
190+ .bMaxBurst = 4,
191 },
192- .fs_descs = {
193- .intf = {
194- .bLength = sizeof(descriptors.fs_descs.intf),
195- .bDescriptorType = USB_DT_INTERFACE,
196- .bInterfaceNumber = 0,
197- .bNumEndpoints = 2,
198- .bInterfaceClass = ADB_CLASS,
199- .bInterfaceSubClass = ADB_SUBCLASS,
200- .bInterfaceProtocol = ADB_PROTOCOL,
201- .iInterface = 1, /* first string from the provided table */
202- },
203- .source = {
204- .bLength = sizeof(descriptors.fs_descs.source),
205- .bDescriptorType = USB_DT_ENDPOINT,
206- .bEndpointAddress = 1 | USB_DIR_OUT,
207- .bmAttributes = USB_ENDPOINT_XFER_BULK,
208- .wMaxPacketSize = MAX_PACKET_SIZE_FS,
209- },
210- .sink = {
211- .bLength = sizeof(descriptors.fs_descs.sink),
212- .bDescriptorType = USB_DT_ENDPOINT,
213- .bEndpointAddress = 2 | USB_DIR_IN,
214- .bmAttributes = USB_ENDPOINT_XFER_BULK,
215- .wMaxPacketSize = MAX_PACKET_SIZE_FS,
216- },
217+ .sink = {
218+ .bLength = sizeof(ss_descriptors.sink),
219+ .bDescriptorType = USB_DT_ENDPOINT,
220+ .bEndpointAddress = 2 | USB_DIR_IN,
221+ .bmAttributes = USB_ENDPOINT_XFER_BULK,
222+ .wMaxPacketSize = MAX_PACKET_SIZE_SS,
223 },
224- .hs_descs = {
225- .intf = {
226- .bLength = sizeof(descriptors.hs_descs.intf),
227- .bDescriptorType = USB_DT_INTERFACE,
228- .bInterfaceNumber = 0,
229- .bNumEndpoints = 2,
230- .bInterfaceClass = ADB_CLASS,
231- .bInterfaceSubClass = ADB_SUBCLASS,
232- .bInterfaceProtocol = ADB_PROTOCOL,
233- .iInterface = 1, /* first string from the provided table */
234- },
235- .source = {
236- .bLength = sizeof(descriptors.hs_descs.source),
237- .bDescriptorType = USB_DT_ENDPOINT,
238- .bEndpointAddress = 1 | USB_DIR_OUT,
239- .bmAttributes = USB_ENDPOINT_XFER_BULK,
240- .wMaxPacketSize = MAX_PACKET_SIZE_HS,
241- },
242- .sink = {
243- .bLength = sizeof(descriptors.hs_descs.sink),
244- .bDescriptorType = USB_DT_ENDPOINT,
245- .bEndpointAddress = 2 | USB_DIR_IN,
246- .bmAttributes = USB_ENDPOINT_XFER_BULK,
247- .wMaxPacketSize = MAX_PACKET_SIZE_HS,
248- },
249+ .sink_comp = {
250+ .bLength = sizeof(ss_descriptors.sink_comp),
251+ .bDescriptorType = USB_DT_SS_ENDPOINT_COMP,
252+ .bMaxBurst = 4,
253 },
254 };
255
256+struct usb_ext_compat_desc os_desc_compat = {
257+ .bFirstInterfaceNumber = 0,
258+ .Reserved1 = cpu_to_le32(1),
259+ .CompatibleID = { 'W', 'I', 'N', 'U', 'S', 'B', '\0', '\0'},
260+ .SubCompatibleID = {0},
261+ .Reserved2 = {0},
262+};
263+
264+static struct usb_os_desc_header os_desc_header = {
265+ .interface = cpu_to_le32(0),
266+ .dwLength = cpu_to_le32(sizeof(os_desc_header) + sizeof(os_desc_compat)),
267+ .bcdVersion = cpu_to_le32(1),
268+ .wIndex = cpu_to_le32(4),
269+ .bCount = cpu_to_le32(1),
270+ .Reserved = cpu_to_le32(0),
271+};
272+
273+static struct usb_os_desc_header os_prop_header = {
274+ .interface = cpu_to_le32(0),
275+ .dwLength = cpu_to_le32(sizeof(os_desc_header) + sizeof(struct usb_ext_prop_values)),
276+ .bcdVersion = cpu_to_le32(1),
277+ .wIndex = cpu_to_le32(5),
278+ .wCount = cpu_to_le16(1),
279+};
280+
281 #define STR_INTERFACE_ "ADB Interface"
282
283 static const struct {
284@@ -151,8 +264,6 @@ static const struct {
285 },
286 };
287
288-
289-
290 static void *usb_adb_open_thread(void *x)
291 {
292 struct usb_handle *usb = (struct usb_handle *)x;
293@@ -270,6 +381,24 @@ static void usb_adb_init()
294 static void init_functionfs(struct usb_handle *h)
295 {
296 ssize_t ret;
297+ struct desc_v1 v1_descriptor = {};
298+ struct desc_v2 v2_descriptor = {};
299+
300+ v2_descriptor.header.magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC_V2);
301+ v2_descriptor.header.length = cpu_to_le32(sizeof(v2_descriptor));
302+ v2_descriptor.header.flags = FUNCTIONFS_HAS_FS_DESC | FUNCTIONFS_HAS_HS_DESC |
303+ FUNCTIONFS_HAS_SS_DESC | FUNCTIONFS_HAS_MS_OS_DESC;
304+ v2_descriptor.fs_count = 3;
305+ v2_descriptor.hs_count = 3;
306+ v2_descriptor.ss_count = 5;
307+ v2_descriptor.os_count = 2;
308+ v2_descriptor.fs_descs = fs_descriptors;
309+ v2_descriptor.hs_descs = hs_descriptors;
310+ v2_descriptor.ss_descs = ss_descriptors;
311+ v2_descriptor.os_header = os_desc_header;
312+ v2_descriptor.os_desc = os_desc_compat;
313+ v2_descriptor.os_prop_header = os_prop_header;
314+ v2_descriptor.os_prop_values.guid = os_desc_guid;
315
316 if (h->control < 0) { // might have already done this before
317 D("OPENING %s\n", USB_FFS_ADB_EP0);
318@@ -279,10 +408,20 @@ static void init_functionfs(struct usb_handle *h)
319 goto err;
320 }
321
322- ret = adb_write(h->control, &descriptors, sizeof(descriptors));
323+ ret = adb_write(h->control, &v2_descriptor, sizeof(v2_descriptor));
324 if (ret < 0) {
325- D("[ %s: write descriptors failed: errno=%d ]\n", USB_FFS_ADB_EP0, errno);
326- goto err;
327+ D("[ %s: write v2_descriptor failed: errno=%d ]\n", USB_FFS_ADB_EP0, errno);
328+ v1_descriptor.header.magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC);
329+ v1_descriptor.header.length = cpu_to_le32(sizeof(v1_descriptor));
330+ v1_descriptor.header.fs_count = 3;
331+ v1_descriptor.header.hs_count = 3;
332+ v1_descriptor.fs_descs = fs_descriptors;
333+ v1_descriptor.hs_descs = hs_descriptors;
334+ ret = adb_write(h->control, &v1_descriptor, sizeof(v1_descriptor));
335+ if (ret < 0) {
336+ D("[ %s: failed to write USB descriptors]\n", USB_FFS_ADB_EP0);
337+ goto err;
338+ }
339 }
340
341 ret = adb_write(h->control, &strings, sizeof(strings));
342--
3432.18.0
344
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch
deleted file mode 100644
index 5009c73a05..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1From 7b74d23ed955206a789a96bdc3288593e702afac Mon Sep 17 00:00:00 2001
2From: Sean Anderson <sean.anderson@seco.com>
3Date: Thu, 30 Dec 2021 15:16:08 -0500
4Subject: [PATCH] libsparse: Split off most of sparse_file_read_normal into a
5 helper function
6
7This carves out the core of sparse_file_read_normal and splits it off so
8it can be reused in the next patch. No functional change intended.
9
10Change-Id: Id00491fd7e5bb6fa28c517a0bb32b8b506539d4d
11Upstream-Status: Backport [95657f3e5976d96073f7bbfe3a49192509999d1d]
12Signed-off-by: Sean Anderson <sean.anderson@seco.com>
13---
14 libsparse/sparse_read.c | 21 ++++++++++++++++-----
15 1 file changed, 16 insertions(+), 5 deletions(-)
16
17diff --git a/libsparse/sparse_read.c b/libsparse/sparse_read.c
18index 8e188e9a4..ee4abd86a 100644
19--- a/libsparse/sparse_read.c
20+++ b/libsparse/sparse_read.c
21@@ -353,13 +353,11 @@ static int sparse_file_read_sparse(struct sparse_file *s, int fd, bool crc)
22 return 0;
23 }
24
25-static int sparse_file_read_normal(struct sparse_file *s, int fd)
26+static int do_sparse_file_read_normal(struct sparse_file *s, int fd, uint32_t* buf, int64_t offset,
27+ int64_t remain)
28 {
29 int ret;
30- uint32_t *buf = malloc(s->block_size);
31- unsigned int block = 0;
32- int64_t remain = s->len;
33- int64_t offset = 0;
34+ unsigned int block = offset / s->block_size;
35 unsigned int to_read;
36 unsigned int i;
37 bool sparse_block;
38@@ -403,6 +401,19 @@ static int sparse_file_read_normal(struct sparse_file *s, int fd)
39 return 0;
40 }
41
42+static int sparse_file_read_normal(struct sparse_file* s, int fd)
43+{
44+ int ret;
45+ uint32_t* buf = (uint32_t*)malloc(s->block_size);
46+
47+ if (!buf)
48+ return -ENOMEM;
49+
50+ ret = do_sparse_file_read_normal(s, fd, buf, 0, s->len);
51+ free(buf);
52+ return ret;
53+}
54+
55 int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc)
56 {
57 if (crc && !sparse) {
58--
592.35.1.1320.gc452695387.dirty
60
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch
deleted file mode 100644
index e5221d2b4c..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch
+++ /dev/null
@@ -1,188 +0,0 @@
1From 41574b628ec4229c24dfe289af7b6978edcca4ed Mon Sep 17 00:00:00 2001
2From: Sean Anderson <sean.anderson@seco.com>
3Date: Thu, 30 Dec 2021 15:19:41 -0500
4Subject: [PATCH] libsparse: Add "hole" mode to sparse_file_read
5
6This adds support for filesystem-level sparse files. These files have
7holes which are not stored in the filesystem and when read are full of
8zeros. While these zeros may be significant in some types of files,
9other types of files may not care about the contents of holes. For
10example, most filesystem creation tools write to all the blocks they
11care about. Those blocks not written to will remain holes, and can be
12safely represented by "don't care" chunks. Using "don't care" chunks
13instead of fill chunks can result in a substantial reduction of the time
14it takes to program a sparse image.
15
16To accomplish this, we extend the existing "sparse" boolean parameter to
17be an enum of mode types. This enum represents the strategy we take when
18reading in a file. For the most part the implementation is
19straightforward. We use lseek to determine where the holes in the file
20are, and then use do_sparse_file_read_normal to create chunks for the
21data section. Note that every file has an implicit hole at its end.
22
23Change-Id: I0cfbf08886fca9a91cb753ec8734c84fcbe52c9f
24Upstream-Status: Backport [f96466b05543b984ef7315d830bab4a409228d35]
25Signed-off-by: Sean Anderson <sean.anderson@seco.com>
26---
27 libsparse/img2simg.c | 2 +-
28 libsparse/include/sparse/sparse.h | 32 +++++++++++---
29 libsparse/sparse_read.c | 71 +++++++++++++++++++++++++++++--
30 3 files changed, 93 insertions(+), 12 deletions(-)
31
32diff --git a/libsparse/img2simg.c b/libsparse/img2simg.c
33index a0db36f45..2e171b613 100644
34--- a/libsparse/img2simg.c
35+++ b/libsparse/img2simg.c
36@@ -96,7 +96,7 @@ int main(int argc, char *argv[])
37 }
38
39 sparse_file_verbose(s);
40- ret = sparse_file_read(s, in, false, false);
41+ ret = sparse_file_read(s, in, SPARSE_READ_MODE_NORMAL, false);
42 if (ret) {
43 fprintf(stderr, "Failed to read file\n");
44 exit(-1);
45diff --git a/libsparse/include/sparse/sparse.h b/libsparse/include/sparse/sparse.h
46index 8b757d22a..b68aa21a8 100644
47--- a/libsparse/include/sparse/sparse.h
48+++ b/libsparse/include/sparse/sparse.h
49@@ -196,23 +196,41 @@ int64_t sparse_file_len(struct sparse_file *s, bool sparse, bool crc);
50 int sparse_file_callback(struct sparse_file *s, bool sparse, bool crc,
51 int (*write)(void *priv, const void *data, int len), void *priv);
52
53+/**
54+ * enum sparse_read_mode - The method to use when reading in files
55+ * @SPARSE_READ_MODE_NORMAL: The input is a regular file. Constant chunks of
56+ * data (including holes) will be be converted to
57+ * fill chunks.
58+ * @SPARSE_READ_MODE_SPARSE: The input is an Android sparse file.
59+ * @SPARSE_READ_MODE_HOLE: The input is a regular file. Holes will be converted
60+ * to "don't care" chunks. Other constant chunks will
61+ * be converted to fill chunks.
62+ */
63+enum sparse_read_mode {
64+ SPARSE_READ_MODE_NORMAL = false,
65+ SPARSE_READ_MODE_SPARSE = true,
66+ SPARSE_READ_MODE_HOLE,
67+};
68+
69 /**
70 * sparse_file_read - read a file into a sparse file cookie
71 *
72 * @s - sparse file cookie
73 * @fd - file descriptor to read from
74- * @sparse - read a file in the Android sparse file format
75+ * @mode - mode to use when reading the input file
76 * @crc - verify the crc of a file in the Android sparse file format
77 *
78- * Reads a file into a sparse file cookie. If sparse is true, the file is
79- * assumed to be in the Android sparse file format. If sparse is false, the
80- * file will be sparsed by looking for block aligned chunks of all zeros or
81- * another 32 bit value. If crc is true, the crc of the sparse file will be
82- * verified.
83+ * Reads a file into a sparse file cookie. If @mode is
84+ * %SPARSE_READ_MODE_SPARSE, the file is assumed to be in the Android sparse
85+ * file format. If @mode is %SPARSE_READ_MODE_NORMAL, the file will be sparsed
86+ * by looking for block aligned chunks of all zeros or another 32 bit value. If
87+ * @mode is %SPARSE_READ_MODE_HOLE, the file will be sparsed like
88+ * %SPARSE_READ_MODE_NORMAL, but holes in the file will be converted to "don't
89+ * care" chunks. If crc is true, the crc of the sparse file will be verified.
90 *
91 * Returns 0 on success, negative errno on error.
92 */
93-int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc);
94+int sparse_file_read(struct sparse_file *s, int fd, enum sparse_read_mode mode, bool crc);
95
96 /**
97 * sparse_file_import - import an existing sparse file
98diff --git a/libsparse/sparse_read.c b/libsparse/sparse_read.c
99index ee4abd86a..81f48cc13 100644
100--- a/libsparse/sparse_read.c
101+++ b/libsparse/sparse_read.c
102@@ -414,16 +414,79 @@ static int sparse_file_read_normal(struct sparse_file* s, int fd)
103 return ret;
104 }
105
106-int sparse_file_read(struct sparse_file *s, int fd, bool sparse, bool crc)
107+#ifdef __linux__
108+static int sparse_file_read_hole(struct sparse_file* s, int fd)
109 {
110- if (crc && !sparse) {
111+ int ret;
112+ uint32_t* buf = (uint32_t*)malloc(s->block_size);
113+ int64_t end = 0;
114+ int64_t start = 0;
115+
116+ if (!buf) {
117+ return -ENOMEM;
118+ }
119+
120+ do {
121+ start = lseek(fd, end, SEEK_DATA);
122+ if (start < 0) {
123+ if (errno == ENXIO)
124+ /* The rest of the file is a hole */
125+ break;
126+
127+ error("could not seek to data");
128+ free(buf);
129+ return -errno;
130+ } else if (start > s->len) {
131+ break;
132+ }
133+
134+ end = lseek(fd, start, SEEK_HOLE);
135+ if (end < 0) {
136+ error("could not seek to end");
137+ free(buf);
138+ return -errno;
139+ }
140+ end = min(end, s->len);
141+
142+ start = ALIGN_DOWN(start, s->block_size);
143+ end = ALIGN(end, s->block_size);
144+ if (lseek(fd, start, SEEK_SET) < 0) {
145+ free(buf);
146+ return -errno;
147+ }
148+
149+ ret = do_sparse_file_read_normal(s, fd, buf, start, end - start);
150+ if (ret) {
151+ free(buf);
152+ return ret;
153+ }
154+ } while (end < s->len);
155+
156+ free(buf);
157+ return 0;
158+}
159+#else
160+static int sparse_file_read_hole(struct sparse_file* s __unused, int fd __unused)
161+{
162+ return -ENOTSUP;
163+}
164+#endif
165+
166+int sparse_file_read(struct sparse_file *s, int fd, enum sparse_read_mode mode, bool crc)
167+{
168+ if (crc && mode != SPARSE_READ_MODE_SPARSE) {
169 return -EINVAL;
170 }
171
172- if (sparse) {
173+ switch (mode) {
174+ case SPARSE_READ_MODE_SPARSE:
175 return sparse_file_read_sparse(s, fd, crc);
176- } else {
177+ case SPARSE_READ_MODE_NORMAL:
178 return sparse_file_read_normal(s, fd);
179+ case SPARSE_READ_MODE_HOLE:
180+ return sparse_file_read_hole(s, fd);
181+ default:
182+ return -EINVAL;
183 }
184 }
185
186--
1872.35.1.1320.gc452695387.dirty
188
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch
deleted file mode 100644
index 9d19f58095..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch
+++ /dev/null
@@ -1,114 +0,0 @@
1From 00cce57eff1a0de3b93efa5da225e9eb33d19659 Mon Sep 17 00:00:00 2001
2From: Sean Anderson <sean.anderson@seco.com>
3Date: Thu, 30 Dec 2021 15:34:28 -0500
4Subject: [PATCH] img2simg: Add support for converting holes to "don't care"
5 chunks
6
7This adds support for converting files with holes to "don't care"
8chunks. This can result in a substantial reduction in the time it takes
9to program an image if it has many holes.
10
11Generally, constants compared to argc have been reduced by one, since we
12no longer have the program name as the first argument.
13
14Change-Id: I00750edc07d6415dcc07ae0351e9397b0222b7ba
15Upstream-Status: Backport [6150b00b6025918da8c28e5c2f929ecdf480a9d6]
16Signed-off-by: Sean Anderson <sean.anderson@seco.com>
17---
18 libsparse/img2simg.c | 41 ++++++++++++++++++++++++++++++-----------
19 1 file changed, 30 insertions(+), 11 deletions(-)
20
21diff --git a/libsparse/img2simg.c b/libsparse/img2simg.c
22index 2e171b613..c985d5449 100644
23--- a/libsparse/img2simg.c
24+++ b/libsparse/img2simg.c
25@@ -40,25 +40,42 @@
26
27 void usage()
28 {
29- fprintf(stderr, "Usage: img2simg <raw_image_file> <sparse_image_file> [<block_size>]\n");
30+ fprintf(stderr, "Usage: img2simg [-s] <raw_image_file> <sparse_image_file> [<block_size>]\n");
31 }
32
33 int main(int argc, char *argv[])
34 {
35+ char *arg_in;
36+ char *arg_out;
37+ enum sparse_read_mode mode = SPARSE_READ_MODE_NORMAL;
38+ int extra;
39 int in;
40+ int opt;
41 int out;
42 int ret;
43 struct sparse_file *s;
44 unsigned int block_size = 4096;
45 off64_t len;
46
47- if (argc < 3 || argc > 4) {
48+ while ((opt = getopt(argc, argv, "s")) != -1) {
49+ switch (opt) {
50+ case 's':
51+ mode = SPARSE_READ_MODE_HOLE;
52+ break;
53+ default:
54+ usage();
55+ exit(-1);
56+ }
57+ }
58+
59+ extra = argc - optind;
60+ if (extra < 2 || extra > 3) {
61 usage();
62 exit(-1);
63 }
64
65- if (argc == 4) {
66- block_size = atoi(argv[3]);
67+ if (extra == 3) {
68+ block_size = atoi(argv[optind + 2]);
69 }
70
71 if (block_size < 1024 || block_size % 4 != 0) {
72@@ -66,22 +83,24 @@ int main(int argc, char *argv[])
73 exit(-1);
74 }
75
76- if (strcmp(argv[1], "-") == 0) {
77+ arg_in = argv[optind];
78+ if (strcmp(arg_in, "-") == 0) {
79 in = STDIN_FILENO;
80 } else {
81- in = open(argv[1], O_RDONLY | O_BINARY);
82+ in = open(arg_in, O_RDONLY | O_BINARY);
83 if (in < 0) {
84- fprintf(stderr, "Cannot open input file %s\n", argv[1]);
85+ fprintf(stderr, "Cannot open input file %s\n", arg_in);
86 exit(-1);
87 }
88 }
89
90- if (strcmp(argv[2], "-") == 0) {
91+ arg_out = argv[optind + 1];
92+ if (strcmp(arg_out, "-") == 0) {
93 out = STDOUT_FILENO;
94 } else {
95- out = open(argv[2], O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0664);
96+ out = open(arg_out, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, 0664);
97 if (out < 0) {
98- fprintf(stderr, "Cannot open output file %s\n", argv[2]);
99+ fprintf(stderr, "Cannot open output file %s\n", arg_out);
100 exit(-1);
101 }
102 }
103@@ -96,7 +115,7 @@ int main(int argc, char *argv[])
104 }
105
106 sparse_file_verbose(s);
107- ret = sparse_file_read(s, in, SPARSE_READ_MODE_NORMAL, false);
108+ ret = sparse_file_read(s, in, mode, false);
109 if (ret) {
110 fprintf(stderr, "Failed to read file\n");
111 exit(-1);
112--
1132.35.1.1320.gc452695387.dirty
114
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff b/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff
deleted file mode 100644
index ddb41ea4b0..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/adb_libssl_11.diff
+++ /dev/null
@@ -1,48 +0,0 @@
1Description: adb: Make compatible with openssl 1.1
2 OpenSSL version 1.1 brought some API changes which broke the build here,
3 fix that by accessing rsa->n (and e) directly, using RSA_get0_key instead.
4Author: Chirayu Desai <chirayudesai1@gmail.com
5Last-Update: 2016-11-10
6---
7Upstream-Status: Pending
8
9This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
10---
11Upstream-Status: Pending
12
13 system/core/adb/adb_auth_host.c | 5 +++--
14 1 file changed, 3 insertions(+), 2 deletions(-)
15
16--- a/adb/adb_auth_host.c
17+++ b/adb/adb_auth_host.c
18@@ -75,6 +75,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
19 BIGNUM* rem = BN_new();
20- BIGNUM* n = BN_new();
21+ const BIGNUM* n;
22 BIGNUM* n0inv = BN_new();
23+ const BIGNUM* e;
24
25 if (RSA_size(rsa) != RSANUMBYTES) {
26 ret = 0;
27@@ -82,7 +83,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
28 }
29
30 BN_set_bit(r32, 32);
31- BN_copy(n, rsa->n);
32+ RSA_get0_key(rsa, &n, &e, NULL);
33 BN_set_bit(r, RSANUMWORDS * 32);
34 BN_mod_sqr(rr, r, n, ctx);
35 BN_div(NULL, rem, n, r32, ctx);
36@@ -96,11 +97,10 @@ static int RSA_to_RSAPublicKey(RSA *rsa,
37 BN_div(n, rem, n, r32, ctx);
38 pkey->n[i] = BN_get_word(rem);
39 }
40- pkey->exponent = BN_get_word(rsa->e);
41+ pkey->exponent = BN_get_word(e);
42
43 out:
44 BN_free(n0inv);
45- BN_free(n);
46 BN_free(rem);
47 BN_free(r);
48 BN_free(rr);
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/core/b64_pton_function_decl.patch b/meta-oe/recipes-devtools/android-tools/android-tools/core/b64_pton_function_decl.patch
deleted file mode 100644
index 80410f1d2b..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/core/b64_pton_function_decl.patch
+++ /dev/null
@@ -1,14 +0,0 @@
1Add protoype declaration for b64_pton
2
3Upstream-Status: Pending
4Signed-off-by: Khem Raj <raj.khem@gmail.com>
5--- a/adb/adb_auth_client.c
6+++ b/adb/adb_auth_client.c
7@@ -29,6 +29,7 @@
8
9 #define TRACE_TAG TRACE_AUTH
10
11+extern int b64_pton(const char* src, uint8_t* target, size_t targsize);
12
13 struct adb_public_key {
14 struct listnode node;
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-allow-notifying-systemd.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-allow-notifying-systemd.patch
new file mode 100644
index 0000000000..a5caf39c80
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-allow-notifying-systemd.patch
@@ -0,0 +1,41 @@
1From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
2Date: Fri, 30 Sep 2022 16:54:02 +0200
3Subject: adb: daemon: allow notifying systemd when ready
4
5When using `systemd` on Linux, we should allow `adbd` to notify
6`systemd` once it has started and configured its USB/network interface.
7This allows us to (for example) wait for the daemon to bind to the
8FunctionFS endpoints, then activate the USB gadget.
9
10Forwarded: https://android-review.googlesource.com/c/platform/packages/modules/adb/+/2238429
11Upstream-Status: Inappropriate [Debian-specific]
12---
13 packages/modules/adb/daemon/main.cpp | 8 ++++++++
14 1 file changed, 8 insertions(+)
15
16diff --git a/packages/modules/adb/daemon/main.cpp b/packages/modules/adb/daemon/main.cpp
17index d1b999b..deba593 100644
18--- a/packages/modules/adb/daemon/main.cpp
19+++ b/packages/modules/adb/daemon/main.cpp
20@@ -49,6 +49,10 @@
21 #include "selinux/android.h"
22 #endif
23
24+#if defined(__linux__)
25+#include <systemd/sd-daemon.h>
26+#endif
27+
28 #include "adb.h"
29 #include "adb_auth.h"
30 #include "adb_listeners.h"
31@@ -302,6 +306,10 @@ int adbd_main(int server_port) {
32 init_jdwp();
33 D("adbd_main(): post init_jdwp()");
34
35+#if defined(__linux__)
36+ sd_notify(1, "READY=1");
37+#endif
38+
39 D("Event loop starting");
40 fdevent_loop();
41
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-allow-usb-on-linux.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-allow-usb-on-linux.patch
new file mode 100644
index 0000000000..76e2427fc2
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-allow-usb-on-linux.patch
@@ -0,0 +1,28 @@
1From: Julien Massot <julien.massot@collabora.com>
2Date: Mon, 5 Sep 2022 16:00:12 +0200
3Subject: adb: daemon: allow binding to USB on Linux systems
4
5Linux systems are also capable of using FunctionFS for USB gadget
6configurations. This requires creating a specific gadget configuration
7using ConfigFS (including an `ffs.adb` function) and mounting
8FunctionFS to `/dev/usb-ffs/adb`.
9
10Forwarded: https://android-review.googlesource.com/c/platform/packages/modules/adb/+/2238428
11Upstream-Status: Inappropriate [Debian-specific]
12---
13 packages/modules/adb/daemon/main.cpp | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/packages/modules/adb/daemon/main.cpp b/packages/modules/adb/daemon/main.cpp
17index 188272a..6c949c1 100644
18--- a/packages/modules/adb/daemon/main.cpp
19+++ b/packages/modules/adb/daemon/main.cpp
20@@ -251,7 +251,7 @@ int adbd_main(int server_port) {
21
22 bool is_usb = false;
23
24-#if defined(__ANDROID__)
25+#if defined(__linux__)
26 if (access(USB_FFS_ADB_EP0, F_OK) == 0) {
27 // Listen on USB.
28 usb_init();
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-don-t-require-authorization-on-Linux.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-don-t-require-authorization-on-Linux.patch
new file mode 100644
index 0000000000..5d3ed124bc
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-don-t-require-authorization-on-Linux.patch
@@ -0,0 +1,27 @@
1From 2427e520751b13a6e0a409f427f1ec9b23e63447 Mon Sep 17 00:00:00 2001
2From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
3Date: Wed, 3 May 2023 18:36:06 +0200
4Subject: [PATCH] adb: daemon: don't require authorization on Linux
5
6Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
7Upstream-Status: Inappropriate [Debian-specific]
8---
9 packages/modules/adb/daemon/main.cpp | 2 ++
10 1 file changed, 2 insertions(+)
11
12diff --git a/packages/modules/adb/daemon/main.cpp b/packages/modules/adb/daemon/main.cpp
13index 188272ae3..02a57f4e2 100644
14--- a/packages/modules/adb/daemon/main.cpp
15+++ b/packages/modules/adb/daemon/main.cpp
16@@ -224,6 +224,8 @@ int adbd_main(int server_port) {
17 auth_required = android::base::GetBoolProperty("ro.adb.secure", false);
18 #endif
19 }
20+#else
21+ auth_required = false;
22 #endif
23
24 // Our external storage path may be different than apps, since
25--
262.39.2
27
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-usb-drop-property-monitor.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-usb-drop-property-monitor.patch
new file mode 100644
index 0000000000..0f1d3f7a6f
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-adbd-adbd-usb-drop-property-monitor.patch
@@ -0,0 +1,57 @@
1From ba56ee6f092601932f9146eeb4f8b057da157be2 Mon Sep 17 00:00:00 2001
2From: Arnaud Ferraris <arnaud.ferraris@collabora.com>
3Date: Tue, 2 May 2023 17:16:22 +0200
4Subject: [PATCH] adb: daemon: usb: drop property monitor
5
6This is an Android-only feature not available on Linux.
7Upstream-Status: Inappropriate [Debian-specific]
8---
9 packages/modules/adb/daemon/usb.cpp | 6 ++++++
10 1 file changed, 6 insertions(+)
11
12diff --git a/packages/modules/adb/daemon/usb.cpp b/packages/modules/adb/daemon/usb.cpp
13index ec22f6661..e904a7629 100644
14--- a/packages/modules/adb/daemon/usb.cpp
15+++ b/packages/modules/adb/daemon/usb.cpp
16@@ -48,7 +48,9 @@
17
18 #include "adb_unique_fd.h"
19 #include "adb_utils.h"
20+#if defined(__ANDROID__)
21 #include "daemon/property_monitor.h"
22+#endif
23 #include "daemon/usb_ffs.h"
24 #include "sysdeps/chrono.h"
25 #include "transfer_id.h"
26@@ -744,6 +746,7 @@ struct UsbFfsConnection : public Connection {
27 static void usb_ffs_open_thread() {
28 adb_thread_setname("usb ffs open");
29
30+#if defined(__ANDROID__)
31 // When the device is acting as a USB host, we'll be unable to bind to the USB gadget on kernels
32 // that don't carry a downstream patch to enable that behavior.
33 //
34@@ -757,6 +760,7 @@ static void usb_ffs_open_thread() {
35 // Return false (i.e. break out of PropertyMonitor::Run) when the property != 1.
36 return android::base::ParseBool(value) == android::base::ParseBoolResult::kTrue;
37 });
38+#endif
39
40 while (true) {
41 unique_fd control;
42@@ -767,11 +771,13 @@ static void usb_ffs_open_thread() {
43 continue;
44 }
45
46+#if defined(__ANDROID__)
47 if (android::base::GetBoolProperty(kPropertyUsbDisabled, false)) {
48 LOG(INFO) << "pausing USB due to " << kPropertyUsbDisabled;
49 prop_mon.Run();
50 LOG(INFO) << "resuming USB";
51 }
52+#endif
53
54 atransport* transport = new atransport();
55 transport->serial = "UsbFfs";
56--
572.39.2
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-dev-typos.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-dev-typos.patch
new file mode 100644
index 0000000000..2ac7d66bd4
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-dev-typos.patch
@@ -0,0 +1,16 @@
1Description: Fix typos
2Author: Kai-Chung Yan (殷啟聰)
3Last-Update: 2016-10-01
4Forwarded: not-needed
5Upstream-Status: Inappropriate [Debian-specific]
6--- a/development/tools/etc1tool/etc1tool.cpp
7+++ b/development/tools/etc1tool/etc1tool.cpp
8@@ -56,7 +56,7 @@
9 "\t\t image to difffile. (Only valid when encoding).\n");
10 fprintf(stderr,
11 "\tIf outfile is not specified, an outfile path is constructed from infile,\n");
12- fprintf(stderr, "\twith the apropriate suffix (.pkm or .png).\n");
13+ fprintf(stderr, "\twith the appropriate suffix (.pkm or .png).\n");
14 exit(1);
15 }
16
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-Nullable.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-Nullable.patch
new file mode 100644
index 0000000000..e9a9a91bfb
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-Nullable.patch
@@ -0,0 +1,14 @@
1Description: Bring Clang's _Nullable keyword to GCC
2 This patch is for gcc only, no need for clang.
3Forwarded: not-needed
4Upstream-Status: Inappropriate [Debian-specific]
5--- a/libnativehelper/file_descriptor_jni.c
6+++ b/libnativehelper/file_descriptor_jni.c
7@@ -22,6 +22,7 @@
8 #include "ALog-priv.h"
9
10 #include "JniConstants.h"
11+#define _Nullable
12
13 static void EnsureArgumentIsFileDescriptor(JNIEnv* env, jobject instance) {
14 ALOG_ALWAYS_FATAL_IF(instance == NULL, "FileDescriptor is NULL");
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-stdatomic.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-stdatomic.patch
new file mode 100644
index 0000000000..ed670eacf4
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-stdatomic.patch
@@ -0,0 +1,68 @@
1Description: Fix incompatibility between <stdatomic.h> and <atomic>
2 This 2 headers combined will cause errors for both GCC and Clang. This patch
3 makes sure only one of them is present at any time.
4 .
5 This patch is for gcc only, no need for clang.
6Bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60932
7Bug: https://reviews.llvm.org/D45470
8Forwarded: not-needed
9Upstream-Status: Inappropriate [Debian-specific]
10--- a/system/core/libcutils/include/cutils/atomic.h
11+++ b/system/core/libcutils/include/cutils/atomic.h
12@@ -19,7 +19,23 @@
13
14 #include <stdint.h>
15 #include <sys/types.h>
16+#ifdef __cplusplus
17+#include <atomic>
18+using std::atomic_compare_exchange_strong_explicit;
19+using std::atomic_fetch_add_explicit;
20+using std::atomic_fetch_or_explicit;
21+using std::atomic_fetch_sub_explicit;
22+using std::atomic_int_least32_t;
23+using std::atomic_load_explicit;
24+using std::atomic_store_explicit;
25+using std::atomic_thread_fence;
26+using std::memory_order::memory_order_acquire;
27+using std::memory_order::memory_order_relaxed;
28+using std::memory_order::memory_order_release;
29+using std::memory_order::memory_order_seq_cst;
30+#else
31 #include <stdatomic.h>
32+#endif
33
34 #ifndef ANDROID_ATOMIC_INLINE
35 #define ANDROID_ATOMIC_INLINE static inline
36--- a/system/core/libcutils/include/cutils/trace.h
37+++ b/system/core/libcutils/include/cutils/trace.h
38@@ -18,7 +18,14 @@
39 #define _LIBS_CUTILS_TRACE_H
40
41 #include <inttypes.h>
42+#ifdef __cplusplus
43+#include <atomic>
44+using std::atomic_bool;
45+using std::atomic_load_explicit;
46+using std::memory_order_acquire;
47+#else
48 #include <stdatomic.h>
49+#endif
50 #include <stdbool.h>
51 #include <stdint.h>
52 #include <stdio.h>
53--- a/system/logging/liblog/logger.h
54+++ b/system/logging/liblog/logger.h
55@@ -16,7 +16,13 @@
56
57 #pragma once
58
59+#ifdef __cplusplus
60+#include <atomic>
61+using std::atomic_int;
62+using std::atomic_uintptr_t;
63+#else
64 #include <stdatomic.h>
65+#endif
66 #include <sys/cdefs.h>
67
68 #include <log/log.h>
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-workaround__builtin_available.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-workaround__builtin_available.patch
new file mode 100644
index 0000000000..60ca08cc24
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-gcc-workaround__builtin_available.patch
@@ -0,0 +1,148 @@
1Description: Workaround Clang's __builtin_available keyword
2 This patch is for gcc only, no need for clang.
3Forwarded: not-needed
4Upstream-Status: Inappropriate [Debian-specific]
5--- a/system/libbase/logging.cpp
6+++ b/system/libbase/logging.cpp
7@@ -209,8 +209,9 @@ static std::recursive_mutex& TagLock() {
8 static std::string* gDefaultTag;
9
10 void SetDefaultTag(const std::string& tag) {
11- if (__builtin_available(android 30, *)) {
12+// if (__builtin_available(android 30, *)) {
13 __android_log_set_default_tag(tag.c_str());
14+#if 0
15 } else {
16 std::lock_guard<std::recursive_mutex> lock(TagLock());
17 if (gDefaultTag != nullptr) {
18@@ -221,6 +222,7 @@ void SetDefaultTag(const std::string& tag) {
19 gDefaultTag = new std::string(tag);
20 }
21 }
22+#endif
23 }
24
25 static bool gInitialized = false;
26@@ -314,13 +316,15 @@ static void LogdLogChunk(LogId id, LogSeverity severity, const char* tag, const
27 int32_t lg_id = LogIdTolog_id_t(id);
28 int32_t priority = LogSeverityToPriority(severity);
29
30- if (__builtin_available(android 30, *)) {
31+// if (__builtin_available(android 30, *)) {
32 __android_log_message log_message = {sizeof(__android_log_message), lg_id, priority, tag,
33 static_cast<const char*>(nullptr), 0, message};
34 __android_log_logd_logger(&log_message);
35+#if 0
36 } else {
37 __android_log_buf_print(lg_id, priority, tag, "%s", message);
38 }
39+#endif
40 }
41
42 LogdLogger::LogdLogger(LogId default_log_id) : default_log_id_(default_log_id) {}
43@@ -396,7 +400,7 @@ LogFunction SetLogger(LogFunction&& logger) {
44 LogFunction old_logger = std::move(Logger());
45 Logger() = std::move(logger);
46
47- if (__builtin_available(android 30, *)) {
48+// if (__builtin_available(android 30, *)) {
49 __android_log_set_logger([](const struct __android_log_message* log_message) {
50 auto log_id = log_id_tToLogId(log_message->buffer_id);
51 auto severity = PriorityToLogSeverity(log_message->priority);
52@@ -404,7 +408,7 @@ LogFunction SetLogger(LogFunction&& logger) {
53 Logger()(log_id, severity, log_message->tag, log_message->file, log_message->line,
54 log_message->message);
55 });
56- }
57+// }
58 return old_logger;
59 }
60
61@@ -412,9 +416,9 @@ AbortFunction SetAborter(AbortFunction&& aborter) {
62 AbortFunction old_aborter = std::move(Aborter());
63 Aborter() = std::move(aborter);
64
65- if (__builtin_available(android 30, *)) {
66+// if (__builtin_available(android 30, *)) {
67 __android_log_set_aborter([](const char* abort_message) { Aborter()(abort_message); });
68- }
69+// }
70 return old_aborter;
71 }
72
73@@ -500,11 +504,13 @@ LogMessage::~LogMessage() {
74
75 // Abort if necessary.
76 if (data_->GetSeverity() == FATAL) {
77- if (__builtin_available(android 30, *)) {
78+// if (__builtin_available(android 30, *)) {
79 __android_log_call_aborter(msg.c_str());
80+#if 0
81 } else {
82 Aborter()(msg.c_str());
83 }
84+#endif
85 }
86 }
87
88@@ -515,10 +521,11 @@ std::ostream& LogMessage::stream() {
89 void LogMessage::LogLine(const char* file, unsigned int line, LogSeverity severity, const char* tag,
90 const char* message) {
91 int32_t priority = LogSeverityToPriority(severity);
92- if (__builtin_available(android 30, *)) {
93+// if (__builtin_available(android 30, *)) {
94 __android_log_message log_message = {
95 sizeof(__android_log_message), LOG_ID_DEFAULT, priority, tag, file, line, message};
96 __android_log_write_log_message(&log_message);
97+#if 0
98 } else {
99 if (tag == nullptr) {
100 std::lock_guard<std::recursive_mutex> lock(TagLock());
101@@ -531,37 +538,44 @@ void LogMessage::LogLine(const char* file, unsigned int line, LogSeverity severi
102 Logger()(DEFAULT, severity, tag, file, line, message);
103 }
104 }
105+#endif
106 }
107
108 LogSeverity GetMinimumLogSeverity() {
109- if (__builtin_available(android 30, *)) {
110+// if (__builtin_available(android 30, *)) {
111 return PriorityToLogSeverity(__android_log_get_minimum_priority());
112+#if 0
113 } else {
114 return gMinimumLogSeverity;
115 }
116+#endif
117 }
118
119 bool ShouldLog(LogSeverity severity, const char* tag) {
120 // Even though we're not using the R liblog functions in this function, if we're running on Q,
121 // we need to fall back to using gMinimumLogSeverity, since __android_log_is_loggable() will not
122 // take into consideration the value from SetMinimumLogSeverity().
123- if (__builtin_available(android 30, *)) {
124+// if (__builtin_available(android 30, *)) {
125 int32_t priority = LogSeverityToPriority(severity);
126 return __android_log_is_loggable(priority, tag, ANDROID_LOG_INFO);
127+#if 0
128 } else {
129 return severity >= gMinimumLogSeverity;
130 }
131+#endif
132 }
133
134 LogSeverity SetMinimumLogSeverity(LogSeverity new_severity) {
135- if (__builtin_available(android 30, *)) {
136+// if (__builtin_available(android 30, *)) {
137 int32_t priority = LogSeverityToPriority(new_severity);
138 return PriorityToLogSeverity(__android_log_set_minimum_priority(priority));
139+#if 0
140 } else {
141 LogSeverity old_severity = gMinimumLogSeverity;
142 gMinimumLogSeverity = new_severity;
143 return old_severity;
144 }
145+#endif
146 }
147
148 ScopedLogSeverity::ScopedLogSeverity(LogSeverity new_severity) {
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Added-missing-headers.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Added-missing-headers.patch
new file mode 100644
index 0000000000..38ff305870
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Added-missing-headers.patch
@@ -0,0 +1,15 @@
1Description: Added missing headers causing compile errors
2Author: Umang Parmar <umangjparmar@gmail.com>
3Forwarded: not-needed
4
5Upstream-Status: Inappropriate [Debian-specific]
6--- a/packages/modules/adb/pairing_connection/pairing_server.cpp
7+++ b/packages/modules/adb/pairing_connection/pairing_server.cpp
8@@ -20,6 +20,7 @@
9 #include <sys/eventfd.h>
10
11 #include <atomic>
12+#include <condition_variable>
13 #include <deque>
14 #include <iomanip>
15 #include <mutex>
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Drop-gki-dependency-from-mkbootimg.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Drop-gki-dependency-from-mkbootimg.patch
new file mode 100644
index 0000000000..6b940df707
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Drop-gki-dependency-from-mkbootimg.patch
@@ -0,0 +1,114 @@
1Description: Drop gki dependency from mkbootimg
2 `mkbootimg` is currently unusable due to a missing `gki` python
3 module. This module is only needed for signing GKI boot images, which
4 is deprecated as the argument group description implies.
5 This patch disables this (deprecated) signature feature entirely as
6 it's unlikely Debian users will actually need it.
7Author: Arnaud Ferraris <aferraris@debian.org>
8Forwarded: not-needed
9Upstream-Status: Inappropriate [Debian-specific]
10--- a/system/tools/mkbootimg/mkbootimg.py
11+++ b/system/tools/mkbootimg/mkbootimg.py
12@@ -28,8 +28,6 @@ import os
13 import re
14 import tempfile
15
16-from gki.generate_gki_certificate import generate_gki_certificate
17-
18 # Constant and structure definition is in
19 # system/tools/mkbootimg/include/bootimg/bootimg.h
20 BOOT_MAGIC = 'ANDROID!'
21@@ -105,12 +103,6 @@ def get_recovery_dtbo_offset(args):
22 return dtbo_offset
23
24
25-def should_add_legacy_gki_boot_signature(args):
26- if args.gki_signing_key and args.gki_signing_algorithm:
27- return True
28- return False
29-
30-
31 def write_header_v3_and_above(args):
32 if args.header_version > 3:
33 boot_header_size = BOOT_IMAGE_HEADER_V4_SIZE
34@@ -134,8 +126,6 @@ def write_header_v3_and_above(args):
35 if args.header_version >= 4:
36 # The signature used to verify boot image v4.
37 boot_signature_size = 0
38- if should_add_legacy_gki_boot_signature(args):
39- boot_signature_size = BOOT_IMAGE_V4_SIGNATURE_SIZE
40 args.output.write(pack('I', boot_signature_size))
41 pad_file(args.output, BOOT_IMAGE_HEADER_V3_PAGESIZE)
42
43@@ -549,19 +539,6 @@ def parse_cmdline():
44 parser.add_argument('--vendor_bootconfig', type=FileType('rb'),
45 help='path to the vendor bootconfig file')
46
47- gki_2_0_signing_args = parser.add_argument_group(
48- '[DEPRECATED] GKI 2.0 signing arguments')
49- gki_2_0_signing_args.add_argument(
50- '--gki_signing_algorithm', help='GKI signing algorithm to use')
51- gki_2_0_signing_args.add_argument(
52- '--gki_signing_key', help='path to RSA private key file')
53- gki_2_0_signing_args.add_argument(
54- '--gki_signing_signature_args', default='',
55- help='other hash arguments passed to avbtool')
56- gki_2_0_signing_args.add_argument(
57- '--gki_signing_avbtool_path', default='avbtool',
58- help='path to avbtool for boot signature generation')
59-
60 args, extra_args = parser.parse_known_args()
61 if args.vendor_boot is not None and args.header_version > 3:
62 extra_args = parse_vendor_ramdisk_args(args, extra_args)
63@@ -577,42 +554,6 @@ def parse_cmdline():
64 return args
65
66
67-def add_boot_image_signature(args, pagesize):
68- """Adds the boot image signature.
69-
70- Note that the signature will only be verified in VTS to ensure a
71- generic boot.img is used. It will not be used by the device
72- bootloader at boot time. The bootloader should only verify
73- the boot vbmeta at the end of the boot partition (or in the top-level
74- vbmeta partition) via the Android Verified Boot process, when the
75- device boots.
76- """
77- # Flush the buffer for signature calculation.
78- args.output.flush()
79-
80- # Outputs the signed vbmeta to a separate file, then append to boot.img
81- # as the boot signature.
82- with tempfile.TemporaryDirectory() as temp_out_dir:
83- boot_signature_output = os.path.join(temp_out_dir, 'boot_signature')
84- generate_gki_certificate(
85- image=args.output.name, avbtool=args.gki_signing_avbtool_path,
86- name='boot', algorithm=args.gki_signing_algorithm,
87- key=args.gki_signing_key, salt='d00df00d',
88- additional_avb_args=args.gki_signing_signature_args.split(),
89- output=boot_signature_output,
90- )
91- with open(boot_signature_output, 'rb') as boot_signature:
92- boot_signature_bytes = boot_signature.read()
93- if len(boot_signature_bytes) > BOOT_IMAGE_V4_SIGNATURE_SIZE:
94- raise ValueError(
95- f'boot sigature size is > {BOOT_IMAGE_V4_SIGNATURE_SIZE}')
96- boot_signature_bytes += b'\x00' * (
97- BOOT_IMAGE_V4_SIGNATURE_SIZE - len(boot_signature_bytes))
98- assert len(boot_signature_bytes) == BOOT_IMAGE_V4_SIGNATURE_SIZE
99- args.output.write(boot_signature_bytes)
100- pad_file(args.output, pagesize)
101-
102-
103 def write_data(args, pagesize):
104 write_padded_file(args.output, args.kernel, pagesize)
105 write_padded_file(args.output, args.ramdisk, pagesize)
106@@ -622,8 +563,6 @@ def write_data(args, pagesize):
107 write_padded_file(args.output, args.recovery_dtbo, pagesize)
108 if args.header_version == 2:
109 write_padded_file(args.output, args.dtb, pagesize)
110- if args.header_version >= 4 and should_add_legacy_gki_boot_signature(args):
111- add_boot_image_signature(args, pagesize)
112
113
114 def write_vendor_boot_data(args):
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Implement-const_iterator-operator.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Implement-const_iterator-operator.patch
new file mode 100644
index 0000000000..4679edd537
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-Implement-const_iterator-operator.patch
@@ -0,0 +1,37 @@
1Description: Implement const_iterator::operator--
2Forwarded: not-needed
3
4Needed for
5android-platform-frameworks-base/libs/androidfw/LoadedArsc.cpp
6when compiling against libstdc++.
7Upstream-Status: Inappropriate [Debian-specific]
8---
9--- a/system/incremental_delivery/incfs/util/include/util/map_ptr.h
10+++ b/system/incremental_delivery/incfs/util/include/util/map_ptr.h
11@@ -180,6 +180,11 @@ public:
12 return *this;
13 }
14
15+ const const_iterator& operator--() {
16+ safe_ptr_--;
17+ return *this;
18+ }
19+
20 const_iterator& operator+=(int n) {
21 safe_ptr_ = safe_ptr_ + n;
22 return *this;
23@@ -321,6 +326,14 @@ public:
24 return temp;
25 }
26
27+ template <typename T1 = T, NotVoid<T1> = 0>
28+ const map_ptr<T1> operator--(int) {
29+ map_ptr<T1> temp = *this;
30+ LIBINCFS_MAP_PTR_DEBUG_CODE(verified_ = false);
31+ --ptr_;
32+ return temp;
33+ }
34+
35 template <typename S, typename T1 = T, NotVoid<T1> = 0>
36 map_ptr<T1> operator+(const S n) const {
37 return map_ptr<T1>(map_, ptr_ + n, verified_block_);
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-add-missing-headers.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-add-missing-headers.patch
new file mode 100644
index 0000000000..b0bac72320
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-add-missing-headers.patch
@@ -0,0 +1,13 @@
1Description: add missing headers
2Forwarded: not-needed
3Upstream-Status: Inappropriate [Debian-specific]
4--- a/system/core/fastboot/fastboot_driver_interface.h
5+++ b/system/core/fastboot/fastboot_driver_interface.h
6@@ -17,6 +17,7 @@
7
8 #include <string>
9
10+#include <stdint.h>
11 #include "android-base/unique_fd.h"
12
13 class Transport;
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-hard-code-build-number.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-hard-code-build-number.patch
new file mode 100644
index 0000000000..7555ba6406
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-hard-code-build-number.patch
@@ -0,0 +1,57 @@
1Description: just hard code rather than deal with circular deps
2Forwarded: not-needed
3Upstream-Status: Inappropriate [Debian-specific]
4--- a/packages/modules/adb/adb.cpp
5+++ b/packages/modules/adb/adb.cpp
6@@ -47,9 +47,6 @@
7 #include <android-base/utf8.h>
8 #include <diagnose_usb.h>
9
10-#include <build/version.h>
11-#include <platform_tools_version.h>
12-
13 #include "adb_auth.h"
14 #include "adb_io.h"
15 #include "adb_listeners.h"
16@@ -100,7 +97,7 @@
17 "Installed as %s\n"
18 "Running on %s\n",
19 ADB_VERSION_MAJOR, ADB_VERSION_MINOR, ADB_SERVER_VERSION, PLATFORM_TOOLS_VERSION,
20- android::build::GetBuildNumber().c_str(), android::base::GetExecutablePath().c_str(),
21+ "debian", android::base::GetExecutablePath().c_str(),
22 GetOSVersion().c_str());
23 }
24
25@@ -1339,7 +1339,7 @@ HostRequestResult handle_host_request(std::string_view service, TransportType ty
26 status.set_mdns_backend_forced(getenv("ADB_MDNS_OPENSCREEN") != nullptr);
27
28 status.set_version(std::string(PLATFORM_TOOLS_VERSION));
29- status.set_build(android::build::GetBuildNumber());
30+ status.set_build("debian");
31 status.set_executable_absolute_path(android::base::GetExecutablePath());
32 status.set_log_absolute_path(GetLogFilePath());
33 status.set_os(GetOSVersion());
34--- a/system/core/fastboot/fastboot.cpp
35+++ b/system/core/fastboot/fastboot.cpp
36@@ -64,11 +64,9 @@
37 #include <android-base/stringprintf.h>
38 #include <android-base/strings.h>
39 #include <android-base/unique_fd.h>
40-#include <build/version.h>
41 #include <libavb/libavb.h>
42 #include <liblp/liblp.h>
43 #include <liblp/super_layout_builder.h>
44-#include <platform_tools_version.h>
45 #include <sparse/sparse.h>
46 #include <ziparchive/zip_archive.h>
47
48@@ -1962,8 +1960,7 @@
49 setvbuf(stdout, nullptr, _IONBF, 0);
50 setvbuf(stderr, nullptr, _IONBF, 0);
51 } else if (name == "version") {
52- fprintf(stdout, "fastboot version %s-%s\n", PLATFORM_TOOLS_VERSION,
53- android::build::GetBuildNumber().c_str());
54+ fprintf(stdout, "fastboot version %s-%s\n", PLATFORM_TOOLS_VERSION, "debian");
55 fprintf(stdout, "Installed as %s\n", android::base::GetExecutablePath().c_str());
56 return 0;
57 } else {
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-libusb-header-path.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-libusb-header-path.patch
new file mode 100644
index 0000000000..9a15ec1a19
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-libusb-header-path.patch
@@ -0,0 +1,17 @@
1Description: libusb.h comes from different location
2Author: Umang Parmar <umangjparmar@gmail.com>
3Forwarded: not-needed
4Last-Update: 2018-05-26
5
6Upstream-Status: Inappropriate [Debian-specific]
7--- a/packages/modules/adb/client/usb_libusb.cpp
8+++ b/packages/modules/adb/client/usb_libusb.cpp
9@@ -36,7 +36,7 @@
10 #include <unordered_map>
11 #include <vector>
12
13-#include <libusb/libusb.h>
14+#include <libusb-1.0/libusb.h>
15
16 #include <android-base/file.h>
17 #include <android-base/logging.h>
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-move-log-file-to-proper-dir.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-move-log-file-to-proper-dir.patch
new file mode 100644
index 0000000000..201ec62bca
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-move-log-file-to-proper-dir.patch
@@ -0,0 +1,19 @@
1Description: Update log file directory.
2Author: Umang Parmar <umangjparmar@gmail.com>
3Last Updated: 2018-05-17
4
5Upstream-Status: Inappropriate [Debian-specific]
6--- a/packages/modules/adb/adb_utils.cpp
7+++ b/packages/modules/adb/adb_utils.cpp
8@@ -343,6 +343,11 @@
9
10 return temp_path_utf8 + log_name;
11 #else
12+ std::string log_dir = android::base::StringPrintf("/run/user/%u/adb.log", getuid());
13+ struct stat st = {0};
14+ if (stat(log_dir.c_str(), &st) == 0) {
15+ return log_dir;
16+ }
17 const char* tmp_dir = getenv("TMPDIR");
18 if (tmp_dir == nullptr) tmp_dir = "/tmp";
19 return android::base::StringPrintf("%s/adb.%u.log", tmp_dir, getuid());
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-stub-out-fastdeploy.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-stub-out-fastdeploy.patch
new file mode 100644
index 0000000000..fb16cff79a
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-stub-out-fastdeploy.patch
@@ -0,0 +1,99 @@
1Description: Defer packaging fastdeploy with adb for 29.x.x tags.
2Forwarded: not-needed
3Upstream-Status: Inappropriate [Debian-specific]
4--- a/packages/modules/adb/client/adb_install.cpp
5+++ b/packages/modules/adb/client/adb_install.cpp
6@@ -185,14 +185,6 @@
7 }
8
9 if (use_fastdeploy) {
10- auto metadata = extract_metadata(file);
11- if (metadata.has_value()) {
12- // pass all but 1st (command) and last (apk path) parameters through to pm for
13- // session creation
14- std::vector<const char*> pm_args{argv + 1, argv + argc - 1};
15- auto patchFd = install_patch(pm_args.size(), pm_args.data());
16- return stream_patch(file, std::move(metadata.value()), std::move(patchFd));
17- }
18 }
19
20 struct stat sb;
21@@ -280,16 +272,6 @@
22 argv[last_apk] = apk_dest.c_str(); /* destination name, not source location */
23
24 if (use_fastdeploy) {
25- auto metadata = extract_metadata(apk_file[0]);
26- if (metadata.has_value()) {
27- auto patchFd = apply_patch_on_device(apk_dest.c_str());
28- int status = stream_patch(apk_file[0], std::move(metadata.value()), std::move(patchFd));
29-
30- result = pm_command(argc, argv);
31- delete_device_file(apk_dest);
32-
33- return status;
34- }
35 }
36
37 if (do_sync_push(apk_file, apk_dest.c_str(), false, CompressionType::Any, false, false)) {
38@@ -457,7 +439,6 @@
39 std::vector<const char*> argv, bool* use_fastdeploy,
40 FastDeploy_AgentUpdateStrategy* agent_update_strategy) {
41 *use_fastdeploy = false;
42- *agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
43
44 std::vector<const char*> passthrough;
45 for (auto&& arg : argv) {
46@@ -466,11 +447,8 @@
47 } else if (arg == "--no-fastdeploy"sv) {
48 *use_fastdeploy = false;
49 } else if (arg == "--force-agent"sv) {
50- *agent_update_strategy = FastDeploy_AgentUpdateAlways;
51 } else if (arg == "--date-check-agent"sv) {
52- *agent_update_strategy = FastDeploy_AgentUpdateNewerTimeStamp;
53 } else if (arg == "--version-check-agent"sv) {
54- *agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
55 } else {
56 passthrough.push_back(arg);
57 }
58@@ -484,12 +462,11 @@
59 bool incremental_wait = false;
60
61 bool use_fastdeploy = false;
62- FastDeploy_AgentUpdateStrategy agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion;
63
64 auto unused_argv = parse_install_mode({argv, argv + argc}, &install_mode, &incremental_request,
65 &incremental_wait);
66 auto passthrough_argv =
67- parse_fast_deploy_mode(std::move(unused_argv), &use_fastdeploy, &agent_update_strategy);
68+ parse_fast_deploy_mode(std::move(unused_argv), &use_fastdeploy, nullptr);
69
70 auto [primary_mode, fallback_mode] =
71 calculate_install_mode(install_mode, use_fastdeploy, incremental_request);
72@@ -499,14 +476,11 @@
73 error_exit("Attempting to use streaming install on unsupported device");
74 }
75
76- if (use_fastdeploy && get_device_api_level() < kFastDeployMinApi) {
77- fprintf(stderr,
78- "Fast Deploy is only compatible with devices of API version %d or higher, "
79- "ignoring.\n",
80- kFastDeployMinApi);
81+ if (use_fastdeploy) {
82+ printf("Fast Deploy is unavailable in this build of adb, "
83+ "ignoring.\n");
84 use_fastdeploy = false;
85 }
86- fastdeploy_set_agent_update_strategy(agent_update_strategy);
87
88 if (passthrough_argv.size() < 2) {
89 error_exit("install requires an apk argument");
90--- a/packages/modules/adb/client/commandline.cpp
91+++ b/packages/modules/adb/client/commandline.cpp
92@@ -63,7 +63,6 @@
93 #include "bugreport.h"
94 #include "client/file_sync_client.h"
95 #include "commandline.h"
96-#include "fastdeploy.h"
97 #include "incremental_server.h"
98 #include "services.h"
99 #include "shell_protocol.h"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-throw-exception-on-unknown-os.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-throw-exception-on-unknown-os.patch
new file mode 100644
index 0000000000..2e254e0d46
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-throw-exception-on-unknown-os.patch
@@ -0,0 +1,17 @@
1Description: Turn #error into exceptions
2 So the library can be built on non-Linux platforms too, although can't
3 guarauntee its functionality regarding that piece of code.
4Forwarded: not-needed
5Upstream-Status: Inappropriate [Debian-specific]
6--- a/system/libbase/file.cpp
7+++ b/system/libbase/file.cpp
8@@ -461,7 +461,8 @@
9 #elif defined(__EMSCRIPTEN__)
10 abort();
11 #else
12-#error unknown OS
13+#include <stdexcept>
14+ throw std::runtime_error(std::string("Unknown OS!"));
15 #endif
16 }
17
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-unwindstack-porting.patch b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-unwindstack-porting.patch
new file mode 100644
index 0000000000..8bcfa8fe27
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools/debian/deb-sys-unwindstack-porting.patch
@@ -0,0 +1,14 @@
1Description: unwindstack porting
2Forwarded: not-needed
3Upstream-Status: Inappropriate [Debian-specific]
4--- a/system/unwinding/libunwindstack/include/unwindstack/RegsGetLocal.h
5+++ b/system/unwinding/libunwindstack/include/unwindstack/RegsGetLocal.h
6@@ -123,7 +123,7 @@
7 : "t1", "memory");
8 }
9
10-#elif defined(__i386__) || defined(__x86_64__)
11+#else
12
13 // Do not change this, some libraries depend on this function existing on
14 // these architectures.
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/ext4_utils.mk b/meta-oe/recipes-devtools/android-tools/android-tools/ext4_utils.mk
deleted file mode 100644
index c18aa9c4d2..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/ext4_utils.mk
+++ /dev/null
@@ -1,103 +0,0 @@
1# Makefile for ext4_utils
2
3SRCDIR ?= $(S)
4
5VPATH += $(SRCDIR)/system/extras/ext4_utils
6make_ext4fs_SRC_FILES += make_ext4fs_main.c
7make_ext4fs_SRC_FILES += canned_fs_config.c
8make_ext4fs_OBJS := $(make_ext4fs_SRC_FILES:.c=.o)
9
10ext2simg_SRC_FILES += ext2simg.c
11ext2simg_OBJS := $(ext2simg_SRC_FILES:.c=.o)
12
13ext4fixup_SRC_FILES += ext4fixup_main.c
14ext4fixup_OBJS := $(ext4fixup_SRC_FILES:.c=.o)
15
16libext4_utils_SRC_FILES += make_ext4fs.c
17libext4_utils_SRC_FILES += ext4fixup.c
18libext4_utils_SRC_FILES += ext4_utils.c
19libext4_utils_SRC_FILES += allocate.c
20libext4_utils_SRC_FILES += contents.c
21libext4_utils_SRC_FILES += extent.c
22libext4_utils_SRC_FILES += indirect.c
23libext4_utils_SRC_FILES += uuid.c
24libext4_utils_SRC_FILES += sha1.c
25libext4_utils_SRC_FILES += wipe.c
26libext4_utils_SRC_FILES += crc16.c
27libext4_utils_SRC_FILES += ext4_sb.c
28libext4_utils_OBJS := $(libext4_utils_SRC_FILES:.c=.o)
29
30VPATH += $(SRCDIR)/system/core/libsparse
31simg2img_SRC_FILES += simg2img.c
32simg2img_SRC_FILES += sparse_crc32.c
33simg2img_OBJS := $(simg2img_SRC_FILES:.c=.o)
34
35img2simg_SRC_FILES += img2simg.c
36img2simg_OBJS := $(img2simg_SRC_FILES:.c=.o)
37
38simg2simg_SRC_FILES += simg2simg.c
39simg2simg_SRC_FILES += sparse_crc32.c
40simg2simg_OBJS := $(simg2simg_SRC_FILES:.c=.o)
41
42libsparse_SRC_FILES += backed_block.c
43libsparse_SRC_FILES += output_file.c
44libsparse_SRC_FILES += sparse.c
45libsparse_SRC_FILES += sparse_crc32.c
46libsparse_SRC_FILES += sparse_err.c
47libsparse_SRC_FILES += sparse_read.c
48libsparse_OBJS := $(libsparse_SRC_FILES:.c=.o)
49
50VPATH += $(SRCDIR)/external/libselinux/src
51libselinux_SRC_FILES += callbacks.c
52libselinux_SRC_FILES += check_context.c
53libselinux_SRC_FILES += freecon.c
54libselinux_SRC_FILES += init.c
55libselinux_SRC_FILES += label.c
56libselinux_SRC_FILES += label_file.c
57libselinux_SRC_FILES += label_android_property.c
58libselinux_OBJS := $(libselinux_SRC_FILES:.c=.o)
59
60CFLAGS += -DANDROID
61CFLAGS += -DHOST
62CFLAGS += -I$(SRCDIR)/system/extras/ext4_utils
63CFLAGS += -I$(SRCDIR)/system/core/include
64CFLAGS += -I$(SRCDIR)/system/core/libsparse/include
65CFLAGS += -I$(SRCDIR)/external/libselinux/include
66CFLAGS += -include $(SRCDIR)/build/core/combo/include/arch/$(android_arch)/AndroidConfig.h
67
68all: make_ext4fs ext2simg ext4fixup simg2img img2simg simg2simg
69
70make_ext4fs: libext4_utils.a libsparse.a libselinux.a $(make_ext4fs_OBJS)
71 $(CC) -o $@ $(LDFLAGS) $(make_ext4fs_OBJS) \
72 libext4_utils.a libsparse.a libselinux.a -lz -lpcre
73
74ext2simg: libext4_utils.a libselinux.a libsparse.a $(ext2simg_OBJS)
75 $(CC) -o $@ $(LDFLAGS) $(ext2simg_OBJS) \
76 libext4_utils.a libselinux.a libsparse.a -lz -lpcre
77
78ext4fixup: libext4_utils.a libsparse.a $(ext4fixup_OBJS)
79 $(CC) -o $@ $(LDFLAGS) $(ext4fixup_OBJS) libext4_utils.a libsparse.a -lz
80
81simg2img: libsparse.a $(simg2img_OBJS)
82 $(CC) -o $@ $(LDFLAGS) $(simg2img_OBJS) libsparse.a -lz
83
84img2simg: libsparse.a $(img2simg_OBJS)
85 $(CC) -o $@ $(LDFLAGS) $(img2simg_OBJS) libsparse.a -lz
86
87simg2simg: libsparse.a $(simg2simg_OBJS)
88 $(CC) -o $@ $(LDFLAGS) $(simg2simg_OBJS) libsparse.a -lz
89
90libext4_utils.a: $(libext4_utils_OBJS)
91 $(AR) rcs $@ $(libext4_utils_OBJS)
92
93libsparse.a: $(libsparse_OBJS)
94 $(AR) rcs $@ $(libsparse_OBJS)
95
96libselinux.a: $(libselinux_OBJS)
97 $(AR) rcs $@ $(libselinux_OBJS)
98
99clean:
100 $(RM) $(make_ext4fs_OBJS) $(ext2simg_OBJS) $(ext4fixup_OBJS) \
101 $(simg2img_OBJS) $(img2simg_OBJS) $(simg2simg_OBJS) \
102 $(libext4_utils_OBJS) $(libsparse_OBJS) $(libselinux_OBJS) \
103 make_ext4fs ext2simg ext4fixup simg2img img2simg simg2simg *.a
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0001-ext4_utils-remove-selinux-extensions.patch b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0001-ext4_utils-remove-selinux-extensions.patch
deleted file mode 100644
index 4a19a5d65a..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0001-ext4_utils-remove-selinux-extensions.patch
+++ /dev/null
@@ -1,39 +0,0 @@
1From 354604da9d152f1931e91991d3f34197fc8fc759 Mon Sep 17 00:00:00 2001
2From: Sergio Schvezov <sergio.schvezov@canonical.com>
3Date: Tue, 2 Oct 2018 16:36:54 +0000
4Subject: [PATCH] ext4_utils: remove selinux extensions
5
6* drop useless includes of Android SELINUX extensions
7* avoids having to clone another module
8* this should be sent upstream
9
10Upstream-Status: Inappropriate
11---
12 ext4_utils/make_ext4fs.c | 1 -
13 ext4_utils/make_ext4fs_main.c | 1 -
14 2 files changed, 2 deletions(-)
15
16diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
17index 2f89ae8a0..732afbed7 100644
18--- a/ext4_utils/make_ext4fs.c
19+++ b/ext4_utils/make_ext4fs.c
20@@ -62,7 +62,6 @@
21
22 #include <selinux/selinux.h>
23 #include <selinux/label.h>
24-#include <selinux/android.h>
25
26 #define O_BINARY 0
27
28diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c
29index a6c5f6160..f8e7b9da9 100644
30--- a/ext4_utils/make_ext4fs_main.c
31+++ b/ext4_utils/make_ext4fs_main.c
32@@ -32,7 +32,6 @@
33 #ifndef USE_MINGW
34 #include <selinux/selinux.h>
35 #include <selinux/label.h>
36-#include <selinux/android.h>
37 #else
38 struct selabel_handle;
39 #endif
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch
deleted file mode 100644
index 3b50ffbf36..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch
+++ /dev/null
@@ -1,78 +0,0 @@
1From b9254539811ce912bfd16dd1d185eba7a10cceff Mon Sep 17 00:00:00 2001
2From: Markus Mayer <mmayer@mmayer.net>
3Date: Wed, 7 Sep 2016 12:58:47 +0300
4Subject: [PATCH] ext4_utils: add -o argument to preserve ownership
5
6See also https://android-review.googlesource.com/#/c/100312/
7
8Upstream-Status: Inappropriate
9---
10 ext4_utils/make_ext4fs.c | 6 ++++++
11 ext4_utils/make_ext4fs_main.c | 10 ++++++++--
12 2 files changed, 14 insertions(+), 2 deletions(-)
13
14diff --git a/ext4_utils/make_ext4fs.c b/ext4_utils/make_ext4fs.c
15index 732afbed7..2cbf04399 100644
16--- a/ext4_utils/make_ext4fs.c
17+++ b/ext4_utils/make_ext4fs.c
18@@ -67,6 +67,8 @@
19
20 #endif
21
22+int preserve_owner = 0;
23+
24 /* TODO: Not implemented:
25 Allocating blocks in the same block group as the file inode
26 Hash or binary tree directories
27@@ -185,6 +187,10 @@ static u32 build_directory_structure(const char *full_path, const char *dir_path
28 } else {
29 dentries[i].mtime = fixed_time;
30 }
31+ if (preserve_owner) {
32+ dentries[i].uid = stat.st_uid;
33+ dentries[i].gid = stat.st_gid;
34+ }
35 uint64_t capabilities;
36 if (fs_config_func != NULL) {
37 #ifdef ANDROID
38diff --git a/ext4_utils/make_ext4fs_main.c b/ext4_utils/make_ext4fs_main.c
39index f8e7b9da9..e82d43277 100644
40--- a/ext4_utils/make_ext4fs_main.c
41+++ b/ext4_utils/make_ext4fs_main.c
42@@ -47,13 +47,15 @@ struct selabel_handle;
43 extern struct fs_info info;
44
45
46+extern int preserve_owner;
47+
48 static void usage(char *path)
49 {
50 fprintf(stderr, "%s [ -l <len> ] [ -j <journal size> ] [ -b <block_size> ]\n", basename(path));
51 fprintf(stderr, " [ -g <blocks per group> ] [ -i <inodes> ] [ -I <inode size> ]\n");
52 fprintf(stderr, " [ -L <label> ] [ -f ] [ -a <android mountpoint> ]\n");
53 fprintf(stderr, " [ -S file_contexts ] [ -C fs_config ] [ -T timestamp ]\n");
54- fprintf(stderr, " [ -z | -s ] [ -w ] [ -c ] [ -J ] [ -v ] [ -B <block_list_file> ]\n");
55+ fprintf(stderr, " [ -z | -s ] [ -w ] [ -c ] [ -J ] [ -o ] [ -v ] [ -B <block_list_file> ]\n");
56 fprintf(stderr, " <filename> [<directory>]\n");
57 }
58
59@@ -79,7 +81,7 @@ int main(int argc, char **argv)
60 struct selinux_opt seopts[] = { { SELABEL_OPT_PATH, "" } };
61 #endif
62
63- while ((opt = getopt(argc, argv, "l:j:b:g:i:I:L:a:S:T:C:B:fwzJsctv")) != -1) {
64+ while ((opt = getopt(argc, argv, "l:j:b:g:i:I:L:a:S:T:C:B:fwzJsctov")) != -1) {
65 switch (opt) {
66 case 'l':
67 info.len = parse_num(optarg);
68@@ -142,6 +144,10 @@ int main(int argc, char **argv)
69 }
70 #endif
71 break;
72+ case 'o':
73+ preserve_owner = 1;
74+ printf("Warning: Enabling 'preserve ownership', this is an unofficial feature!\n");
75+ break;
76 case 'v':
77 verbose = 1;
78 break;
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch b/meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch
deleted file mode 100644
index b77c0ebc13..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch
+++ /dev/null
@@ -1,69 +0,0 @@
1From c9f8cb184a7218c97ff966db44da6dd814c0e273 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@gmail.com>
3Date: Fri, 21 Mar 2025 09:49:32 +0000
4Subject: [PATCH] ext4_utils: drop unused parameter from allocate_inode()
5
6* fixes build with gcc-15:
7 http://errors.yoctoproject.org/Errors/Details/848455/
8
9TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_directory':
10TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:115:29: error: too many arguments to function 'allocate_inode'; expected 0, have 1
11 115 | inode_num = allocate_inode(info);
12 | ^~~~~~~~~~~~~~ ~~~~
13In file included from TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:32:
14TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here
15 61 | u32 allocate_inode();
16 | ^~~~~~~~~~~~~~
17TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_file':
18TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:183:21: error: too many arguments to function 'allocate_inode'; expected 0, have 1
19 183 | inode_num = allocate_inode(info);
20 | ^~~~~~~~~~~~~~ ~~~~
21TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here
22 61 | u32 allocate_inode();
23 | ^~~~~~~~~~~~~~
24TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c: In function 'make_link':
25TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/contents.c:218:21: error: too many arguments to function 'allocate_inode'; expected 0, have 1
26 218 | inode_num = allocate_inode(info);
27 | ^~~~~~~~~~~~~~ ~~~~
28TOPDIR/tmp/work/core2-64-oe-linux/android-tools/5.1.1.r37/git/system/extras/ext4_utils/allocate.h:61:5: note: declared here
29 61 | u32 allocate_inode();
30 | ^~~~~~~~~~~~~~
31make: *** [<builtin>: contents.o] Error 1
32
33Upstream-Status: Pending [this whole code was removed in newer version android-9.0.0_r1 https://android.googlesource.com/platform/system/extras/+/7a837fcd6e9c0e0219f743052c78cc1c5988dfaf]
34Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
35---
36 ext4_utils/contents.c | 6 +++---
37 1 file changed, 3 insertions(+), 3 deletions(-)
38
39diff --git a/ext4_utils/contents.c b/ext4_utils/contents.c
40index 3144de93f..ac1b71706 100644
41--- a/ext4_utils/contents.c
42+++ b/ext4_utils/contents.c
43@@ -112,7 +112,7 @@ u32 make_directory(u32 dir_inode_num, u32 entries, struct dentry *dentries,
44 len = blocks * info.block_size;
45
46 if (dir_inode_num) {
47- inode_num = allocate_inode(info);
48+ inode_num = allocate_inode();
49 } else {
50 dir_inode_num = EXT4_ROOT_INO;
51 inode_num = EXT4_ROOT_INO;
52@@ -180,7 +180,7 @@ u32 make_file(const char *filename, u64 len)
53 struct ext4_inode *inode;
54 u32 inode_num;
55
56- inode_num = allocate_inode(info);
57+ inode_num = allocate_inode();
58 if (inode_num == EXT4_ALLOCATE_FAILED) {
59 error("failed to allocate inode\n");
60 return EXT4_ALLOCATE_FAILED;
61@@ -215,7 +215,7 @@ u32 make_link(const char *link)
62 u32 inode_num;
63 u32 len = strlen(link);
64
65- inode_num = allocate_inode(info);
66+ inode_num = allocate_inode();
67 if (inode_num == EXT4_ALLOCATE_FAILED) {
68 error("failed to allocate inode\n");
69 return EXT4_ALLOCATE_FAILED;
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/fastboot.mk b/meta-oe/recipes-devtools/android-tools/android-tools/fastboot.mk
deleted file mode 100644
index b9ba95f38a..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/fastboot.mk
+++ /dev/null
@@ -1,89 +0,0 @@
1# Makefile for fastboot
2
3SRCDIR ?= $(S)
4
5VPATH += $(SRCDIR)/system/core/fastboot
6fastboot_SRC_FILES += protocol.c
7fastboot_SRC_FILES += engine.c
8fastboot_SRC_FILES += bootimg.c
9fastboot_SRC_FILES += fastboot.c
10fastboot_SRC_FILES += util.c
11fastboot_SRC_FILES += fs.c
12fastboot_SRC_FILES += usb_linux.c
13fastboot_SRC_FILES += util_linux.c
14fastboot_OBJS := $(fastboot_SRC_FILES:.c=.o)
15
16VPATH += $(SRCDIR)/system/core/libzipfile
17libzipfile_SRC_FILES += centraldir.c
18libzipfile_SRC_FILES += zipfile.c
19libzipfile_OBJS := $(libzipfile_SRC_FILES:.c=.o)
20
21VPATH += $(SRCDIR)/system/extras/ext4_utils
22libext4_utils_SRC_FILES += make_ext4fs.c
23libext4_utils_SRC_FILES += ext4fixup.c
24libext4_utils_SRC_FILES += ext4_utils.c
25libext4_utils_SRC_FILES += allocate.c
26libext4_utils_SRC_FILES += contents.c
27libext4_utils_SRC_FILES += extent.c
28libext4_utils_SRC_FILES += indirect.c
29libext4_utils_SRC_FILES += uuid.c
30libext4_utils_SRC_FILES += sha1.c
31libext4_utils_SRC_FILES += wipe.c
32libext4_utils_SRC_FILES += crc16.c
33libext4_utils_SRC_FILES += ext4_sb.c
34libext4_utils_OBJS := $(libext4_utils_SRC_FILES:.c=.o)
35
36VPATH += $(SRCDIR)/system/core/libsparse
37libsparse_SRC_FILES += backed_block.c
38libsparse_SRC_FILES += output_file.c
39libsparse_SRC_FILES += sparse.c
40libsparse_SRC_FILES += sparse_crc32.c
41libsparse_SRC_FILES += sparse_err.c
42libsparse_SRC_FILES += sparse_read.c
43libsparse_OBJS := $(libsparse_SRC_FILES:.c=.o)
44
45VPATH += $(SRCDIR)/external/libselinux/src
46libselinux_SRC_FILES += callbacks.c
47libselinux_SRC_FILES += check_context.c
48libselinux_SRC_FILES += freecon.c
49libselinux_SRC_FILES += init.c
50libselinux_SRC_FILES += label.c
51libselinux_SRC_FILES += label_file.c
52libselinux_SRC_FILES += label_android_property.c
53libselinux_OBJS := $(libselinux_SRC_FILES:.c=.o)
54
55CFLAGS += -std=gnu11
56CFLAGS += -DANDROID
57# CFLAGS += -DUSE_F2FS
58CFLAGS += -DHOST
59CFLAGS += -I$(SRCDIR)/system/core/fastboot
60CFLAGS += -I$(SRCDIR)/system/core/include
61CFLAGS += -I$(SRCDIR)/system/core/mkbootimg
62CFLAGS += -I$(SRCDIR)/system/extras/ext4_utils
63CFLAGS += -I$(SRCDIR)/system/extras/f2fs_utils
64CFLAGS += -I$(SRCDIR)/system/core/libsparse/include
65CFLAGS += -I$(SRCDIR)/external/libselinux/include
66CFLAGS += -include $(SRCDIR)/build/core/combo/include/arch/$(android_arch)/AndroidConfig.h
67
68LIBS += libzipfile.a libext4_utils.a libsparse.a libselinux.a -lz -lpcre
69
70all: fastboot
71
72fastboot: libzipfile.a libext4_utils.a libsparse.a libselinux.a $(fastboot_OBJS)
73 $(CC) -o $@ $(LDFLAGS) $(fastboot_OBJS) $(LIBS)
74
75libzipfile.a: $(libzipfile_OBJS)
76 $(AR) rcs $@ $(libzipfile_OBJS)
77
78libext4_utils.a: $(libext4_utils_OBJS)
79 $(AR) rcs $@ $(libext4_utils_OBJS)
80
81libsparse.a: $(libsparse_OBJS)
82 $(AR) rcs $@ $(libsparse_OBJS)
83
84libselinux.a: $(libselinux_OBJS)
85 $(AR) rcs $@ $(libselinux_OBJS)
86
87clean:
88 $(RM) $(fastboot_OBJS) $(libzipfile_OBJS) $(libext4_utils_OBJS) \
89 $(libsparse_OBJS) $(libselinux_OBJS) fastboot *.a
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/gitignore b/meta-oe/recipes-devtools/android-tools/android-tools/gitignore
deleted file mode 100644
index b034c10a1e..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/gitignore
+++ /dev/null
@@ -1,59 +0,0 @@
1*
2!.gitignore
3!*.indirectionsymlink
4!*.[ch]
5!*.mk
6!*.patch
7!*.service
8!NOTICE
9!MODULE_LICENSE_*
10!/system/
11!/system/core/
12!/system/core/adb/
13!/system/core/fastboot/
14!/system/core/fs_mgr/
15!/system/core/fs_mgr/include/
16!/system/core/include/
17!/system/core/include/android/
18!/system/core/include/cutils/
19!/system/core/include/log/
20!/system/core/include/mincrypt/
21!/system/core/include/private/
22!/system/core/include/utils/
23!/system/core/include/zipfile/
24!/system/core/liblog/
25!/system/core/liblog/tests/
26!/system/core/libcutils/
27!/system/core/libmincrypt/
28!/system/core/libzipfile/
29!/system/core/libsparse/
30!/system/core/libsparse/include/
31!/system/core/libsparse/include/sparse/
32!/system/core/libsparse/simg_dump.py
33!/system/core/mkbootimg/
34!/system/extras/
35!/system/extras/ext4_utils/
36!/system/extras/ext4_utils/mkuserimg.sh
37!/system/extras/ext4_utils/test_ext4fixup
38!/system/extras/f2fs_utils/
39!/hardware/
40!/hardware/libhardware/
41!/hardware/libhardware/include/
42!/hardware/libhardware/include/hardware/
43!/external/
44!/external/libselinux/
45!/external/libselinux/include/
46!/external/libselinux/include/selinux/
47!/external/libselinux/src/
48!/external/f2fs-tools/
49!/external/f2fs-tools/include/
50!/external/f2fs-tools/lib/
51!/external/f2fs-tools/mkfs/
52!/build/
53!/build/core/
54!/build/core/version_defaults.mk
55!/build/core/combo/
56!/build/core/combo/include/
57!/build/core/combo/include/arch/
58!/build/core/combo/include/arch/linux-*/
59!/build/core/combo/include/arch/linux-*/AndroidConfig.h
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-Remove-bionic-specific-calls.patch b/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-Remove-bionic-specific-calls.patch
deleted file mode 100644
index 9de2593df8..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-Remove-bionic-specific-calls.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From 36654a4484117e5f4d63a810c0d94bc9c7ee3a83 Mon Sep 17 00:00:00 2001
2From: Fathi Boudra <fabo@debian.org>
3Date: Tue, 2 Oct 2018 16:36:54 +0000
4Subject: [PATCH] Remove bionic specific calls
5
6Upstream-Status: Inappropriate
7
8Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
9---
10 src/procattr.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
12
13diff --git a/src/procattr.c b/src/procattr.c
14index f350808..761cf8e 100644
15--- a/src/procattr.c
16+++ b/src/procattr.c
17@@ -8,7 +8,7 @@
18 #include "selinux_internal.h"
19 #include "policy.h"
20
21-#ifdef HOST
22+#ifndef __BIONIC__
23 static pid_t gettid(void)
24 {
25 return syscall(__NR_gettid);
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch b/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch
deleted file mode 100644
index 8b5e4cf999..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From f4f9d24860e1b5cd4f6a014f3fda7cd33ebe5be7 Mon Sep 17 00:00:00 2001
2From: Petr Lautrbach <plautrba@redhat.com>
3Date: Sat, 27 Jul 2019 08:20:20 -0700
4Subject: [PATCH] libselinux: Do not define gettid() if glibc >= 2.30 is used
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Since version 2.30 glibc implements gettid() system call wrapper, see
10https://sourceware.org/bugzilla/show_bug.cgi?id=6399
11
12Fixes:
13cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -I../include -D_GNU_SOURCE -DNO_ANDROID_BACKEND -c -o procattr.o procattr.c
14procattr.c:28:14: error: static declaration of ‘gettid’ follows non-static declaration
15 28 | static pid_t gettid(void)
16 | ^~~~~~
17In file included from /usr/include/unistd.h:1170,
18 from procattr.c:2:
19/usr/include/bits/unistd_ext.h:34:16: note: previous declaration of ‘gettid’ was here
20 34 | extern __pid_t gettid (void) __THROW;
21 | ^~~~~~
22
23Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
24Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
25Signed-off-by: Khem Raj <raj.khem@gmail.com>
26---
27Upstream-Status: Pending
28
29 src/procattr.c | 14 +++++++++++++-
30 1 file changed, 13 insertions(+), 1 deletion(-)
31
32--- a/src/procattr.c
33+++ b/src/procattr.c
34@@ -8,12 +8,16 @@
35 #include "selinux_internal.h"
36 #include "policy.h"
37
38-#ifndef __BIONIC__
39+/* Bionic and glibc >= 2.30 declare gettid() system call wrapper in unistd.h and
40+ * has a definition for it */
41+#if defined(__GLIBC_)
42+#if !__GLIBC_PREREQ(2,30)
43 static pid_t gettid(void)
44 {
45 return syscall(__NR_gettid);
46 }
47 #endif
48+#endif
49
50 static int getprocattrcon(char ** context,
51 pid_t pid, const char *attr)
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/mkbootimg.mk b/meta-oe/recipes-devtools/android-tools/android-tools/mkbootimg.mk
deleted file mode 100644
index 519f609fd2..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools/mkbootimg.mk
+++ /dev/null
@@ -1,29 +0,0 @@
1# Makefile for mkbootimg
2
3SRCDIR ?= $(S)
4
5VPATH += $(SRCDIR)/system/core/mkbootimg
6mkbootimg_SRC_FILES += mkbootimg.c
7mkbootimg_OBJS := $(mkbootimg_SRC_FILES:.c=.o)
8
9VPATH += $(SRCDIR)/system/core/libmincrypt
10libmincrypt_SRC_FILES := dsa_sig.c p256.c p256_ec.c p256_ecdsa.c rsa.c sha.c sha256.c
11libmincrypt_OBJS := $(libmincrypt_SRC_FILES:.c=.o)
12
13CFLAGS += -DANDROID
14CFLAGS += -I$(SRCDIR)/system/core/mkbootimg
15CFLAGS += -I$(SRCDIR)/system/core/include
16CFLAGS += -include $(SRCDIR)/build/core/combo/include/arch/$(android_arch)/AndroidConfig.h
17
18LIBS += libmincrypt.a
19
20all: mkbootimg
21
22mkbootimg: libmincrypt.a $(mkbootimg_OBJS)
23 $(CC) -o $@ $(LDFLAGS) $(mkbootimg_OBJS) $(LIBS)
24
25libmincrypt.a: $(libmincrypt_OBJS)
26 $(AR) rcs $@ $(libmincrypt_OBJS)
27
28clean:
29 $(RM) $(mkbootimg_OBJS) $(libmincrypt_OBJS) mkbootimg *.a
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_35.0.2.bb b/meta-oe/recipes-devtools/android-tools/android-tools_35.0.2.bb
new file mode 100644
index 0000000000..3a277cd4b5
--- /dev/null
+++ b/meta-oe/recipes-devtools/android-tools/android-tools_35.0.2.bb
@@ -0,0 +1,237 @@
1DESCRIPTION = "Various utilities from Android"
2SECTION = "console/utils"
3LICENSE = "Apache-2.0 & GPL-2.0-only & BSD-2-Clause & BSD-3-Clause"
4LIC_FILES_CHKSUM = " \
5 file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \
6 file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \
7 file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f \
8 file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \
9"
10
11DEPENDS = " \
12 android-libboringssl \
13 brotli \
14 libcap \
15 7zip \
16 protobuf \
17 protobuf-native \
18 libusb \
19 squashfs-tools \
20 zlib \
21"
22
23# The debian/ patches are copied from android-platform-tools/debian/patches and
24# applied in the order defined by debian/patches/series. Listing them as
25# first-class SRC_URI entries (rather than running quilt inside do_patch) makes
26# the recipe work correctly with devtool.
27SRC_URI = "https://deb.debian.org/debian/pool/main/a/android-platform-tools/android-platform-tools_35.0.2.orig.tar.xz;name=orig;subdir=android-platform-tools-${PV} \
28 https://deb.debian.org/debian/pool/main/a/android-platform-tools/android-platform-tools_35.0.2-1~exp6.debian.tar.xz;name=debian;subdir=android-platform-tools-${PV} \
29 file://android-tools-adbd.service \
30 file://debian/deb-gcc-stdatomic.patch \
31 file://debian/deb-gcc-workaround__builtin_available.patch \
32 file://debian/deb-gcc-Nullable.patch \
33 file://debian/deb-sys-unwindstack-porting.patch \
34 file://debian/deb-sys-move-log-file-to-proper-dir.patch \
35 file://debian/deb-sys-Added-missing-headers.patch \
36 file://debian/deb-sys-libusb-header-path.patch \
37 file://debian/deb-sys-throw-exception-on-unknown-os.patch \
38 file://debian/deb-sys-hard-code-build-number.patch \
39 file://debian/deb-sys-stub-out-fastdeploy.patch \
40 file://debian/deb-sys-Implement-const_iterator-operator.patch \
41 file://debian/deb-sys-Drop-gki-dependency-from-mkbootimg.patch \
42 file://debian/deb-sys-add-missing-headers.patch \
43 file://debian/deb-dev-typos.patch \
44 file://debian/deb-adbd-adbd-allow-usb-on-linux.patch \
45 file://debian/deb-adbd-adbd-allow-notifying-systemd.patch \
46 file://debian/deb-adbd-adbd-usb-drop-property-monitor.patch \
47 file://debian/deb-adbd-adbd-don-t-require-authorization-on-Linux.patch \
48 file://0001-libbacktrace.mk-Link-against-staged-lib7z.patch \
49 file://0002-debian-makefiles-yocto-compat.patch \
50 file://0003-gcc-nullability-and-thread-annotation-compat.patch \
51 file://0004-fastboot-super_flash_helper-include-climits.patch \
52 file://0005-adb-host-usb-compat.patch \
53 file://0006-adbd-enable-root-and-remount-support.patch \
54 file://0007-libcutils-guard-Android-private-header-with-addition.patch \
55 file://0008-adb-GCC-compatibility-fixes-for-usb_linux-and-sysdep.patch \
56 file://0009-libbase-include-stdint.h-in-hex.cpp.patch \
57 file://0010-adbd-make-systemd-sd_notify-conditional-on-HAVE_SYSTEMD.patch \
58 "
59
60SRC_URI[orig.md5sum] = "352376965cdef7bd7505d8fefdd43d50"
61SRC_URI[orig.sha256sum] = "ec1d317608db3328bfbddf7152c8d7f185c7c87b2175081416344434546a43da"
62SRC_URI[debian.md5sum] = "1de890bd272da9e8cd35bc9579802f1f"
63SRC_URI[debian.sha256sum] = "f03a89b82ea8dfbe3cb77d5326eedf0d15984f5896885e8c5df64cf421819579"
64
65S = "${UNPACKDIR}/android-platform-tools-${PV}"
66B = "${UNPACKDIR}/${BPN}"
67
68# http://errors.yoctoproject.org/Errors/Details/1debian881/
69ARM_INSTRUCTION_SET:armv4 = "arm"
70ARM_INSTRUCTION_SET:armv5 = "arm"
71
72COMPATIBLE_HOST:powerpc = "(null)"
73COMPATIBLE_HOST:powerpc64 = "(null)"
74COMPATIBLE_HOST:powerpc64le = "(null)"
75
76inherit systemd
77
78SYSTEMD_PACKAGES = "${PN}-adbd"
79SYSTEMD_SERVICE:${PN}-adbd = "android-tools-adbd.service"
80
81CFLAGS:append = " -fPIC -std=gnu2x"
82CXXFLAGS:append = " -fPIC -std=gnu++20 -D_Nonnull= -D_Nullable= -I${STAGING_INCDIR}/boringssl"
83LDFLAGS:append = " -fPIC -L${STAGING_LIBDIR}/android"
84
85
86CC:append:class-native = " -I${STAGING_INCDIR}"
87CC:append:class-nativesdk = " -I${STAGING_INCDIR}"
88
89PREREQUISITE_core = ""
90PREREQUISITE_core:class-target = "liblog libbase libcutils libcrypto_utils libadb"
91PREREQUISITE_core:class-native = "liblog libbase libcutils libziparchive libsparse libcrypto_utils libadb"
92
93TOOLS_TO_BUILD = ""
94TOOLS_TO_BUILD:class-target = "adbd"
95TOOLS_TO_BUILD:class-native = "adb fastboot img2simg simg2img"
96
97BUILD_SYSROOT = "${RECIPE_SYSROOT}"
98BUILD_SYSROOT:class-native = "${RECIPE_SYSROOT_NATIVE}"
99
100do_compile() {
101 case "${HOST_ARCH}" in
102 arm)
103 export android_arch=linux-arm
104 cpu=arm
105 deb_host_arch=arm
106 ;;
107 aarch64)
108 export android_arch=linux-arm64
109 cpu=arm64
110 deb_host_arch=arm64
111 ;;
112 riscv64)
113 export android_arch=linux-riscv64
114 cpu=riscv64
115 deb_host_arch=riscv64
116 ;;
117 mips|mipsel)
118 export android_arch=linux-mips
119 cpu=mips
120 deb_host_arch=mips
121 ;;
122 mips64|mips64el)
123 export android_arch=linux-mips64
124 cpu=mips64
125 deb_host_arch=mips64
126 ;;
127 powerpc|powerpc64)
128 export android_arch=linux-ppc
129 cpu=ppc
130 deb_host_arch=ppc64
131 ;;
132 i586|i686)
133 export android_arch=linux-x86
134 cpu=x86
135 deb_host_arch=i386
136 ;;
137 x86_64)
138 export android_arch=linux-x86
139 cpu=x86_64
140 deb_host_arch=amd64
141 ;;
142 *)
143 bbfatal "Unsupported HOST_ARCH=${HOST_ARCH}"
144 ;;
145 esac
146
147 export SRCDIR=${S}
148 export DEB_HOST_ARCH=${deb_host_arch}
149 export DEB_HOST_MULTIARCH=
150 export SYSROOT=${BUILD_SYSROOT}
151
152 if echo " ${TOOLS_TO_BUILD} " | grep -Eq " (adb|fastboot) "; then
153 # Native host tools should use the host system's ELF interpreter, not
154 # Yocto's uninative loader under /workdir.
155 export LDFLAGS="$(printf '%s\n' "${LDFLAGS}" | \
156 sed -E 's@-Wl,--dynamic-linker=[^[:space:]]+@@g; s@[[:space:]]+@ @g; s@^[[:space:]]+@@; s@[[:space:]]+$@@')"
157 fi
158
159 # Debian's make fragments expect generated protobuf sources to already be
160 # present under packages/modules/adb/proto, but the orig tarball only ships
161 # the .proto inputs.
162 for proto in adb_host adb_known_hosts app_processes key_type pairing; do
163 ${STAGING_BINDIR_NATIVE}/protoc \
164 --proto_path=${S}/packages/modules/adb/proto \
165 --cpp_out=${S}/packages/modules/adb/proto \
166 ${S}/packages/modules/adb/proto/${proto}.proto
167 done
168
169 if [ -d ${S}/packages/modules/adb/fastdeploy/proto ]; then
170 for proto in ${S}/packages/modules/adb/fastdeploy/proto/*.proto; do
171 [ -e "$proto" ] || continue
172 ${STAGING_BINDIR_NATIVE}/protoc \
173 --proto_path=${S}/packages/modules/adb \
174 --cpp_out=${S}/packages/modules/adb \
175 "$proto"
176 done
177 fi
178
179 # Debian's make fragments write archives and binaries under debian/out/*
180 # but do not consistently create parent directories before invoking ar.
181 install -d ${S}/debian/out/system/extras
182
183 # Debian replaces Android's Soong build system with hand-written GNU make
184 # fragments under debian/system/ and debian/external/.
185 for tool in ${PREREQUISITE_core}; do
186 oe_runmake -f ${S}/debian/system/${tool}.mk -C ${S}
187 done
188
189 if echo " ${TOOLS_TO_BUILD} " | grep -q " fastboot "; then
190 # Debian's fastboot.mk links against the ext4_utils static archive from
191 # debian/out/system/extras, so build that helper archive first.
192 oe_runmake -f ${S}/debian/system/extras/libext4_utils.mk -C ${S}
193 fi
194
195 for tool in ${TOOLS_TO_BUILD}; do
196 oe_runmake -f ${S}/debian/system/${tool}.mk -C ${S} \
197 ${@'HAVE_SYSTEMD=1' if bb.utils.contains('PACKAGECONFIG', 'systemd', True, False, d) else ''}
198 done
199}
200
201do_install() {
202 for tool in ${TOOLS_TO_BUILD}; do
203 install -D -p -m0755 ${S}/debian/out/system/${tool} ${D}${bindir}/${tool}
204 done
205
206 if echo " ${TOOLS_TO_BUILD} " | grep -q " adbd "; then
207 install -D -p -m0644 ${UNPACKDIR}/android-tools-adbd.service \
208 ${D}${systemd_unitdir}/system/android-tools-adbd.service
209 fi
210
211 install -d ${D}${libdir}/android/
212 install -m0755 ${S}/debian/out/system/lib*.so.* ${D}${libdir}/android/
213}
214
215PACKAGES =+ "${PN}-adbd"
216RDEPENDS:${PN}:class-target = "android-tools-conf-configfs 7zip android-libboringssl"
217RDEPENDS:${PN}-adbd += "${PN}"
218PRIVATE_LIBS:${PN} = "liblog.so.0 libbase.so.0 libcutils.so.0"
219
220inherit useradd
221USERADD_PACKAGES = "${PN}-adbd"
222USERADD_PARAM:${PN}-adbd = "--system --no-create-home --shell /bin/false --user-group adb"
223
224FILES:${PN} += " \
225 ${libdir}/android \
226 ${libdir}/android/* \
227"
228
229FILES:${PN}-adbd = " \
230 ${bindir}/adbd \
231 ${systemd_unitdir}/system/android-tools-adbd.service \
232"
233
234BBCLASSEXTEND = "native"
235
236PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
237PACKAGECONFIG[systemd] = ",,systemd"
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb b/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
deleted file mode 100644
index c04a1ef8c4..0000000000
--- a/meta-oe/recipes-devtools/android-tools/android-tools_5.1.1.r37.bb
+++ /dev/null
@@ -1,189 +0,0 @@
1DESCRIPTION = "Different utilities from Android"
2SECTION = "console/utils"
3LICENSE = "Apache-2.0 & GPL-2.0-only & BSD-2-Clause & BSD-3-Clause"
4LIC_FILES_CHKSUM = " \
5 file://${COMMON_LICENSE_DIR}/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10 \
6 file://${COMMON_LICENSE_DIR}/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6 \
7 file://${COMMON_LICENSE_DIR}/BSD-2-Clause;md5=cb641bc04cda31daea161b1bc15da69f \
8 file://${COMMON_LICENSE_DIR}/BSD-3-Clause;md5=550794465ba0ec5312d6919e203a55f9 \
9"
10DEPENDS = "libbsd libpcre zlib libcap"
11DEPENDS:append:class-target = " openssl"
12
13ANDROID_MIRROR = "android.googlesource.com"
14
15# matches with android-5.1.1_r37
16SRCREV_core = "2314b110bdebdbfd2d94c502282f9e57c849897e"
17SRCREV_extras = "3ecbe8d841df96127d7855661293e5ab6ba6c205"
18SRCREV_libhardware = "be55eb1f4d840c82ffaf7c47460df17ff5bc4d9b"
19SRCREV_libselinux = "07e9e1339ad1ba608acfba9dce2d0f474b252feb"
20SRCREV_build = "16e987def3d7d8f7d30805eb95cef69e52a87dbc"
21
22SRCREV_FORMAT = "core_extras_libhardware_libselinux_build"
23SRC_URI = " \
24 git://${ANDROID_MIRROR}/platform/system/core;name=core;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/system/core \
25 git://${ANDROID_MIRROR}/platform/system/extras;name=extras;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/system/extras \
26 git://${ANDROID_MIRROR}/platform/hardware/libhardware;name=libhardware;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/hardware/libhardware \
27 git://${ANDROID_MIRROR}/platform/external/libselinux;name=libselinux;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/external/libselinux \
28 git://${ANDROID_MIRROR}/platform/build;name=build;protocol=https;nobranch=1;destsuffix=${BB_GIT_DEFAULT_DESTSUFFIX}/build \
29 file://core/0001-adb-remove-selinux-extensions.patch;patchdir=system/core \
30 file://core/0002-adb-Use-local-sockets-where-appropriate.patch;patchdir=system/core \
31 file://core/0003-adb-define-shell-command.patch;patchdir=system/core \
32 file://core/0004-adb-Fix-build-on-big-endian-systems.patch;patchdir=system/core \
33 file://core/0005-adb-add-base64-implementation.patch;patchdir=system/core \
34 file://core/0006-adb-Musl-fixes.patch;patchdir=system/core \
35 file://core/0007-adb-usb_linux.c-fix-build-with-glibc-2.28.patch;patchdir=system/core \
36 file://core/0008-adb-Allow-adbd-to-be-ran-as-root.patch;patchdir=system/core \
37 file://core/0009-mkbootimg-Add-dt-parameter-to-specify-DT-image.patch;patchdir=system/core \
38 file://core/0010-Use-linux-capability.h-on-linux-systems-too.patch;patchdir=system/core \
39 file://core/0011-Remove-bionic-specific-calls.patch;patchdir=system/core \
40 file://core/0012-Fix-implicit-declaration-of-stlcat-strlcopy-function.patch;patchdir=system/core \
41 file://core/adb_libssl_11.diff;patchdir=system/core \
42 file://core/b64_pton_function_decl.patch;patchdir=system/core \
43 file://core/0013-adb-Support-riscv64.patch;patchdir=system/core \
44 file://core/0014-add-u3-ss-descriptor-support-for-adb.patch;patchdir=system/core \
45 file://core/0015-libsparse-Split-off-most-of-sparse_file_read_normal-.patch;patchdir=system/core \
46 file://core/0016-libsparse-Add-hole-mode-to-sparse_file_read.patch;patchdir=system/core \
47 file://core/0017-img2simg-Add-support-for-converting-holes-to-don-t-c.patch;patchdir=system/core \
48 file://core/0001-memory.h-Always-define-strlcpy-for-glibc-based-syste.patch;patchdir=system/core \
49 file://extras/0001-ext4_utils-remove-selinux-extensions.patch;patchdir=system/extras \
50 file://extras/0002-ext4_utils-add-o-argument-to-preserve-ownership.patch;patchdir=system/extras \
51 file://extras/0003-ext4_utils-drop-unused-parameter-from-allocate_inode.patch;patchdir=system/extras \
52 file://libselinux/0001-Remove-bionic-specific-calls.patch;patchdir=external/libselinux \
53 file://libselinux/0001-libselinux-Do-not-define-gettid-if-glibc-2.30-is-use.patch;patchdir=external/libselinux \
54 file://android-tools-adbd.service \
55 file://build/0001-Riscv-Add-risc-v-Android-config-header.patch;patchdir=build \
56 file://gitignore \
57 file://adb.mk;subdir=${BPN} \
58 file://adbd.mk;subdir=${BPN} \
59 file://ext4_utils.mk;subdir=${BPN} \
60 file://fastboot.mk;subdir=${BPN} \
61 file://mkbootimg.mk;subdir=${BPN} \
62"
63
64
65B = "${WORKDIR}/${BPN}"
66
67# http://errors.yoctoproject.org/Errors/Details/133881/
68ARM_INSTRUCTION_SET:armv4 = "arm"
69ARM_INSTRUCTION_SET:armv5 = "arm"
70
71COMPATIBLE_HOST:powerpc = "(null)"
72COMPATIBLE_HOST:powerpc64 = "(null)"
73COMPATIBLE_HOST:powerpc64le = "(null)"
74
75inherit systemd
76
77SYSTEMD_PACKAGES = "${PN}-adbd"
78SYSTEMD_SERVICE:${PN}-adbd = "android-tools-adbd.service"
79
80# Find libbsd headers during native builds
81CC:append:class-native = " -I${STAGING_INCDIR}"
82CC:append:class-nativesdk = " -I${STAGING_INCDIR}"
83
84TOOLS = "adb fastboot ext4_utils mkbootimg adbd"
85
86# Adb needs sys/capability.h, which is not available for native*
87TOOLS:class-native = "fastboot ext4_utils mkbootimg"
88TOOLS:class-nativesdk = "fastboot ext4_utils mkbootimg"
89
90do_compile() {
91 cp ${UNPACKDIR}/gitignore ${S}/.gitignore
92
93 # Setting both variables below causing our makefiles to not work with
94 # implicit make rules
95 CFLAGS="-ffile-prefix-map=${S}=${TARGET_DBGSRC_DIR}"
96 unset CPPFLAGS
97
98 export SRCDIR=${S}
99
100 case "${HOST_ARCH}" in
101 arm)
102 export android_arch=linux-arm
103 ;;
104 aarch64)
105 export android_arch=linux-arm64
106 ;;
107 riscv64)
108 export android_arch=linux-riscv64
109 ;;
110 mips|mipsel)
111 export android_arch=linux-mips
112 ;;
113 mips64|mips64el)
114 export android_arch=linux-mips64
115 ;;
116 powerpc|powerpc64)
117 export android_arch=linux-ppc
118 ;;
119 i586|i686|x86_64)
120 export android_arch=linux-x86
121 ;;
122 esac
123
124 for tool in ${TOOLS}; do
125 mkdir -p ${B}/${tool}
126 oe_runmake -f ${UNPACKDIR}/${BPN}/${tool}.mk -C ${B}/${tool}
127 done
128}
129
130do_install() {
131 if echo ${TOOLS} | grep -q "ext4_utils" ; then
132 install -D -p -m0755 ${S}/system/core/libsparse/simg_dump.py ${D}${bindir}/simg_dump
133 install -D -p -m0755 ${S}/system/extras/ext4_utils/mkuserimg.sh ${D}${bindir}/mkuserimg
134
135 install -m0755 ${B}/ext4_utils/ext2simg ${D}${bindir}
136 install -m0755 ${B}/ext4_utils/ext4fixup ${D}${bindir}
137 install -m0755 ${B}/ext4_utils/img2simg ${D}${bindir}
138 install -m0755 ${B}/ext4_utils/make_ext4fs ${D}${bindir}
139 install -m0755 ${B}/ext4_utils/simg2img ${D}${bindir}
140 install -m0755 ${B}/ext4_utils/simg2simg ${D}${bindir}
141 fi
142
143 if echo ${TOOLS} | grep -q "adb\>" ; then
144 install -d ${D}${bindir}
145 install -m0755 ${B}/adb/adb ${D}${bindir}
146 fi
147
148 if echo ${TOOLS} | grep -q "adbd" ; then
149 install -d ${D}${bindir}
150 install -m0755 ${B}/adbd/adbd ${D}${bindir}
151 fi
152
153 # Outside the if statement to avoid errors during do_package
154 install -D -p -m0644 ${UNPACKDIR}/android-tools-adbd.service \
155 ${D}${systemd_unitdir}/system/android-tools-adbd.service
156
157 if echo ${TOOLS} | grep -q "fastboot" ; then
158 install -d ${D}${bindir}
159 install -m0755 ${B}/fastboot/fastboot ${D}${bindir}
160 fi
161
162 if echo ${TOOLS} | grep -q "mkbootimg" ; then
163 install -d ${D}${bindir}
164 install -m0755 ${B}/mkbootimg/mkbootimg ${D}${bindir}
165 fi
166}
167
168PACKAGES =+ "${PN}-fstools ${PN}-adbd"
169
170RDEPENDS:${PN}-adbd = "${PN}-conf"
171RDEPENDS:${PN}-fstools = "bash"
172
173FILES:${PN}-adbd = "\
174 ${bindir}/adbd \
175 ${systemd_unitdir}/system/android-tools-adbd.service \
176"
177
178FILES:${PN}-fstools = "\
179 ${bindir}/ext2simg \
180 ${bindir}/ext4fixup \
181 ${bindir}/img2simg \
182 ${bindir}/make_ext4fs \
183 ${bindir}/simg2img \
184 ${bindir}/simg2simg \
185 ${bindir}/simg_dump \
186 ${bindir}/mkuserimg \
187"
188
189BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-devtools/b4/b4_0.14.3.bb b/meta-oe/recipes-devtools/b4/b4_0.15.2.bb
index a922f999e2..002f6ccfeb 100644
--- a/meta-oe/recipes-devtools/b4/b4_0.14.3.bb
+++ b/meta-oe/recipes-devtools/b4/b4_0.15.2.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
5 5
6inherit pypi python_pep517 python_setuptools_build_meta 6inherit pypi python_pep517 python_setuptools_build_meta
7 7
8SRC_URI[sha256sum] = "31a4927b8dfbb5c97edfc9569cda3b6737bbfd8430881e8cc48a0b088ced6147" 8SRC_URI[sha256sum] = "b815f2aed2288718cfe2a14c76421a00bc4f0918ea32b45dd1645c999fdda69d"
9 9
10RDEPENDS:${PN} += " \ 10RDEPENDS:${PN} += " \
11 python3-mailbox \ 11 python3-mailbox \
diff --git a/meta-oe/recipes-devtools/canvenient/canvenient_1.01.bb b/meta-oe/recipes-devtools/canvenient/canvenient_1.01.bb
new file mode 100644
index 0000000000..8ae41f0a83
--- /dev/null
+++ b/meta-oe/recipes-devtools/canvenient/canvenient_1.01.bb
@@ -0,0 +1,41 @@
1
2SUMMARY = "CANvenient is an abstraction layer for multiple CAN APIs \
3 on Windows and Linux. \
4 "
5DESCRIPTION = "CANvenient is an abstraction layer for multiple CAN APIs on \
6 Windows and Linux. It provides a unified interface for CAN \
7 communication, allowing developers to write code that is \
8 portable across different platforms and CAN hardware. \
9 "
10HOMEPAGE = "https://canopenterm.de/canvenient"
11BUGTRACKER = "https://github.com/CANopenTerm/CANvenient/issues"
12
13LICENSE = "MIT"
14LIC_FILES_CHKSUM = "file://LICENSE.md;md5=bd2edc721b4a0289efe949bdbe7dda79"
15
16DEPENDS = "libsocketcan"
17
18SRC_URI = "git://github.com/CANopenTerm/CANvenient.git;protocol=https;branch=main;tag=v${PV}"
19
20SRCREV = "b8b37e3915caf5bce93f38c2c6cca71356dcfcab"
21
22inherit cmake ptest
23
24
25do_install:append() {
26 install -d ${D}${includedir}
27 install -d ${D}${libdir}
28
29 install -m 0644 ${S}/include/CANvenient.h ${D}${includedir}/
30 install -m 0755 ${B}/libCANvenient.so.1.0.1 ${D}${libdir}/
31
32 ln -sf libCANvenient.so.1.0.1 ${D}${libdir}/libCANvenient.so.1
33 ln -sf libCANvenient.so.1.0.1 ${D}${libdir}/libCANvenient.so
34}
35
36FILES:${PN} += "${libdir}/libCANvenient.so ${libdir}/libCANvenient.so.*"
37FILES:${PN}-dev += "${includedir}"
38
39SOLIBS = ".so"
40
41RDEPENDS:${PN} = "libsocketcan"
diff --git a/meta-oe/recipes-devtools/cloc/cloc_1.98.bb b/meta-oe/recipes-devtools/cloc/cloc_2.08.bb
index 6d349c1e58..106c72974d 100644
--- a/meta-oe/recipes-devtools/cloc/cloc_1.98.bb
+++ b/meta-oe/recipes-devtools/cloc/cloc_2.08.bb
@@ -5,7 +5,7 @@ LICENSE = "GPL-2.0-only"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=2c1c00f9d3ed9e24fa69b932b7e7aff2"
6 6
7SRC_URI = "https://github.com/AlDanial/cloc/releases/download/v${PV}/${BP}.tar.gz" 7SRC_URI = "https://github.com/AlDanial/cloc/releases/download/v${PV}/${BP}.tar.gz"
8SRC_URI[sha256sum] = "5fe0b159eb75718df7308a4f61470eaddf82170733929999e37a3fbb4651cf8a" 8SRC_URI[sha256sum] = "ce3c86d1edb448728278079eff6d99687477b3c1fe84b2f1a4dc14cfb2f811dc"
9 9
10UPSTREAM_CHECK_URI = "https://github.com/AlDanial/${BPN}/releases" 10UPSTREAM_CHECK_URI = "https://github.com/AlDanial/${BPN}/releases"
11UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" 11UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-oe/recipes-devtools/cpuid/cpuid_20230614.bb b/meta-oe/recipes-devtools/cpuid/cpuid_20260503.bb
index 36614ca19d..c0e27bdc20 100644
--- a/meta-oe/recipes-devtools/cpuid/cpuid_20230614.bb
+++ b/meta-oe/recipes-devtools/cpuid/cpuid_20260503.bb
@@ -10,7 +10,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=b234ee4d69f5fce4486a80fdaf4a4263"
10SRC_URI = "http://www.etallen.com/${BPN}/${BP}.src.tar.gz \ 10SRC_URI = "http://www.etallen.com/${BPN}/${BP}.src.tar.gz \
11 file://0001-Makefile-update-the-hardcode-path-to-bindir-mandir.patch \ 11 file://0001-Makefile-update-the-hardcode-path-to-bindir-mandir.patch \
12 " 12 "
13SRC_URI[sha256sum] = "b1c83045efc26076307751e0662d580277f5f9bf89cf027231a7812003c3a4e8" 13SRC_URI[sha256sum] = "8ee10fb48d4aa20c484a75d6852883710286ed2975c314bda6d0b0383908cbfe"
14 14
15COMPATIBLE_HOST = "(i.86|x86_64).*-linux" 15COMPATIBLE_HOST = "(i.86|x86_64).*-linux"
16 16
diff --git a/meta-oe/recipes-devtools/ctags/ctags_6.2.20260308.0.bb b/meta-oe/recipes-devtools/ctags/ctags_6.2.20260607.0.bb
index 51ad8cff8e..0d0604239a 100644
--- a/meta-oe/recipes-devtools/ctags/ctags_6.2.20260308.0.bb
+++ b/meta-oe/recipes-devtools/ctags/ctags_6.2.20260607.0.bb
@@ -14,7 +14,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
14 14
15inherit autotools-brokensep pkgconfig manpages 15inherit autotools-brokensep pkgconfig manpages
16 16
17SRCREV = "db5c5e00f09e62d27108025de24bcec919eac83b" 17SRCREV = "0361a1da51a9cb680732451ab0c35c41bc914bda"
18SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https;tag=p${PV}" 18SRC_URI = "git://github.com/universal-ctags/ctags;branch=master;protocol=https;tag=p${PV}"
19 19
20 20
diff --git a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.142.bb b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.144.bb
index 1478ebb1e4..543d7405a4 100644
--- a/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.142.bb
+++ b/meta-oe/recipes-devtools/debootstrap/debootstrap_1.0.144.bb
@@ -11,7 +11,7 @@ SRC_URI = "\
11 file://0003-do-not-hardcode-the-full-path-of-dpkg.patch \ 11 file://0003-do-not-hardcode-the-full-path-of-dpkg.patch \
12" 12"
13 13
14SRC_URI[sha256sum] = "334b188c2bab5c1aa6f858a044274631d342f07f5ddec1bad870d728f02fd652" 14SRC_URI[sha256sum] = "3e1bafd4bb813cf4d6c17a0adca449ca07603263a8ea40a67257d2d60c186f9a"
15 15
16S = "${UNPACKDIR}/debootstrap" 16S = "${UNPACKDIR}/debootstrap"
17 17
diff --git a/meta-oe/recipes-devtools/dmalloc/dmalloc_5.5.2.bb b/meta-oe/recipes-devtools/dmalloc/dmalloc_5.6.5.bb
index 79252f94ae..cda6ae8082 100644
--- a/meta-oe/recipes-devtools/dmalloc/dmalloc_5.5.2.bb
+++ b/meta-oe/recipes-devtools/dmalloc/dmalloc_5.6.5.bb
@@ -28,7 +28,7 @@ SRC_URI = "http://dmalloc.com/releases/dmalloc-${PV}.tgz \
28 file://0001-undefined-strdup-macro.patch \ 28 file://0001-undefined-strdup-macro.patch \
29" 29"
30 30
31SRC_URI[sha256sum] = "d3be5c6eec24950cb3bd67dbfbcdf036f1278fae5fd78655ef8cdf9e911e428a" 31SRC_URI[sha256sum] = "480e3414ab6cedca837721c756b7d64b01a84d2d0e837378d98444e2f63a7c01"
32 32
33ARM_INSTRUCTION_SET = "arm" 33ARM_INSTRUCTION_SET = "arm"
34 34
diff --git a/meta-oe/recipes-devtools/doxygen/doxygen_1.16.1.bb b/meta-oe/recipes-devtools/doxygen/doxygen_1.17.0.bb
index 3d0cfaed80..70537fab15 100644
--- a/meta-oe/recipes-devtools/doxygen/doxygen_1.16.1.bb
+++ b/meta-oe/recipes-devtools/doxygen/doxygen_1.17.0.bb
@@ -10,7 +10,7 @@ SRC_URI = "\
10 git://github.com/doxygen/doxygen.git;branch=master;protocol=https \ 10 git://github.com/doxygen/doxygen.git;branch=master;protocol=https \
11" 11"
12 12
13SRCREV = "669aeeefca743c148e2d935b3d3c69535c7491e6" 13SRCREV = "65a43c0aba45cc23b3ca11b6b5334d4eea931726"
14 14
15 15
16UPSTREAM_CHECK_GITTAGREGEX = "Release_(?P<pver>\d+(\_\d+)+)" 16UPSTREAM_CHECK_GITTAGREGEX = "Release_(?P<pver>\d+(\_\d+)+)"
diff --git a/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb b/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.11.bb
index c6db2ef38c..5865202841 100644
--- a/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.9.bb
+++ b/meta-oe/recipes-devtools/editorconfig/editorconfig-core-c_0.12.11.bb
@@ -1,12 +1,12 @@
1SUMMARY = "EditorConfig helps maintain consistent coding styles across various editors and IDEs." 1SUMMARY = "EditorConfig helps maintain consistent coding styles across various editors and IDEs."
2HOMEPAGE = "https://https://editorconfig.org" 2HOMEPAGE = "https://editorconfig.org"
3SECTION = "libs" 3SECTION = "libs"
4LICENSE = "BSD-2-Clause" 4LICENSE = "BSD-2-Clause"
5LIC_FILES_CHKSUM = "file://LICENSE;md5=38f617473e9f7373b5e79baf437accf8" 5LIC_FILES_CHKSUM = "file://LICENSE;md5=38f617473e9f7373b5e79baf437accf8"
6 6
7SRC_URI = "git://github.com/editorconfig/editorconfig-core-c.git;protocol=https;branch=master" 7SRC_URI = "git://github.com/editorconfig/editorconfig-core-c.git;protocol=https;branch=master;tag=v${PV}"
8 8
9SRCREV = "e082c947e7f7b14240195d55c060a6e1eda1b0a1" 9SRCREV = "0ba157eff167c1b2d1bc0c3e13975b7a73fb9d25"
10 10
11inherit cmake 11inherit cmake
12 12
diff --git a/meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb b/meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb
index c51a49ba01..289330ee04 100644
--- a/meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb
+++ b/meta-oe/recipes-devtools/flatbuffers/flatbuffers.bb
@@ -25,7 +25,7 @@ inherit cmake python3native
25rm_flatc_cmaketarget_for_target() { 25rm_flatc_cmaketarget_for_target() {
26 rm -f "${SYSROOT_DESTDIR}/${libdir}/cmake/flatbuffers/FlatcTargets.cmake" 26 rm -f "${SYSROOT_DESTDIR}/${libdir}/cmake/flatbuffers/FlatcTargets.cmake"
27} 27}
28SYSROOT_PREPROCESS_FUNCS:class-target += "rm_flatc_cmaketarget_for_target" 28SYSROOT_PREPROCESS_FUNCS:append:class-target = " rm_flatc_cmaketarget_for_target"
29 29
30FILES:${PN}-compiler = "${bindir}" 30FILES:${PN}-compiler = "${bindir}"
31 31
diff --git a/meta-oe/recipes-devtools/geany/geany_2.0.bb b/meta-oe/recipes-devtools/geany/geany_2.1.bb
index 4b51195e08..7130c6e6fd 100644
--- a/meta-oe/recipes-devtools/geany/geany_2.0.bb
+++ b/meta-oe/recipes-devtools/geany/geany_2.1.bb
@@ -13,7 +13,7 @@ SRC_URI = "https://download.geany.org/${BP}.tar.bz2 \
13 file://0001-configure-Upgrade-to-a-modern-Gettext.patch \ 13 file://0001-configure-Upgrade-to-a-modern-Gettext.patch \
14 file://geany-2.0-gcc15.patch \ 14 file://geany-2.0-gcc15.patch \
15 " 15 "
16SRC_URI[sha256sum] = "565b4cd2f0311c1e3a167ec71c4a32dba642e0fe554ae5bb6b8177b7a74ccc92" 16SRC_URI[sha256sum] = "6b96a8844463300c10b9692a0a5edad8236eec9e84342f575f83d4fc89331228"
17 17
18FILES:${PN} += "${datadir}/icons" 18FILES:${PN} += "${datadir}/icons"
19 19
diff --git a/meta-oe/recipes-devtools/giflib/giflib/0001-Makefile-fix-typo-in-soname-argument.patch b/meta-oe/recipes-devtools/giflib/giflib/0001-Makefile-fix-typo-in-soname-argument.patch
deleted file mode 100644
index dc87ed60b9..0000000000
--- a/meta-oe/recipes-devtools/giflib/giflib/0001-Makefile-fix-typo-in-soname-argument.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 7f0cd4b6b56183b0afbefd01425e5ebd2b8733b4 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@gmail.com>
3Date: Mon, 8 Jul 2024 13:18:11 +0200
4Subject: [PATCH] Makefile: fix typo in soname argument
5
6* introduced in:
7 https://sourceforge.net/p/giflib/code/ci/b65c7ac2905c0842e7977a7b51d83af4486ca7b8/
8 there is no LIBUTILMAJOR variable only LIBUTILSOMAJOR leading to:
9
10 ld: fatal error: -soname: must take a non-empty argument
11 collect2: error: ld returned 1 exit status
12
13 with some linkers like GOLD
14
15Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
16---
17Upstream-Status: Submitted [https://sourceforge.net/p/giflib/code/merge-requests/17/]
18
19 Makefile | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/Makefile b/Makefile
23index 87966a9..41b149e 100644
24--- a/Makefile
25+++ b/Makefile
26@@ -109,7 +109,7 @@ $(LIBUTILSO): $(UOBJECTS) $(UHEADERS)
27 ifeq ($(UNAME), Darwin)
28 $(CC) $(CFLAGS) -dynamiclib -current_version $(LIBVER) $(OBJECTS) -o $(LIBUTILSO)
29 else
30- $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,$(LIBUTILMAJOR) -o $(LIBUTILSO) $(UOBJECTS)
31+ $(CC) $(CFLAGS) -shared $(LDFLAGS) -Wl,-soname -Wl,$(LIBUTILSOMAJOR) -o $(LIBUTILSO) $(UOBJECTS)
32 endif
33
34 libutil.a: $(UOBJECTS) $(UHEADERS)
diff --git a/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb b/meta-oe/recipes-devtools/giflib/giflib_6.1.3.bb
index aa47f93095..7940023b6d 100644
--- a/meta-oe/recipes-devtools/giflib/giflib_5.2.2.bb
+++ b/meta-oe/recipes-devtools/giflib/giflib_6.1.3.bb
@@ -1,7 +1,7 @@
1SUMMARY = "shared library for GIF images" 1SUMMARY = "shared library for GIF images"
2SECTION = "libs" 2SECTION = "libs"
3LICENSE = "MIT" 3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://COPYING;md5=ae11c61b04b2917be39b11f78d71519a" 4LIC_FILES_CHKSUM = "file://COPYING;md5=b427970b2f3a9142a4e432c78c4680f4"
5 5
6CVE_PRODUCT = "giflib_project:giflib" 6CVE_PRODUCT = "giflib_project:giflib"
7 7
@@ -9,11 +9,10 @@ DEPENDS = "xmlto-native"
9 9
10SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \ 10SRC_URI = "${SOURCEFORGE_MIRROR}/giflib/${BP}.tar.gz \
11 https://sourceforge.net/p/giflib/code/ci/d54b45b0240d455bbaedee4be5203d2703e59967/tree/doc/giflib-logo.gif?format=raw;subdir=${BP}/doc;name=logo;downloadfilename=giflib-logo.gif \ 11 https://sourceforge.net/p/giflib/code/ci/d54b45b0240d455bbaedee4be5203d2703e59967/tree/doc/giflib-logo.gif?format=raw;subdir=${BP}/doc;name=logo;downloadfilename=giflib-logo.gif \
12 file://0001-Makefile-fix-typo-in-soname-argument.patch \
13" 12"
14 13
15SRC_URI[logo.sha256sum] = "1a54383986adad1521d00e003b4c482c27e8bc60690be944a1f3319c75abc2c9" 14SRC_URI[logo.sha256sum] = "1a54383986adad1521d00e003b4c482c27e8bc60690be944a1f3319c75abc2c9"
16SRC_URI[sha256sum] = "be7ffbd057cadebe2aa144542fd90c6838c6a083b5e8a9048b8ee3b66b29d5fb" 15SRC_URI[sha256sum] = "b65b66b99f0424b93525f987386f22fc5efb9da2bfc92ad4a532249aaffbab0e"
17 16
18do_install() { 17do_install() {
19 # using autotools's default will end up in /usr/local 18 # using autotools's default will end up in /usr/local
@@ -27,3 +26,5 @@ FILES:${PN}-utils = "${bindir}"
27BBCLASSEXTEND = "native" 26BBCLASSEXTEND = "native"
28 27
29RDEPENDS:${PN}-utils = "perl" 28RDEPENDS:${PN}-utils = "perl"
29
30CVE_STATUS[CVE-2026-23868] = "fixed-version: fixed since v6.1.2"
diff --git a/meta-oe/recipes-devtools/grpc/grpc_1.78.1.bb b/meta-oe/recipes-devtools/grpc/grpc_1.80.0.bb
index 6739c659d3..14ead4ccf9 100644
--- a/meta-oe/recipes-devtools/grpc/grpc_1.78.1.bb
+++ b/meta-oe/recipes-devtools/grpc/grpc_1.80.0.bb
@@ -5,7 +5,7 @@ HOMEPAGE = "https://github.com/grpc/grpc"
5SECTION = "libs" 5SECTION = "libs"
6LICENSE = "Apache-2.0 & BSD-3-Clause & MPL-2.0 & MIT & BSD-2-Clause" 6LICENSE = "Apache-2.0 & BSD-3-Clause & MPL-2.0 & MIT & BSD-2-Clause"
7LIC_FILES_CHKSUM = " \ 7LIC_FILES_CHKSUM = " \
8 file://LICENSE;md5=731e401b36f8077ae0c134b59be5c906 \ 8 file://LICENSE;md5=fe8c552b7748e45c00ac55ac0257f6c9 \
9 file://third_party/utf8_range/LICENSE;md5=d4974d297231477b2ff507c35d61c13c \ 9 file://third_party/utf8_range/LICENSE;md5=d4974d297231477b2ff507c35d61c13c \
10 file://third_party/xxhash/LICENSE;md5=cdfe7764d5685d8e08b3df302885d7f3 \ 10 file://third_party/xxhash/LICENSE;md5=cdfe7764d5685d8e08b3df302885d7f3 \
11" 11"
@@ -23,8 +23,8 @@ RDEPENDS:${PN}-dev:append:class-native = " ${PN}-compiler"
23# Both dependencies are mutually exclusive 23# Both dependencies are mutually exclusive
24# RDEPENDS:${PN}-dev += "${PN}-compiler" 24# RDEPENDS:${PN}-dev += "${PN}-compiler"
25 25
26SRCREV = "5b6492ea90b2b867a6adad1b10a6edda28e860d1" 26SRCREV = "f5e2d6e856176c2f6b7691032adfefe21e5f64c1"
27BRANCH = "v1.78.x" 27BRANCH = "v1.80.x"
28SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;branch=${BRANCH};tag=v${PV} \ 28SRC_URI = "gitsm://github.com/grpc/grpc.git;protocol=https;branch=${BRANCH};tag=v${PV} \
29 file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \ 29 file://0001-cmake-Link-with-libatomic-on-rv32-rv64.patch \
30 " 30 "
diff --git a/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.7.bb b/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.12.bb
index 50d45ef57b..2d65ef6622 100644
--- a/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.7.bb
+++ b/meta-oe/recipes-devtools/gst-editing-services/gst-editing-services_1.22.12.bb
@@ -18,7 +18,7 @@ inherit meson pkgconfig upstream-version-is-even gobject-introspection features_
18EXTRA_OEMESON = "-Dvalidate=disabled" 18EXTRA_OEMESON = "-Dvalidate=disabled"
19 19
20SRC_URI = "http://gstreamer.freedesktop.org/src/gst-editing-services/gst-editing-services-${PV}.tar.xz" 20SRC_URI = "http://gstreamer.freedesktop.org/src/gst-editing-services/gst-editing-services-${PV}.tar.xz"
21SRC_URI[sha256sum] = "fec56a2c37a253cd048d288d4c7eda6eff191022b09db975e07a2c105d1b521e" 21SRC_URI[sha256sum] = "792339135ce713088663cc5d44e0aea8217793e88fabfd11571e7abf4a429f2c"
22 22
23PACKAGES += "gst-validate-launcher libges" 23PACKAGES += "gst-validate-launcher libges"
24 24
diff --git a/meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_0.25.bb b/meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_0.26.bb
index 138f7fc2bc..57ade99a1d 100644
--- a/meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_0.25.bb
+++ b/meta-oe/recipes-devtools/include-what-you-use/include-what-you-use_0.26.bb
@@ -10,9 +10,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.TXT;md5=3bb66a14534286912cd6f26649b5c60a \
10 10
11DEPENDS = "clang" 11DEPENDS = "clang"
12 12
13PV .= "+git" 13SRCREV = "01a091d16b3dedb808db21f32ed3e761737a3691"
14SRCREV = "791e69ea4662cb3e74e8128fd5fd69bd7f4ea6b3" 14SRC_URI = "git://github.com/include-what-you-use/include-what-you-use.git;protocol=https;branch=clang_22;tag=${PV}"
15SRC_URI = "git://github.com/include-what-you-use/include-what-you-use.git;protocol=https;branch=clang_21"
16 15
17inherit cmake python3native 16inherit cmake python3native
18 17
diff --git a/meta-oe/recipes-devtools/isocline/isocline_1.1.0.bb b/meta-oe/recipes-devtools/isocline/isocline_1.1.0.bb
new file mode 100644
index 0000000000..c50ac01c49
--- /dev/null
+++ b/meta-oe/recipes-devtools/isocline/isocline_1.1.0.bb
@@ -0,0 +1,28 @@
1SUMMARY = "Isocline is a portable GNU readline alternative."
2DESCRIPTION = "Isocline is a pure C library that can be used \
3 as an alternative to the GNU readline library. \
4 "
5HOMEPAGE = "https://github.com/daanx/isocline"
6BUGTRACKER = "https://github.com/daanx/isocline/issues"
7
8LICENSE = "MIT"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=8d05469c537534c7405c82c81a526bcd"
10
11SRC_URI = "git://github.com/daanx/isocline.git;protocol=https;branch=main;tag=v${PV}"
12SRCREV = "d55a58139badbe83d61c5d89954fa5bddcabe6d7"
13
14
15inherit cmake
16
17CFLAGS += "-fPIC"
18
19do_install() {
20 install -d ${D}${libdir}
21 install -m 0644 ${B}/libisocline.a ${D}${libdir}/
22 install -d ${D}${includedir}
23 cp ${S}/include/isocline.h ${D}${includedir}/
24}
25
26FILES:${PN}-dev = "${libdir}/libisocline.a"
27FILES:${PN}-dev = "${includedir}/isocline.h"
28FILES:${PN}-dbg += "${libdir}/.debug/libisocline.a"
diff --git a/meta-oe/recipes-devtools/jemalloc/files/1a15fe33a48c52bfe26ea83e49f0d317a47da3ea.patch b/meta-oe/recipes-devtools/jemalloc/files/1a15fe33a48c52bfe26ea83e49f0d317a47da3ea.patch
new file mode 100644
index 0000000000..a4fad4af61
--- /dev/null
+++ b/meta-oe/recipes-devtools/jemalloc/files/1a15fe33a48c52bfe26ea83e49f0d317a47da3ea.patch
@@ -0,0 +1,158 @@
1From 1a15fe33a48c52bfe26ea83e49f0d317a47da3ea Mon Sep 17 00:00:00 2001
2From: lexprfuncall <cshapiro@meta.com>
3Date: Mon, 27 Apr 2026 11:50:27 -0700
4Subject: [PATCH] Replace std::__throw_bad_alloc call with standard C++ (#2900)
5
6* Replace std::__throw_bad_alloc call with standard C++
7
8Since December of 2025, std::__throw_bad_alloc is no longer visible
9through #include <new> causing jemalloc build failures with gcc 16.
10As far as I can tell, all std::__throw_bad_alloc did was arrange to
11raise a std::bad_alloc exception if exceptions are enabled. I am not
12sure whether its usage was truly meaningful in jemalloc since the call
13is wrapped in a try catch and any usage of try catch is considered an
14error when compiling with -fno-exceptions on gcc, at least.
15
16This change adds a check to configure.ac that determines whether
17exceptions are enabled by compiling a simple try catch that raises a
18std::bad_alloc exception. If that test succeeds, the macro
19JEMALLOC_HAVE_CXX_EXCEPTIONS is defined, and jemalloc will raise an
20exception. Otherwise, we call std::terminate() to abort.
21
22This was tested on FreeBSD with the gcc16 port with and without exceptions
23enabled.
24
25* Replace std::set_new_handler calls with std::get_new_handler
26
27Previously, std::set_new_handler was used as a workaround for
28compilers with only partial support for C++11. Now that C++14 is a
29requirement to enable C++ support, we can assume std::get_new_handler
30is available.
31
32Upstream-Status: Backport [https://github.com/jemalloc/jemalloc/commit/1a15fe33a48c52bfe26ea83e49f0d317a47da3ea]
33---
34 Makefile.in | 6 +++--
35 configure.ac | 23 +++++++++++++++++
36 .../internal/jemalloc_internal_defs.h.in | 3 +++
37 src/jemalloc_cpp.cpp | 25 ++++++++++---------
38 4 files changed, 43 insertions(+), 14 deletions(-)
39
40diff --git a/Makefile.in b/Makefile.in
41index a93048d7b8..1f9d14f1f2 100644
42--- a/Makefile.in
43+++ b/Makefile.in
44@@ -337,9 +337,11 @@ TESTS_INTEGRATION += \
45 endif
46 ifeq (@enable_cxx@, 1)
47 CPP_SRCS := $(srcroot)src/jemalloc_cpp.cpp
48-TESTS_INTEGRATION_CPP := $(srcroot)test/integration/cpp/basic.cpp \
49- $(srcroot)test/integration/cpp/infallible_new_true.cpp \
50+TESTS_INTEGRATION_CPP := $(srcroot)test/integration/cpp/basic.cpp
51+ifeq (@enable_cxx_exceptions@, 1)
52+TESTS_INTEGRATION_CPP += $(srcroot)test/integration/cpp/infallible_new_true.cpp \
53 $(srcroot)test/integration/cpp/infallible_new_false.cpp
54+endif
55 else
56 CPP_SRCS :=
57 TESTS_INTEGRATION_CPP :=
58diff --git a/configure.ac b/configure.ac
59index 321a729012..d151829832 100644
60--- a/configure.ac
61+++ b/configure.ac
62@@ -374,7 +374,30 @@ fi
63 if test "x$enable_cxx" = "x1"; then
64 AC_DEFINE([JEMALLOC_ENABLE_CXX], [ ], [ ])
65 fi
66+if test "x$enable_cxx" = "x1"; then
67+ dnl Now check whether the C++ compiler has exceptions enabled.
68+ AC_LANG_PUSH([C++])
69+ SAVED_CXXFLAGS="${CXXFLAGS}"
70+ CXXFLAGS="${CXXFLAGS} ${EXTRA_CXXFLAGS}"
71+ JE_COMPILABLE([C++ exception support], [
72+#include <new>
73+], [
74+ try {
75+ throw std::bad_alloc();
76+ } catch (const std::bad_alloc &) {
77+ }
78+], [je_cv_cxx_exceptions])
79+ CXXFLAGS="${SAVED_CXXFLAGS}"
80+ AC_LANG_POP([C++])
81+ if test "x${je_cv_cxx_exceptions}" = "xyes" ; then
82+ AC_DEFINE([JEMALLOC_HAVE_CXX_EXCEPTIONS], [ ], [ ])
83+ enable_cxx_exceptions="1"
84+ else
85+ enable_cxx_exceptions="0"
86+ fi
87+fi
88 AC_SUBST([enable_cxx])
89+AC_SUBST([enable_cxx_exceptions])
90 AC_SUBST([CONFIGURE_CXXFLAGS])
91 AC_SUBST([SPECIFIED_CXXFLAGS])
92 AC_SUBST([EXTRA_CXXFLAGS])
93diff --git a/include/jemalloc/internal/jemalloc_internal_defs.h.in b/include/jemalloc/internal/jemalloc_internal_defs.h.in
94index 31ae2e8ed2..54d4da2032 100644
95--- a/include/jemalloc/internal/jemalloc_internal_defs.h.in
96+++ b/include/jemalloc/internal/jemalloc_internal_defs.h.in
97@@ -465,6 +465,9 @@
98 /* Is C++ support being built? */
99 #undef JEMALLOC_ENABLE_CXX
100
101+/* Are C++ exceptions enabled? */
102+#undef JEMALLOC_HAVE_CXX_EXCEPTIONS
103+
104 /* Performs additional size checks when defined. */
105 #undef JEMALLOC_OPT_SIZE_CHECKS
106
107diff --git a/src/jemalloc_cpp.cpp b/src/jemalloc_cpp.cpp
108index 4e838d3b51..ac109bb28e 100644
109--- a/src/jemalloc_cpp.cpp
110+++ b/src/jemalloc_cpp.cpp
111@@ -1,4 +1,4 @@
112-#include <mutex>
113+#include <exception>
114 #include <new>
115 // NOLINTBEGIN(misc-use-anonymous-namespace)
116
117@@ -78,29 +78,30 @@ handleOOM(std::size_t size, bool nothrow) {
118 void *ptr = nullptr;
119
120 while (ptr == nullptr) {
121- std::new_handler handler;
122- // GCC-4.8 and clang 4.0 do not have std::get_new_handler.
123- {
124- static std::mutex mtx;
125- std::lock_guard<std::mutex> lock(mtx);
126-
127- handler = std::set_new_handler(nullptr);
128- std::set_new_handler(handler);
129- }
130+ std::new_handler handler = std::get_new_handler();
131 if (handler == nullptr)
132 break;
133
134+#ifdef JEMALLOC_HAVE_CXX_EXCEPTIONS
135 try {
136 handler();
137 } catch (const std::bad_alloc &) {
138 break;
139 }
140+#else
141+ handler();
142+#endif
143
144 ptr = je_malloc(size);
145 }
146
147- if (ptr == nullptr && !nothrow)
148- std::__throw_bad_alloc();
149+ if (ptr == nullptr && !nothrow) {
150+#ifdef JEMALLOC_HAVE_CXX_EXCEPTIONS
151+ throw std::bad_alloc();
152+#else
153+ std::terminate();
154+#endif
155+ }
156 return ptr;
157 }
158
diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb
index aa1f417604..f3a310029f 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.1.bb
@@ -13,13 +13,12 @@ SECTION = "libs"
13 13
14LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f" 14LIC_FILES_CHKSUM = "file://COPYING;md5=ea061f8731d5e6a5761dfad951ef5f5f"
15 15
16SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=dev;protocol=https \ 16SRC_URI = "git://github.com/jemalloc/jemalloc.git;branch=master;protocol=https;tag=${PV} \
17 file://1a15fe33a48c52bfe26ea83e49f0d317a47da3ea.patch \
17 file://run-ptest \ 18 file://run-ptest \
18 " 19 "
19SRCREV = "630434bb0ac619f7beec927569782d924c459385" 20SRCREV = "81034ce1f1373e37dc865038e1bc8eeecf559ce8"
20PV_LONG := "${PV}-171-g${SRCREV}" 21PV_LONG := "${PV}-0-g${SRCREV}"
21PV .= "+git"
22
23 22
24inherit autotools ptest 23inherit autotools ptest
25 24
@@ -29,6 +28,8 @@ EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_"
29# For some reason VERSION file populated only in tarball distribution. 28# For some reason VERSION file populated only in tarball distribution.
30# Adding jemalloc version since this recipe is using source code from git tag 29# Adding jemalloc version since this recipe is using source code from git tag
31EXTRA_OECONF:append = " --with-version=${PV_LONG} --enable-xmalloc" 30EXTRA_OECONF:append = " --with-version=${PV_LONG} --enable-xmalloc"
31# Enable jemalloc debug build flag if DEBUG_BUILD is enabled
32EXTRA_OECONF:append = " ${@oe.utils.vartrue('DEBUG_BUILD', '--enable-debug=yes', '', d)}"
32 33
33do_install:append() { 34do_install:append() {
34 sed -i -e 's@${STAGING_DIR_HOST}@@g' \ 35 sed -i -e 's@${STAGING_DIR_HOST}@@g' \
diff --git a/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch
new file mode 100644
index 0000000000..12a64a75ed
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/0001-Support-building-with-disable-maintainer-mode-and-so.patch
@@ -0,0 +1,44 @@
1From 27f417f4812e688a59fc5186b7768cec004cd6e5 Mon Sep 17 00:00:00 2001
2From: Peter Kjellerstedt <peter.kjellerstedt@gmail.com>
3Date: Wed, 8 Apr 2026 05:58:49 +0200
4Subject: [PATCH] Support building with --disable-maintainer-mode and source !=
5 build dir (#3518)
6
7If --disable-maintainer-mode is enabled, then the rules for generating
8parser.[ch] and lexer.[ch] did nothing. This worked fine if the source
9and build directories are the same as the pre-generated parser.c and
10lexer.c files would suffice. However, if the build directory is not the
11same as the source directory, then the rest of the Make rules expect
12parser.[ch] and lexer.[ch] to have been created in the build directory
13if their source files (parser.y and lexer.l) are newer than the target
14files, which can happen in case the source is fetched using Git.
15
16Avoid the problem by copying the files to the build directory if needed.
17
18Co-authored-by: Peter Kjellerstedt <pkj@axis.com>
19Upstream-Status: Backport [https://github.com/jqlang/jq/commit/27f417f4812e688a59fc5186b7768cec004cd6e5]
20---
21 Makefile.am | 9 +++++++--
22 1 file changed, 7 insertions(+), 2 deletions(-)
23
24diff --git a/Makefile.am b/Makefile.am
25index 96d6038..acb9443 100644
26--- a/Makefile.am
27+++ b/Makefile.am
28@@ -41,9 +41,14 @@ src/lexer.h: src/lexer.c
29 else
30 BUILT_SOURCES = src/builtin.inc src/config_opts.inc src/version.h
31 .y.c:
32- $(AM_V_YACC) echo "NOT building parser.c!"
33+ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@
34+ $(AM_V_YACC) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h
35+ $(AM_V_YACC) touch $@ $*.h
36+
37 .l.c:
38- $(AM_V_LEX) echo "NOT building lexer.c!"
39+ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(@F) $@
40+ $(AM_V_LEX) [ "$(<D)" = "$(@D)" ] || cp $(<D)/$(*F).h $*.h
41+ $(AM_V_LEX) touch $@ $*.h
42 endif
43
44 # Tell YACC (Bison) autoconf macros that you want a header file created.
diff --git a/meta-oe/recipes-devtools/jq/jq/CVE-2026-32316.patch b/meta-oe/recipes-devtools/jq/jq/CVE-2026-32316.patch
new file mode 100644
index 0000000000..1277b356d8
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/CVE-2026-32316.patch
@@ -0,0 +1,53 @@
1From 321e62b356df2d4ed47aba4f3818e447ec4d77fc Mon Sep 17 00:00:00 2001
2From: itchyny <itchyny@cybozu.co.jp>
3Date: Thu, 12 Mar 2026 20:28:43 +0900
4Subject: [PATCH] Fix heap buffer overflow in `jvp_string_append` and
5 `jvp_string_copy_replace_bad`
6
7In `jvp_string_append`, the allocation size `(currlen + len) * 2` could
8overflow `uint32_t` when `currlen + len` exceeds `INT_MAX`, causing a small
9allocation followed by a large `memcpy`.
10
11In `jvp_string_copy_replace_bad`, the output buffer size calculation
12`length * 3 + 1` could overflow `uint32_t`, again resulting in a small
13allocation followed by a large write.
14
15Add overflow checks to both functions to return an error for strings
16that would exceed `INT_MAX` in length. Fixes CVE-2026-32316.
17
18CVE: CVE-2026-32316
19Upstream-Status: Backport [https://github.com/jqlang/jq/commit/e47e56d226519635768e6aab2f38f0ab037c09e5]
20Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
21---
22 src/jv.c | 11 ++++++++++-
23 1 file changed, 10 insertions(+), 1 deletion(-)
24
25diff --git a/src/jv.c b/src/jv.c
26index e4529a4..74be05a 100644
27--- a/src/jv.c
28+++ b/src/jv.c
29@@ -1114,7 +1114,12 @@ static jv jvp_string_copy_replace_bad(const char* data, uint32_t length) {
30 const char* end = data + length;
31 const char* i = data;
32
33- uint32_t maxlength = length * 3 + 1; // worst case: all bad bytes, each becomes a 3-byte U+FFFD
34+ // worst case: all bad bytes, each becomes a 3-byte U+FFFD
35+ uint64_t maxlength = (uint64_t)length * 3 + 1;
36+ if (maxlength >= INT_MAX) {
37+ return jv_invalid_with_msg(jv_string("String too long"));
38+ }
39+
40 jvp_string* s = jvp_string_alloc(maxlength);
41 char* out = s->data;
42 int c = 0;
43@@ -1174,6 +1179,10 @@ static uint32_t jvp_string_remaining_space(jvp_string* s) {
44 static jv jvp_string_append(jv string, const char* data, uint32_t len) {
45 jvp_string* s = jvp_string_ptr(string);
46 uint32_t currlen = jvp_string_length(s);
47+ if ((uint64_t)currlen + len >= INT_MAX) {
48+ jv_free(string);
49+ return jv_invalid_with_msg(jv_string("String too long"));
50+ }
51
52 if (jvp_refcnt_unshared(string.u.ptr) &&
53 jvp_string_remaining_space(s) >= len) {
diff --git a/meta-oe/recipes-devtools/jq/jq/CVE-2026-33947.patch b/meta-oe/recipes-devtools/jq/jq/CVE-2026-33947.patch
new file mode 100644
index 0000000000..69a8381f06
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/CVE-2026-33947.patch
@@ -0,0 +1,104 @@
1From 5fd935884a6f5b3d8ecdcacfc5d3982140f3a478 Mon Sep 17 00:00:00 2001
2From: itchyny <itchyny@cybozu.co.jp>
3Date: Mon, 13 Apr 2026 11:23:40 +0900
4Subject: [PATCH] Limit path depth to prevent stack overflow
5
6Deeply nested path arrays can cause unbounded recursion in
7`jv_setpath`, `jv_getpath`, and `jv_delpaths`, leading to
8stack overflow. Add a depth limit of 10000 to match the
9existing `tojson` depth limit. This fixes CVE-2026-33947.
10
11CVE: CVE-2026-33947
12Upstream-Status: Backport [https://github.com/jqlang/jq/commit/fb59f1491058d58bdc3e8dd28f1773d1ac690a1f]
13Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
14---
15 src/jv_aux.c | 21 +++++++++++++++++++++
16 tests/jq.test | 25 +++++++++++++++++++++++++
17 2 files changed, 46 insertions(+)
18
19diff --git a/src/jv_aux.c b/src/jv_aux.c
20index bc1405f..594a21f 100644
21--- a/src/jv_aux.c
22+++ b/src/jv_aux.c
23@@ -375,6 +375,10 @@ static jv jv_dels(jv t, jv keys) {
24 return t;
25 }
26
27+#ifndef MAX_PATH_DEPTH
28+#define MAX_PATH_DEPTH (10000)
29+#endif
30+
31 jv jv_setpath(jv root, jv path, jv value) {
32 if (jv_get_kind(path) != JV_KIND_ARRAY) {
33 jv_free(value);
34@@ -382,6 +386,12 @@ jv jv_setpath(jv root, jv path, jv value) {
35 jv_free(path);
36 return jv_invalid_with_msg(jv_string("Path must be specified as an array"));
37 }
38+ if (jv_array_length(jv_copy(path)) > MAX_PATH_DEPTH) {
39+ jv_free(value);
40+ jv_free(root);
41+ jv_free(path);
42+ return jv_invalid_with_msg(jv_string("Path too deep"));
43+ }
44 if (!jv_is_valid(root)){
45 jv_free(value);
46 jv_free(path);
47@@ -434,6 +444,11 @@ jv jv_getpath(jv root, jv path) {
48 jv_free(path);
49 return jv_invalid_with_msg(jv_string("Path must be specified as an array"));
50 }
51+ if (jv_array_length(jv_copy(path)) > MAX_PATH_DEPTH) {
52+ jv_free(root);
53+ jv_free(path);
54+ return jv_invalid_with_msg(jv_string("Path too deep"));
55+ }
56 if (!jv_is_valid(root)) {
57 jv_free(path);
58 return root;
59@@ -511,6 +526,12 @@ jv jv_delpaths(jv object, jv paths) {
60 jv_free(elem);
61 return err;
62 }
63+ if (jv_array_length(jv_copy(elem)) > MAX_PATH_DEPTH) {
64+ jv_free(object);
65+ jv_free(paths);
66+ jv_free(elem);
67+ return jv_invalid_with_msg(jv_string("Path too deep"));
68+ }
69 jv_free(elem);
70 }
71 if (jv_array_length(jv_copy(paths)) == 0) {
72diff --git a/tests/jq.test b/tests/jq.test
73index 4ecf72f..6186d8b 100644
74--- a/tests/jq.test
75+++ b/tests/jq.test
76@@ -2507,3 +2507,28 @@ strflocaltime("" | ., @uri)
77 0
78 ""
79 ""
80+
81+# regression test for CVE-2026-33947
82+setpath([range(10000) | 0]; 0) | flatten
83+null
84+[0]
85+
86+try setpath([range(10001) | 0]; 0) catch .
87+null
88+"Path too deep"
89+
90+getpath([range(10000) | 0])
91+null
92+null
93+
94+try getpath([range(10001) | 0]) catch .
95+null
96+"Path too deep"
97+
98+delpaths([[range(10000) | 0]])
99+null
100+null
101+
102+try delpaths([[range(10001) | 0]]) catch .
103+null
104+"Path too deep"
diff --git a/meta-oe/recipes-devtools/jq/jq/CVE-2026-33948.patch b/meta-oe/recipes-devtools/jq/jq/CVE-2026-33948.patch
new file mode 100644
index 0000000000..8625429c74
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/CVE-2026-33948.patch
@@ -0,0 +1,49 @@
1From 19a792c4cdb6b91c056eac033ac3367af6e67755 Mon Sep 17 00:00:00 2001
2From: itchyny <itchyny@cybozu.co.jp>
3Date: Mon, 13 Apr 2026 08:46:11 +0900
4Subject: [PATCH] Fix NUL truncation in the JSON parser
5
6This fixes CVE-2026-33948.
7
8CVE: CVE-2026-33948
9Upstream-Status: Backport [https://github.com/jqlang/jq/commit/6374ae0bcdfe33a18eb0ae6db28493b1f34a0a5b]
10Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
11---
12 src/util.c | 8 +-------
13 tests/shtest | 6 ++++++
14 2 files changed, 7 insertions(+), 7 deletions(-)
15
16diff --git a/src/util.c b/src/util.c
17index bcb86da..60ec4d5 100644
18--- a/src/util.c
19+++ b/src/util.c
20@@ -309,13 +309,7 @@ static int jq_util_input_read_more(jq_util_input_state *state) {
21 if (p != NULL)
22 state->current_line++;
23
24- if (p == NULL && state->parser != NULL) {
25- /*
26- * There should be no NULs in JSON texts (but JSON text
27- * sequences are another story).
28- */
29- state->buf_valid_len = strlen(state->buf);
30- } else if (p == NULL && feof(state->current_input)) {
31+ if (p == NULL && feof(state->current_input)) {
32 size_t i;
33
34 /*
35diff --git a/tests/shtest b/tests/shtest
36index 887a6bb..a046afe 100755
37--- a/tests/shtest
38+++ b/tests/shtest
39@@ -842,4 +842,10 @@ if ! $msys && ! $mingw; then
40 fi
41 fi
42
43+# CVE-2026-33948: No NUL truncation in the JSON parser
44+if printf '{}\x00{}' | $JQ >/dev/null 2> /dev/null; then
45+ printf 'Error expected but jq exited successfully\n' 1>&2
46+ exit 1
47+fi
48+
49 exit 0
diff --git a/meta-oe/recipes-devtools/jq/jq/CVE-2026-39979.patch b/meta-oe/recipes-devtools/jq/jq/CVE-2026-39979.patch
new file mode 100644
index 0000000000..40c57a46a0
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/CVE-2026-39979.patch
@@ -0,0 +1,31 @@
1From ac09f274b6c029a23e3dffc38afac819b5daacc4 Mon Sep 17 00:00:00 2001
2From: itchyny <itchyny@cybozu.co.jp>
3Date: Mon, 13 Apr 2026 11:04:52 +0900
4Subject: [PATCH] Fix out-of-bounds read in jv_parse_sized()
5
6This fixes CVE-2026-39979.
7
8Co-authored-by: Mattias Wadman <mattias.wadman@gmail.com>
9
10CVE: CVE-2026-39979
11Upstream-Status: Backport [https://github.com/jqlang/jq/commit/2f09060afab23fe9390cce7cb860b10416e1bf5f]
12Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
13---
14 src/jv_parse.c | 3 ++-
15 1 file changed, 2 insertions(+), 1 deletion(-)
16
17diff --git a/src/jv_parse.c b/src/jv_parse.c
18index ffcf51f..e6b8aa9 100644
19--- a/src/jv_parse.c
20+++ b/src/jv_parse.c
21@@ -892,8 +892,9 @@ jv jv_parse_sized_custom_flags(const char* string, int length, int flags) {
22
23 if (!jv_is_valid(value) && jv_invalid_has_msg(jv_copy(value))) {
24 jv msg = jv_invalid_get_msg(value);
25- value = jv_invalid_with_msg(jv_string_fmt("%s (while parsing '%s')",
26+ value = jv_invalid_with_msg(jv_string_fmt("%s (while parsing '%.*s')",
27 jv_string_value(msg),
28+ length,
29 string));
30 jv_free(msg);
31 }
diff --git a/meta-oe/recipes-devtools/jq/jq/CVE-2026-47770.patch b/meta-oe/recipes-devtools/jq/jq/CVE-2026-47770.patch
new file mode 100644
index 0000000000..1d6664e842
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/CVE-2026-47770.patch
@@ -0,0 +1,484 @@
1From 63ae676bc6e97635d8246c78f5947ec47eb85a26 Mon Sep 17 00:00:00 2001
2From: Yu-Fu Fu <yufu@yfu.tw>
3Date: Fri, 22 May 2026 04:07:16 -0700
4Subject: [PATCH] Guard deep structural equality and comparison recursion
5 (#3539)
6
7jv_equal and jv_cmp overflows the C stack on deeply nested
8input. Cap recursion at 10000 with -1 / INT_MIN sentinels;
9operators that compose user expressions surface this as
10"Equality check too deep" / "Comparison too deep".
11
12Fixes CVE-2026-47770.
13
14Signed-off-by: Anton Skorup <antonsk@axis.com>
15Upstream-Status: Backport [https://github.com/jqlang/jq/commit/7122866869960b55cea3646bc91334ef55787831]
16---
17 src/builtin.c | 36 +++++++++++++++--
18 src/jv.c | 46 +++++++++++++++++-----
19 src/jv_aux.c | 105 ++++++++++++++++++++++++++++++++++++++++++--------
20 tests/jq.test | 40 +++++++++++++++++++
21 4 files changed, 198 insertions(+), 29 deletions(-)
22
23diff --git a/src/builtin.c b/src/builtin.c
24index ac56f9f..ac25f90 100644
25--- a/src/builtin.c
26+++ b/src/builtin.c
27@@ -295,7 +295,15 @@ jv binop_minus(jv a, jv b) {
28 jv_array_foreach(a, i, x) {
29 int include = 1;
30 jv_array_foreach(b, j, y) {
31- if (jv_equal(jv_copy(x), y)) {
32+ int equal = jv_equal(jv_copy(x), y);
33+ if (equal < 0) {
34+ jv_free(out);
35+ jv_free(x);
36+ jv_free(a);
37+ jv_free(b);
38+ return jv_invalid_with_msg(jv_string("Equality check too deep"));
39+ }
40+ if (equal) {
41 include = 0;
42 break;
43 }
44@@ -379,11 +387,17 @@ jv binop_mod(jv a, jv b) {
45 #undef dtoi
46
47 jv binop_equal(jv a, jv b) {
48- return jv_bool(jv_equal(a, b));
49+ int r = jv_equal(a, b);
50+ if (r < 0)
51+ return jv_invalid_with_msg(jv_string("Equality check too deep"));
52+ return jv_bool(r);
53 }
54
55 jv binop_notequal(jv a, jv b) {
56- return jv_bool(!jv_equal(a, b));
57+ int r = jv_equal(a, b);
58+ if (r < 0)
59+ return jv_invalid_with_msg(jv_string("Equality check too deep"));
60+ return jv_bool(!r);
61 }
62
63 enum cmp_op {
64@@ -395,6 +409,8 @@ enum cmp_op {
65
66 static jv order_cmp(jv a, jv b, enum cmp_op op) {
67 int r = jv_cmp(a, b);
68+ if (r == INT_MIN)
69+ return jv_invalid_with_msg(jv_string("Comparison too deep"));
70 return jv_bool((op == CMP_OP_LESS && r < 0) ||
71 (op == CMP_OP_LESSEQ && r <= 0) ||
72 (op == CMP_OP_GREATEREQ && r >= 0) ||
73@@ -845,6 +861,12 @@ static jv f_bsearch(jq_state *jq, jv input, jv target) {
74 while (start < end) {
75 int mid = start + (end - start) / 2;
76 int result = jv_cmp(jv_copy(target), jv_array_get(jv_copy(input), mid));
77+ if (result == INT_MIN) {
78+ jv_free(answer);
79+ jv_free(input);
80+ jv_free(target);
81+ return jv_invalid_with_msg(jv_string("Comparison too deep"));
82+ }
83 if (result == 0) {
84 answer = jv_number(mid);
85 break;
86@@ -1136,6 +1158,14 @@ static jv minmax_by(jv values, jv keys, int is_min) {
87 for (int i=1; i<jv_array_length(jv_copy(values)); i++) {
88 jv item = jv_array_get(jv_copy(keys), i);
89 int cmp = jv_cmp(jv_copy(item), jv_copy(retkey));
90+ if (cmp == INT_MIN) {
91+ jv_free(item);
92+ jv_free(values);
93+ jv_free(keys);
94+ jv_free(retkey);
95+ jv_free(ret);
96+ return jv_invalid_with_msg(jv_string("Comparison too deep"));
97+ }
98 if ((cmp < 0) == (is_min == 1)) {
99 jv_free(retkey);
100 retkey = item;
101diff --git a/src/jv.c b/src/jv.c
102index f701b46..e079d08 100644
103--- a/src/jv.c
104+++ b/src/jv.c
105@@ -912,16 +912,20 @@ static jv* jvp_array_write(jv* a, int i) {
106 }
107 }
108
109-static int jvp_array_equal(jv a, jv b) {
110+static int jvp_equal(jv a, jv b, int depth);
111+
112+static int jvp_array_equal(jv a, jv b, int depth) {
113 if (jvp_array_length(a) != jvp_array_length(b))
114 return 0;
115 if (jvp_array_ptr(a) == jvp_array_ptr(b) &&
116 jvp_array_offset(a) == jvp_array_offset(b))
117 return 1;
118 for (int i=0; i<jvp_array_length(a); i++) {
119- if (!jv_equal(jv_copy(*jvp_array_read(a, i)),
120- jv_copy(*jvp_array_read(b, i))))
121- return 0;
122+ int r = jvp_equal(jv_copy(*jvp_array_read(a, i)),
123+ jv_copy(*jvp_array_read(b, i)),
124+ depth);
125+ if (r <= 0)
126+ return r;
127 }
128 return 1;
129 }
130@@ -1071,7 +1075,14 @@ jv jv_array_indexes(jv a, jv b) {
131 int alen = jv_array_length(jv_copy(a));
132 for (int ai = 0; ai < alen; ++ai) {
133 jv_array_foreach(b, bi, belem) {
134- if (!jv_equal(jv_array_get(jv_copy(a), ai + bi), belem))
135+ int equal = jv_equal(jv_array_get(jv_copy(a), ai + bi), belem);
136+ if (equal < 0) {
137+ jv_free(res);
138+ jv_free(a);
139+ jv_free(b);
140+ return jv_invalid_with_msg(jv_string("Equality check too deep"));
141+ }
142+ if (!equal)
143 idx = -1;
144 else if (bi == 0 && idx == -1)
145 idx = ai;
146@@ -1828,7 +1839,7 @@ static int jvp_object_length(jv object) {
147 return n;
148 }
149
150-static int jvp_object_equal(jv o1, jv o2) {
151+static int jvp_object_equal(jv o1, jv o2, int depth) {
152 int len2 = jvp_object_length(o2);
153 int len1 = 0;
154 for (int i=0; i<jvp_object_size(o1); i++) {
155@@ -1837,7 +1848,8 @@ static int jvp_object_equal(jv o1, jv o2) {
156 jv* slot2 = jvp_object_read(o2, slot->string);
157 if (!slot2) return 0;
158 // FIXME: do less refcounting here
159- if (!jv_equal(jv_copy(slot->value), jv_copy(*slot2))) return 0;
160+ int r = jvp_equal(jv_copy(slot->value), jv_copy(*slot2), depth);
161+ if (r <= 0) return r;
162 len1++;
163 }
164 return len1 == len2;
165@@ -2032,7 +2044,16 @@ int jv_get_refcnt(jv j) {
166 * Higher-level operations
167 */
168
169-int jv_equal(jv a, jv b) {
170+#ifndef MAX_EQUAL_DEPTH
171+#define MAX_EQUAL_DEPTH (10000)
172+#endif
173+
174+static int jvp_equal(jv a, jv b, int depth) {
175+ if (depth > MAX_EQUAL_DEPTH) {
176+ jv_free(a);
177+ jv_free(b);
178+ return -1;
179+ }
180 int r;
181 if (jv_get_kind(a) != jv_get_kind(b)) {
182 r = 0;
183@@ -2048,13 +2069,13 @@ int jv_equal(jv a, jv b) {
184 r = jvp_number_equal(a, b);
185 break;
186 case JV_KIND_ARRAY:
187- r = jvp_array_equal(a, b);
188+ r = jvp_array_equal(a, b, depth + 1);
189 break;
190 case JV_KIND_STRING:
191 r = jvp_string_equal(a, b);
192 break;
193 case JV_KIND_OBJECT:
194- r = jvp_object_equal(a, b);
195+ r = jvp_object_equal(a, b, depth + 1);
196 break;
197 default:
198 r = 1;
199@@ -2066,6 +2087,11 @@ int jv_equal(jv a, jv b) {
200 return r;
201 }
202
203+// Returns 1 if equal, 0 if not equal, or -1 if the comparison is too deep
204+int jv_equal(jv a, jv b) {
205+ return jvp_equal(a, b, 0);
206+}
207+
208 int jv_identical(jv a, jv b) {
209 int r;
210 if (a.kind_flags != b.kind_flags
211diff --git a/src/jv_aux.c b/src/jv_aux.c
212index 594a21f..a39f1f1 100644
213--- a/src/jv_aux.c
214+++ b/src/jv_aux.c
215@@ -16,6 +16,24 @@ static double jv_number_get_value_and_consume(jv number) {
216 return value;
217 }
218
219+#ifndef MAX_CMP_DEPTH
220+#define MAX_CMP_DEPTH (10000)
221+#endif
222+
223+struct sort_cmp_state {
224+ int too_deep;
225+};
226+
227+#ifdef _MSC_VER
228+static __declspec(thread) struct sort_cmp_state sort_cmp_state;
229+#else
230+#ifdef HAVE___THREAD
231+static __thread struct sort_cmp_state sort_cmp_state;
232+#else
233+static struct sort_cmp_state sort_cmp_state;
234+#endif
235+#endif
236+
237 static jv parse_slice(jv j, jv slice, int* pstart, int* pend) {
238 // Array slices
239 jv start_jv = jv_object_get(jv_copy(slice), jv_string("start"));
240@@ -471,8 +489,7 @@ static jv delpaths_sorted(jv object, jv paths, int start) {
241 int delkey = jv_array_length(jv_array_get(jv_copy(paths), i)) == start + 1;
242 jv key = jv_array_get(jv_array_get(jv_copy(paths), i), start);
243 while (j < jv_array_length(jv_copy(paths)) &&
244- jv_equal(jv_copy(key), jv_array_get(jv_array_get(jv_copy(paths), j), start)))
245- j++;
246+ jv_equal(jv_copy(key), jv_array_get(jv_array_get(jv_copy(paths), j), start)) == 1);
247 // if i <= entry < j, then entry starts with key
248 if (delkey) {
249 // deleting this entire key, we don't care about any more specific deletions
250@@ -606,7 +623,13 @@ jv jv_keys(jv x) {
251 }
252 }
253
254-int jv_cmp(jv a, jv b) {
255+static int jvp_cmp(jv a, jv b, int depth) {
256+ if (depth > MAX_CMP_DEPTH) {
257+ jv_free(a);
258+ jv_free(b);
259+ return INT_MIN;
260+ }
261+
262 if (jv_get_kind(a) != jv_get_kind(b)) {
263 int r = (int)jv_get_kind(a) - (int)jv_get_kind(b);
264 jv_free(a);
265@@ -621,14 +644,13 @@ int jv_cmp(jv a, jv b) {
266 case JV_KIND_FALSE:
267 case JV_KIND_TRUE:
268 // there's only one of each of these values
269- r = 0;
270 break;
271
272 case JV_KIND_NUMBER: {
273 if (jvp_number_is_nan(a)) {
274- r = jv_cmp(jv_null(), jv_copy(b));
275+ r = jvp_cmp(jv_null(), jv_copy(b), depth);
276 } else if (jvp_number_is_nan(b)) {
277- r = jv_cmp(jv_copy(a), jv_null());
278+ r = jvp_cmp(jv_copy(a), jv_null(), depth);
279 } else {
280 r = jvp_number_cmp(a, b);
281 }
282@@ -652,7 +674,9 @@ int jv_cmp(jv a, jv b) {
283 }
284 jv xa = jv_array_get(jv_copy(a), i);
285 jv xb = jv_array_get(jv_copy(b), i);
286- r = jv_cmp(xa, xb);
287+ r = jvp_cmp(xa, xb, depth + 1);
288+ if (r == INT_MIN)
289+ break;
290 i++;
291 }
292 break;
293@@ -661,13 +685,14 @@ int jv_cmp(jv a, jv b) {
294 case JV_KIND_OBJECT: {
295 jv keys_a = jv_keys(jv_copy(a));
296 jv keys_b = jv_keys(jv_copy(b));
297- r = jv_cmp(jv_copy(keys_a), keys_b);
298+ r = jvp_cmp(jv_copy(keys_a), keys_b, depth + 1);
299 if (r == 0) {
300 jv_array_foreach(keys_a, i, key) {
301 jv xa = jv_object_get(jv_copy(a), jv_copy(key));
302 jv xb = jv_object_get(jv_copy(b), key);
303- r = jv_cmp(xa, xb);
304- if (r) break;
305+ r = jvp_cmp(xa, xb, depth + 1);
306+ if (r != 0)
307+ break;
308 }
309 }
310 jv_free(keys_a);
311@@ -680,6 +705,11 @@ int jv_cmp(jv a, jv b) {
312 return r;
313 }
314
315+// Returns <0, 0, >0 if a is less than, equal to, or greater than b, or
316+// INT_MIN if the comparison is too deep
317+int jv_cmp(jv a, jv b) {
318+ return jvp_cmp(a, b, 0);
319+}
320
321 struct sort_entry {
322 jv object;
323@@ -687,19 +717,32 @@ struct sort_entry {
324 int index;
325 };
326
327+static void sort_entry_array_free(struct sort_entry* entries, int start, int n) {
328+ for (int i = start; i < n; i++) {
329+ jv_free(entries[i].key);
330+ jv_free(entries[i].object);
331+ }
332+ jv_mem_free(entries);
333+}
334+
335 static int sort_cmp(const void* pa, const void* pb) {
336 const struct sort_entry* a = pa;
337 const struct sort_entry* b = pb;
338 int r = jv_cmp(jv_copy(a->key), jv_copy(b->key));
339+ if (r == INT_MIN) {
340+ sort_cmp_state.too_deep = 1;
341+ return 0;
342+ }
343 // comparing by index if r == 0 makes the sort stable
344 return r ? r : (a->index - b->index);
345 }
346
347-static struct sort_entry* sort_items(jv objects, jv keys) {
348+static struct sort_entry* sort_items(jv objects, jv keys, int *too_deep) {
349 assert(jv_get_kind(objects) == JV_KIND_ARRAY);
350 assert(jv_get_kind(keys) == JV_KIND_ARRAY);
351 assert(jv_array_length(jv_copy(objects)) == jv_array_length(jv_copy(keys)));
352 int n = jv_array_length(jv_copy(objects));
353+ *too_deep = 0;
354 if (n == 0) {
355 jv_free(objects);
356 jv_free(keys);
357@@ -713,7 +756,13 @@ static struct sort_entry* sort_items(jv objects, jv keys) {
358 }
359 jv_free(objects);
360 jv_free(keys);
361+ sort_cmp_state.too_deep = 0;
362 qsort(entries, n, sizeof(struct sort_entry), sort_cmp);
363+ if (sort_cmp_state.too_deep) {
364+ sort_entry_array_free(entries, 0, n);
365+ *too_deep = 1;
366+ return NULL;
367+ }
368 return entries;
369 }
370
371@@ -722,7 +771,10 @@ jv jv_sort(jv objects, jv keys) {
372 assert(jv_get_kind(keys) == JV_KIND_ARRAY);
373 assert(jv_array_length(jv_copy(objects)) == jv_array_length(jv_copy(keys)));
374 int n = jv_array_length(jv_copy(objects));
375- struct sort_entry* entries = sort_items(objects, keys);
376+ int too_deep = 0;
377+ struct sort_entry* entries = sort_items(objects, keys, &too_deep);
378+ if (too_deep)
379+ return jv_invalid_with_msg(jv_string("Comparison too deep"));
380 jv ret = jv_array();
381 for (int i=0; i<n; i++) {
382 jv_free(entries[i].key);
383@@ -737,13 +789,24 @@ jv jv_group(jv objects, jv keys) {
384 assert(jv_get_kind(keys) == JV_KIND_ARRAY);
385 assert(jv_array_length(jv_copy(objects)) == jv_array_length(jv_copy(keys)));
386 int n = jv_array_length(jv_copy(objects));
387- struct sort_entry* entries = sort_items(objects, keys);
388+ int too_deep = 0;
389+ struct sort_entry* entries = sort_items(objects, keys, &too_deep);
390+ if (too_deep)
391+ return jv_invalid_with_msg(jv_string("Comparison too deep"));
392 jv ret = jv_array();
393 if (n > 0) {
394 jv curr_key = entries[0].key;
395 jv group = jv_array_append(jv_array(), entries[0].object);
396 for (int i = 1; i < n; i++) {
397- if (jv_equal(jv_copy(curr_key), jv_copy(entries[i].key))) {
398+ int equal = jv_equal(jv_copy(curr_key), jv_copy(entries[i].key));
399+ if (equal < 0) {
400+ jv_free(curr_key);
401+ jv_free(group);
402+ sort_entry_array_free(entries, i, n);
403+ jv_free(ret);
404+ return jv_invalid_with_msg(jv_string("Equality check too deep"));
405+ }
406+ if (equal) {
407 jv_free(entries[i].key);
408 } else {
409 jv_free(curr_key);
410@@ -765,11 +828,21 @@ jv jv_unique(jv objects, jv keys) {
411 assert(jv_get_kind(keys) == JV_KIND_ARRAY);
412 assert(jv_array_length(jv_copy(objects)) == jv_array_length(jv_copy(keys)));
413 int n = jv_array_length(jv_copy(objects));
414- struct sort_entry* entries = sort_items(objects, keys);
415+ int too_deep = 0;
416+ struct sort_entry* entries = sort_items(objects, keys, &too_deep);
417+ if (too_deep)
418+ return jv_invalid_with_msg(jv_string("Comparison too deep"));
419 jv ret = jv_array();
420 jv curr_key = jv_invalid();
421 for (int i = 0; i < n; i++) {
422- if (jv_equal(jv_copy(curr_key), jv_copy(entries[i].key))) {
423+ int equal = jv_equal(jv_copy(curr_key), jv_copy(entries[i].key));
424+ if (equal < 0) {
425+ jv_free(curr_key);
426+ sort_entry_array_free(entries, i, n);
427+ jv_free(ret);
428+ return jv_invalid_with_msg(jv_string("Equality check too deep"));
429+ }
430+ if (equal) {
431 jv_free(entries[i].key);
432 jv_free(entries[i].object);
433 } else {
434diff --git a/tests/jq.test b/tests/jq.test
435index 5013bce..f35ef94 100644
436--- a/tests/jq.test
437+++ b/tests/jq.test
438@@ -2560,3 +2560,43 @@ null
439 try delpaths([[range(10001) | 0]]) catch .
440 null
441 "Path too deep"
442+
443+# regression test for CVE-2026-40612
444+reduce range(10000) as $_ ([]; [.]) | contains([[]])
445+null
446+true
447+
448+try (reduce range(10001) as $_ ([]; [.]) as $x | $x | contains($x)) catch .
449+null
450+"Containment check too deep"
451+
452+# regression test for CVE-2026-43896
453+reduce range(10000) as $_ ({}; {a: .}) as $x | $x * $x | length
454+null
455+1
456+
457+try (reduce range(10001) as $_ ({}; {a: .}) as $x | $x * $x) catch .
458+null
459+"Object merge too deep"
460+
461+# regression test for deep structural equality recursion
462+try ((reduce range(10001) as $_ ([]; [.])) as $x | (reduce range(10001) as $_ ([]; [.])) as $y | $x == $y) catch .
463+null
464+"Equality check too deep"
465+
466+# regression tests for deep ordering comparisons
467+try ((reduce range(10001) as $_ ([]; [.])) as $x | [$x, $x] | sort) catch .
468+null
469+"Comparison too deep"
470+
471+try ((reduce range(10001) as $_ ([]; [.])) as $x | [$x, $x] | unique) catch .
472+null
473+"Comparison too deep"
474+
475+try ((reduce range(10001) as $_ ({}; {a: .})) as $x | [$x, $x] | sort) catch .
476+null
477+"Comparison too deep"
478+
479+try ((reduce range(10001) as $_ ({}; {a: .})) as $x | [$x, $x] | unique) catch .
480+null
481+"Comparison too deep"
482--
4832.43.0
484
diff --git a/meta-oe/recipes-devtools/jq/jq/CVE-2026-49839.patch b/meta-oe/recipes-devtools/jq/jq/CVE-2026-49839.patch
new file mode 100644
index 0000000000..bd4bcf8e37
--- /dev/null
+++ b/meta-oe/recipes-devtools/jq/jq/CVE-2026-49839.patch
@@ -0,0 +1,34 @@
1From 59fcd85066bea536f259b6396a7a0a939a4fb369 Mon Sep 17 00:00:00 2001
2From: itchyny <itchyny@cybozu.co.jp>
3Date: Mon, 8 Jun 2026 22:14:48 +0900
4Subject: [PATCH] Fix heap-buffer-overflow in raw file loading
5
6When `jv_string_append_buf` overflows the string length limit,
7it returns an invalid `jv`; `jv_load_file` then re-entered it
8on the invalid value and overran the heap. Break out of the loop
9once the value is invalid.
10
11Fixes CVE-2026-49839.
12
13Signed-off-by: Anton Skorup <antonsk@axis.com>
14Upstream-Status: Backport [https://github.com/jqlang/jq/commit/e987df0d463d85fd70825e042a082427e8275b86]
15---
16 src/jv_file.c | 2 ++
17 1 file changed, 2 insertions(+)
18
19diff --git a/src/jv_file.c b/src/jv_file.c
20index b10bcc0..40137c3 100644
21--- a/src/jv_file.c
22+++ b/src/jv_file.c
23@@ -57,6 +57,8 @@ jv jv_load_file(const char* filename, int raw) {
24
25 if (raw) {
26 data = jv_string_append_buf(data, buf, n);
27+ if (!jv_is_valid(data))
28+ break;
29 } else {
30 jv_parser_set_buf(parser, buf, n, !feof(file));
31 jv value;
32--
332.43.0
34
diff --git a/meta-oe/recipes-devtools/jq/jq_1.8.1.bb b/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
index b9383c76f7..14e77c1bc6 100644
--- a/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
+++ b/meta-oe/recipes-devtools/jq/jq_1.8.1.bb
@@ -8,15 +8,22 @@ SECTION = "utils"
8LICENSE = "MIT & BSD-2-Clause" 8LICENSE = "MIT & BSD-2-Clause"
9LIC_FILES_CHKSUM = "file://COPYING;md5=cf7fcb0a1def4a7ad62c028f7d0dca47" 9LIC_FILES_CHKSUM = "file://COPYING;md5=cf7fcb0a1def4a7ad62c028f7d0dca47"
10 10
11GITHUB_BASE_URI = "https://github.com/jqlang/${BPN}/releases/" 11SRCREV = "4467af7068b1bcd7f882defff6e7ea674c5357f4"
12SRC_URI = "${GITHUB_BASE_URI}/download/${BPN}-${PV}/${BPN}-${PV}.tar.gz \ 12
13 file://run-ptest \ 13SRC_URI = "git://github.com/jqlang/jq.git;protocol=https;branch=master;tag=jq-${PV} \
14 " 14 file://run-ptest \
15SRC_URI[sha256sum] = "2be64e7129cecb11d5906290eba10af694fb9e3e7f9fc208a311dc33ca837eb0" 15 file://0001-Support-building-with-disable-maintainer-mode-and-so.patch \
16 16 file://CVE-2026-32316.patch \
17inherit autotools github-releases ptest 17 file://CVE-2026-33947.patch \
18 18 file://CVE-2026-33948.patch \
19UPSTREAM_CHECK_REGEX = "releases/tag/${BPN}-(?P<pver>\d+(\.\d+)+)" 19 file://CVE-2026-39979.patch \
20 file://CVE-2026-47770.patch \
21 file://CVE-2026-49839.patch \
22 "
23
24inherit autotools ptest
25
26UPSTREAM_CHECK_GITTAGREGEX = "${BPN}-(?P<pver>\d+(\.\d+)+)"
20 27
21PACKAGECONFIG ?= "oniguruma" 28PACKAGECONFIG ?= "oniguruma"
22 29
diff --git a/meta-oe/recipes-devtools/jsoncpp/files/run-ptest b/meta-oe/recipes-devtools/jsoncpp/files/run-ptest
new file mode 100644
index 0000000000..2cb892b187
--- /dev/null
+++ b/meta-oe/recipes-devtools/jsoncpp/files/run-ptest
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3cd src
4ctest --force-new-ctest-process | sed -u 's/\*\*\*/ /g' | awk '/Test +#/{gsub(/Passed/,"PASS"); gsub(/Failed/,"FAIL"); gsub(/Skipped/,"SKIP"); print $6": "$4; fflush();}'
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-Fix-C-11-ABI-breakage-when-compiled-with-C-17-1668-1.patch b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-Fix-C-11-ABI-breakage-when-compiled-with-C-17-1668-1.patch
new file mode 100644
index 0000000000..887bf14d2a
--- /dev/null
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/0001-Fix-C-11-ABI-breakage-when-compiled-with-C-17-1668-1.patch
@@ -0,0 +1,368 @@
1From c67034e4b4c722579ee15fddb8e4af8f04252b08 Mon Sep 17 00:00:00 2001
2From: Jordan Bayles <bayles.jordan@gmail.com>
3Date: Thu, 9 Apr 2026 10:37:08 -0700
4Subject: [PATCH] Fix C++11 ABI breakage when compiled with C++17 #1668 (#1675)
5
6When JSONCPP_HAS_STRING_VIEW was defined, the library dropped the
7`const char*` and `const String&` overloads for `operator[]`, `get`,
8`removeMember`, and `isMember`, breaking ABI compatibility for projects
9consuming the library with C++11.
10
11This change unconditionally declares and defines the legacy overloads
12so they are always exported, restoring compatibility.
13
14This commit completely eliminates the ABI breakage that occurs across
15C++ standard boundaries when using `std::string_view`.
16
17Previously, when the library was built with C++17+, CMake would leak
18`JSONCPP_HAS_STRING_VIEW=1` as a PUBLIC definition. A C++11 consumer
19would receive this definition, attempt to parse the header, and fail
20with compiler errors because `std::string_view` is not available in
21their environment.
22
23Conversely, if the library was built in C++11 (without `string_view`
24symbols), a C++17 consumer would naturally define
25`JSONCPP_HAS_STRING_VIEW` based on `__cplusplus` inside `value.h`. The
26consumer would then call the declared `string_view` methods, resulting
27in linker errors because the methods weren't compiled into the library.
28
29By moving all `std::string_view` overloads directly into `value.h` as
30`inline` methods that delegate to the fundamental
31`const char*, const char*` methods:
321. The consumer's compiler dictates whether the overloads are visible
33 (via `__cplusplus >= 201703L`).
342. The consumer compiles the inline wrappers locally, removing any
35 reliance on the library's exported symbols for `std::string_view`.
363. CMake no longer needs to pollute the consumer's environment with
37 PUBLIC compile definitions.
38
39Backported only the library/header changes. Upstream CI and example
40test additions are omitted.
41
42Upstream-Status: Backport [https://github.com/open-source-parsers/jsoncpp/commit/c67034e4b4c722579ee15fddb8e4af8f04252b08]
43Signed-off-by: Ernest Van Hoecke <ernest.vanhoecke@toradex.com>
44---
45 include/json/value.h | 54 ++++++++++++++++++++----------
46 src/lib_json/CMakeLists.txt | 9 -----
47 src/lib_json/json_value.cpp | 66 -------------------------------------
48 3 files changed, 36 insertions(+), 93 deletions(-)
49
50diff --git a/include/json/value.h b/include/json/value.h
51index f32f45609365..2007e6b4251d 100644
52--- a/include/json/value.h
53+++ b/include/json/value.h
54@@ -357,7 +357,8 @@ public:
55 Value(const StaticString& value);
56 Value(const String& value);
57 #ifdef JSONCPP_HAS_STRING_VIEW
58- Value(std::string_view value);
59+ inline Value(std::string_view value)
60+ : Value(value.data(), value.data() + value.length()) {}
61 #endif
62 Value(bool value);
63 Value(std::nullptr_t ptr) = delete;
64@@ -405,7 +406,14 @@ public:
65 /** Get string_view of string-value.
66 * \return false if !string. (Seg-fault if str is NULL.)
67 */
68- bool getString(std::string_view* str) const;
69+ inline bool getString(std::string_view* str) const {
70+ char const* begin;
71+ char const* end;
72+ if (!getString(&begin, &end))
73+ return false;
74+ *str = std::string_view(begin, static_cast<size_t>(end - begin));
75+ return true;
76+ }
77 #endif
78 Int asInt() const;
79 UInt asUInt() const;
80@@ -496,12 +504,19 @@ public:
81 #ifdef JSONCPP_HAS_STRING_VIEW
82 /// Access an object value by name, create a null member if it does not exist.
83 /// \param key may contain embedded nulls.
84- Value& operator[](std::string_view key);
85+ inline Value& operator[](std::string_view key) {
86+ return resolveReference(key.data(), key.data() + key.length());
87+ }
88 /// Access an object value by name, returns null if there is no member with
89 /// that name.
90 /// \param key may contain embedded nulls.
91- const Value& operator[](std::string_view key) const;
92-#else
93+ inline const Value& operator[](std::string_view key) const {
94+ Value const* found = find(key.data(), key.data() + key.length());
95+ if (!found)
96+ return nullSingleton();
97+ return *found;
98+ }
99+#endif
100 /// Access an object value by name, create a null member if it does not exist.
101 /// \note Because of our implementation, keys are limited to 2^30 -1 chars.
102 /// Exceeding that will cause an exception.
103@@ -516,7 +531,6 @@ public:
104 /// that name.
105 /// \param key may contain embedded nulls.
106 const Value& operator[](const String& key) const;
107-#endif
108 /** \brief Access an object value by name, create a null member if it does not
109 * exist.
110 *
111@@ -533,8 +547,10 @@ public:
112 #ifdef JSONCPP_HAS_STRING_VIEW
113 /// Return the member named key if it exist, defaultValue otherwise.
114 /// \note deep copy
115- Value get(std::string_view key, const Value& defaultValue) const;
116-#else
117+ inline Value get(std::string_view key, const Value& defaultValue) const {
118+ return get(key.data(), key.data() + key.length(), defaultValue);
119+ }
120+#endif
121 /// Return the member named key if it exist, defaultValue otherwise.
122 /// \note deep copy
123 Value get(const char* key, const Value& defaultValue) const;
124@@ -542,7 +558,6 @@ public:
125 /// \note deep copy
126 /// \param key may contain embedded nulls.
127 Value get(const String& key, const Value& defaultValue) const;
128-#endif
129 /// Return the member named key if it exist, defaultValue otherwise.
130 /// \note deep copy
131 /// \note key may contain embedded nulls.
132@@ -588,13 +603,14 @@ public:
133 /// \pre type() is objectValue or nullValue
134 /// \post type() is unchanged
135 #if JSONCPP_HAS_STRING_VIEW
136- void removeMember(std::string_view key);
137-#else
138+ inline void removeMember(std::string_view key) {
139+ removeMember(key.data(), key.data() + key.length(), nullptr);
140+ }
141+#endif
142 void removeMember(const char* key);
143 /// Same as removeMember(const char*)
144 /// \param key may contain embedded nulls.
145 void removeMember(const String& key);
146-#endif
147 /** \brief Remove the named map member.
148 *
149 * Update 'removed' iff removed.
150@@ -602,13 +618,14 @@ public:
151 * \return true iff removed (no exceptions)
152 */
153 #if JSONCPP_HAS_STRING_VIEW
154- bool removeMember(std::string_view key, Value* removed);
155-#else
156+ inline bool removeMember(std::string_view key, Value* removed) {
157+ return removeMember(key.data(), key.data() + key.length(), removed);
158+ }
159+#endif
160 bool removeMember(String const& key, Value* removed);
161 /// Same as removeMember(const char* begin, const char* end, Value* removed),
162 /// but 'key' is null-terminated.
163 bool removeMember(const char* key, Value* removed);
164-#endif
165 /// Same as removeMember(String const& key, Value* removed)
166 bool removeMember(const char* begin, const char* end, Value* removed);
167 /** \brief Remove the indexed array element.
168@@ -622,15 +639,16 @@ public:
169 #ifdef JSONCPP_HAS_STRING_VIEW
170 /// Return true if the object has a member named key.
171 /// \param key may contain embedded nulls.
172- bool isMember(std::string_view key) const;
173-#else
174+ inline bool isMember(std::string_view key) const {
175+ return isMember(key.data(), key.data() + key.length());
176+ }
177+#endif
178 /// Return true if the object has a member named key.
179 /// \note 'key' must be null-terminated.
180 bool isMember(const char* key) const;
181 /// Return true if the object has a member named key.
182 /// \param key may contain embedded nulls.
183 bool isMember(const String& key) const;
184-#endif
185 /// Same as isMember(String const& key)const
186 bool isMember(const char* begin, const char* end) const;
187
188diff --git a/src/lib_json/CMakeLists.txt b/src/lib_json/CMakeLists.txt
189index 03e9335525ca..a0695e9eba83 100644
190--- a/src/lib_json/CMakeLists.txt
191+++ b/src/lib_json/CMakeLists.txt
192@@ -131,9 +131,6 @@ if(BUILD_SHARED_LIBS)
193
194 target_compile_features(${SHARED_LIB} PUBLIC ${REQUIRED_FEATURES})
195
196- if(JSONCPP_HAS_STRING_VIEW)
197- target_compile_definitions(${SHARED_LIB} PUBLIC JSONCPP_HAS_STRING_VIEW=1)
198- endif()
199
200 target_include_directories(${SHARED_LIB} PUBLIC
201 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
202@@ -168,9 +165,6 @@ if(BUILD_STATIC_LIBS)
203
204 target_compile_features(${STATIC_LIB} PUBLIC ${REQUIRED_FEATURES})
205
206- if(JSONCPP_HAS_STRING_VIEW)
207- target_compile_definitions(${STATIC_LIB} PUBLIC JSONCPP_HAS_STRING_VIEW=1)
208- endif()
209
210 target_include_directories(${STATIC_LIB} PUBLIC
211 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
212@@ -198,9 +192,6 @@ if(BUILD_OBJECT_LIBS)
213
214 target_compile_features(${OBJECT_LIB} PUBLIC ${REQUIRED_FEATURES})
215
216- if(JSONCPP_HAS_STRING_VIEW)
217- target_compile_definitions(${OBJECT_LIB} PUBLIC JSONCPP_HAS_STRING_VIEW=1)
218- endif()
219
220 target_include_directories(${OBJECT_LIB} PUBLIC
221 $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
222diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp
223index 74f77896fa7b..a8eb72d6b75f 100644
224--- a/src/lib_json/json_value.cpp
225+++ b/src/lib_json/json_value.cpp
226@@ -441,14 +441,6 @@ Value::Value(const String& value) {
227 value.data(), static_cast<unsigned>(value.length()));
228 }
229
230-#ifdef JSONCPP_HAS_STRING_VIEW
231-Value::Value(std::string_view value) {
232- initBasic(stringValue, true);
233- value_.string_ = duplicateAndPrefixStringValue(
234- value.data(), static_cast<unsigned>(value.length()));
235-}
236-#endif
237-
238 Value::Value(const StaticString& value) {
239 initBasic(stringValue);
240 value_.string_ = const_cast<char*>(value.c_str());
241@@ -656,21 +648,6 @@ bool Value::getString(char const** begin, char const** end) const {
242 return true;
243 }
244
245-#ifdef JSONCPP_HAS_STRING_VIEW
246-bool Value::getString(std::string_view* str) const {
247- if (type() != stringValue)
248- return false;
249- if (value_.string_ == nullptr)
250- return false;
251- const char* begin;
252- unsigned length;
253- decodePrefixedString(this->isAllocated(), this->value_.string_, &length,
254- &begin);
255- *str = std::string_view(begin, length);
256- return true;
257-}
258-#endif
259-
260 String Value::asString() const {
261 switch (type()) {
262 case nullValue:
263@@ -1190,17 +1167,6 @@ Value* Value::demand(char const* begin, char const* end) {
264 "objectValue or nullValue");
265 return &resolveReference(begin, end);
266 }
267-#ifdef JSONCPP_HAS_STRING_VIEW
268-const Value& Value::operator[](std::string_view key) const {
269- Value const* found = find(key.data(), key.data() + key.length());
270- if (!found)
271- return nullSingleton();
272- return *found;
273-}
274-Value& Value::operator[](std::string_view key) {
275- return resolveReference(key.data(), key.data() + key.length());
276-}
277-#else
278 const Value& Value::operator[](const char* key) const {
279 Value const* found = find(key, key + strlen(key));
280 if (!found)
281@@ -1221,7 +1187,6 @@ Value& Value::operator[](const char* key) {
282 Value& Value::operator[](const String& key) {
283 return resolveReference(key.data(), key.data() + key.length());
284 }
285-#endif
286
287 Value& Value::operator[](const StaticString& key) {
288 return resolveReference(key.c_str());
289@@ -1261,18 +1226,12 @@ Value Value::get(char const* begin, char const* end,
290 Value const* found = find(begin, end);
291 return !found ? defaultValue : *found;
292 }
293-#ifdef JSONCPP_HAS_STRING_VIEW
294-Value Value::get(std::string_view key, const Value& defaultValue) const {
295- return get(key.data(), key.data() + key.length(), defaultValue);
296-}
297-#else
298 Value Value::get(char const* key, Value const& defaultValue) const {
299 return get(key, key + strlen(key), defaultValue);
300 }
301 Value Value::get(String const& key, Value const& defaultValue) const {
302 return get(key.data(), key.data() + key.length(), defaultValue);
303 }
304-#endif
305
306 bool Value::removeMember(const char* begin, const char* end, Value* removed) {
307 if (type() != objectValue) {
308@@ -1288,31 +1247,13 @@ bool Value::removeMember(const char* begin, const char* end, Value* removed) {
309 value_.map_->erase(it);
310 return true;
311 }
312-#ifdef JSONCPP_HAS_STRING_VIEW
313-bool Value::removeMember(std::string_view key, Value* removed) {
314- return removeMember(key.data(), key.data() + key.length(), removed);
315-}
316-#else
317 bool Value::removeMember(const char* key, Value* removed) {
318 return removeMember(key, key + strlen(key), removed);
319 }
320 bool Value::removeMember(String const& key, Value* removed) {
321 return removeMember(key.data(), key.data() + key.length(), removed);
322 }
323-#endif
324-
325-#ifdef JSONCPP_HAS_STRING_VIEW
326-void Value::removeMember(std::string_view key) {
327- JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue,
328- "in Json::Value::removeMember(): requires objectValue");
329- if (type() == nullValue)
330- return;
331
332- CZString actualKey(key.data(), unsigned(key.length()),
333- CZString::noDuplication);
334- value_.map_->erase(actualKey);
335-}
336-#else
337 void Value::removeMember(const char* key) {
338 JSON_ASSERT_MESSAGE(type() == nullValue || type() == objectValue,
339 "in Json::Value::removeMember(): requires objectValue");
340@@ -1323,7 +1264,6 @@ void Value::removeMember(const char* key) {
341 value_.map_->erase(actualKey);
342 }
343 void Value::removeMember(const String& key) { removeMember(key.c_str()); }
344-#endif
345
346 bool Value::removeIndex(ArrayIndex index, Value* removed) {
347 if (type() != arrayValue) {
348@@ -1353,18 +1293,12 @@ bool Value::isMember(char const* begin, char const* end) const {
349 Value const* value = find(begin, end);
350 return nullptr != value;
351 }
352-#ifdef JSONCPP_HAS_STRING_VIEW
353-bool Value::isMember(std::string_view key) const {
354- return isMember(key.data(), key.data() + key.length());
355-}
356-#else
357 bool Value::isMember(char const* key) const {
358 return isMember(key, key + strlen(key));
359 }
360 bool Value::isMember(String const& key) const {
361 return isMember(key.data(), key.data() + key.length());
362 }
363-#endif
364
365 Value::Members Value::getMemberNames() const {
366 JSON_ASSERT_MESSAGE(
367--
3682.43.0
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp/71d46ca38e90dc902e8178ba484af4f27fa11947.patch b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/71d46ca38e90dc902e8178ba484af4f27fa11947.patch
new file mode 100644
index 0000000000..d649c2ed4c
--- /dev/null
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp/71d46ca38e90dc902e8178ba484af4f27fa11947.patch
@@ -0,0 +1,63 @@
1From 71d46ca38e90dc902e8178ba484af4f27fa11947 Mon Sep 17 00:00:00 2001
2From: Jordan Bayles <bayles.jordan@gmail.com>
3Date: Thu, 14 May 2026 15:57:53 -0700
4Subject: [PATCH] fix: GCC 16 / C++20 build failure with u8 string literals
5 (#1685)
6
7* fix: GCC 16 / C++20 build failure with u8 string literals (#1684)
8
9In C++20, the `u8""` string literal prefix was changed to evaluate to `const char8_t[]` instead of `const char[]`. This caused compilation errors when these literals were implicitly converted to `std::string` or passed to functions expecting `const char*`.
10
11This commit adds `reinterpret_cast<const char*>` around the `u8` string literals in the test suite to resolve the build errors while maintaining the intended UTF-8 semantics.
12
13Additionally, this adds C++20 to the GitHub Actions CMake test matrix to ensure we don't regress on newer standards.
14
15Fixes #1684
16
17* style: run clang-format
18
19Upstream-Status: Backport [https://github.com/open-source-parsers/jsoncpp/commit/71d46ca38e90dc902e8178ba484af4f27fa11947]
20
21Signed-off-by: Markus Volk <f_l_k@t-online.de>
22---
23 .github/workflows/cmake.yml | 2 +-
24 src/test_lib_json/main.cpp | 12 +++++++-----
25 2 files changed, 8 insertions(+), 6 deletions(-)
26
27diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp
28index 501aba10e..08731f66a 100644
29--- a/src/test_lib_json/main.cpp
30+++ b/src/test_lib_json/main.cpp
31@@ -1993,7 +1993,8 @@ JSONTEST_FIXTURE_LOCAL(ValueTest, StaticString) {
32
33 JSONTEST_FIXTURE_LOCAL(ValueTest, WideString) {
34 // https://github.com/open-source-parsers/jsoncpp/issues/756
35- const std::string uni = u8"\u5f0f\uff0c\u8fdb"; // "式,进"
36+ const std::string uni =
37+ reinterpret_cast<const char*>(u8"\u5f0f\uff0c\u8fdb"); // "式,进"
38 std::string styled;
39 {
40 Json::Value v;
41@@ -3109,9 +3110,9 @@ JSONTEST_FIXTURE_LOCAL(ReaderTest, strictModeParseNumber) {
42 }
43
44 JSONTEST_FIXTURE_LOCAL(ReaderTest, parseChineseWithOneError) {
45- checkParse(R"({ "pr)"
46- u8"\u4f50\u85e4" // 佐藤
47- R"(erty" :: "value" })",
48+ checkParse(reinterpret_cast<const char*>(R"({ "pr)"
49+ u8"\u4f50\u85e4" // 佐藤
50+ R"(erty" :: "value" })"),
51 {{18, 19, "Syntax error: value, object or array expected."}},
52 "* Line 1, Column 19\n Syntax error: value, object or array "
53 "expected.\n");
54@@ -3223,7 +3224,8 @@ JSONTEST_FIXTURE_LOCAL(CharReaderTest, parseString) {
55 bool ok = reader->parse(doc, doc + std::strlen(doc), &root, &errs);
56 JSONTEST_ASSERT(ok);
57 JSONTEST_ASSERT(errs.empty());
58- JSONTEST_ASSERT_EQUAL(u8"\u8A2a", root[0].asString()); // "訪"
59+ JSONTEST_ASSERT_EQUAL(reinterpret_cast<const char*>(u8"\u8A2a"),
60+ root[0].asString()); // "訪"
61 }
62 {
63 char const doc[] = R"([ "\uD801" ])";
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb
deleted file mode 100644
index f68ffd2c0f..0000000000
--- a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.6.bb
+++ /dev/null
@@ -1,24 +0,0 @@
1SUMMARY = "JSON C++ lib used to read and write json file."
2DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
3 and writer in C++. JSON (JavaScript Object Notation) is a \
4 lightweight data-interchange format. It is easy for humans to \
5 read and write. It is easy for machines to parse and generate."
6
7HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
8
9SECTION = "libs"
10
11LICENSE = "MIT"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926"
13
14PE = "1"
15
16SRCREV = "89e2973c754a9c02a49974d839779b151e95afd6"
17SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https"
18
19
20inherit cmake
21
22EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF -DJSONCPP_WITH_TESTS=OFF"
23
24BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
new file mode 100644
index 0000000000..bf91f8eff4
--- /dev/null
+++ b/meta-oe/recipes-devtools/jsoncpp/jsoncpp_1.9.7.bb
@@ -0,0 +1,48 @@
1SUMMARY = "JSON C++ lib used to read and write json file."
2DESCRIPTION = "Jsoncpp is an implementation of a JSON (http://json.org) reader \
3 and writer in C++. JSON (JavaScript Object Notation) is a \
4 lightweight data-interchange format. It is easy for humans to \
5 read and write. It is easy for machines to parse and generate."
6
7HOMEPAGE = "https://github.com/open-source-parsers/jsoncpp"
8
9SECTION = "libs"
10
11LICENSE = "MIT"
12LIC_FILES_CHKSUM = "file://LICENSE;md5=5d73c165a0f9e86a1342f32d19ec5926"
13
14PE = "1"
15
16SRCREV = "3455302847cf1e4671f1d8f5fa953fd46a7b1404"
17SRC_URI = "git://github.com/open-source-parsers/jsoncpp;branch=master;protocol=https;tag=${PV} \
18 file://0001-Fix-C-11-ABI-breakage-when-compiled-with-C-17-1668-1.patch \
19 file://71d46ca38e90dc902e8178ba484af4f27fa11947.patch \
20 file://run-ptest \
21 "
22
23inherit cmake ptest
24
25EXTRA_OECMAKE += "-DBUILD_SHARED_LIBS=ON -DBUILD_OBJECT_LIBS=OFF \
26 ${@bb.utils.contains('PTEST_ENABLED', '1', '-DJSONCPP_WITH_TESTS=ON -DJSONCPP_WITH_POST_BUILD_UNITTEST=OFF', '-DJSONCPP_WITH_TESTS=OFF', d)} \
27 "
28
29DEPENDS += "${@bb.utils.contains('PTEST_ENABLED', '1', 'rsync-native', '', d)}"
30RDEPENDS:${PN}-ptest += "cmake python3-core"
31
32do_install_ptest () {
33 cp -r ${B}/bin ${D}${PTEST_PATH}
34 cp -r ${S}/test ${D}${PTEST_PATH}
35
36 rsync -a ${B}/src ${D}${PTEST_PATH} \
37 --exclude CMakeFiles \
38 --exclude cmake_install.cmake \
39 --exclude Makefile \
40 --exclude generated
41 sed -i -e 's#${B}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
42 sed -i -e 's#${S}#${PTEST_PATH}#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
43 sed -i -e 's#${RECIPE_SYSROOT_NATIVE}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
44 sed -i -e 's#${PYTHON}#/usr/bin/python3#g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
45 sed -i -e 's#${WORKDIR}##g' `find ${D}${PTEST_PATH} -name CTestTestfile.cmake`
46}
47
48BBCLASSEXTEND = "native nativesdk"
diff --git a/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb b/meta-oe/recipes-devtools/libabigail/libabigail_2.10.bb
index 5c262d2880..27918c0dad 100644
--- a/meta-oe/recipes-devtools/libabigail/libabigail_2.5.bb
+++ b/meta-oe/recipes-devtools/libabigail/libabigail_2.10.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=0bcd48c3bdfef0c9d9fd17726e4b7dab"
7SRC_URI = "http://mirrors.kernel.org/sourceware/${BPN}/${BP}.tar.xz \ 7SRC_URI = "http://mirrors.kernel.org/sourceware/${BPN}/${BP}.tar.xz \
8 file://0001-Check-for-correct-fts-module.patch \ 8 file://0001-Check-for-correct-fts-module.patch \
9 " 9 "
10SRC_URI[sha256sum] = "7cfc4e9b00ae38d87fb0c63beabb32b9cbf9ce410e52ceeb5ad5b3c5beb111f3" 10SRC_URI[sha256sum] = "0cc10e6471398330e001b9fe37f1e8c5108a9ab632b08ca9634d6c64bc380b78"
11 11
12DEPENDS = "elfutils libxml2" 12DEPENDS = "elfutils libxml2"
13DEPENDS:append:libc-musl = " fts" 13DEPENDS:append:libc-musl = " fts"
diff --git a/meta-oe/recipes-devtools/librust-cxx/librust-cxx-crates.inc b/meta-oe/recipes-devtools/librust-cxx/librust-cxx-crates.inc
index c313d24e5c..ea21ea5924 100644
--- a/meta-oe/recipes-devtools/librust-cxx/librust-cxx-crates.inc
+++ b/meta-oe/recipes-devtools/librust-cxx/librust-cxx-crates.inc
@@ -1,4 +1,4 @@
1# Autogenerated with 'bitbake -c update_crates cxx' 1# Autogenerated with 'bitbake -c update_crates librust-cxx'
2 2
3# from Cargo.lock 3# from Cargo.lock
4SRC_URI += " \ 4SRC_URI += " \
diff --git a/meta-oe/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patch b/meta-oe/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patch
new file mode 100644
index 0000000000..5bff81eaf6
--- /dev/null
+++ b/meta-oe/recipes-devtools/libtoml11/files/0001-Remove-more-whitespaces-after-operator.patch
@@ -0,0 +1,34 @@
1From 6af7de3d5eaae59c53c42aab8eca1e1e9a365da5 Mon Sep 17 00:00:00 2001
2From: Steffen Winter <steffen.winter@proton.me>
3Date: Thu, 25 Dec 2025 20:48:02 +0100
4Subject: [PATCH] Remove more whitespaces after operator""
5
6Upstream-Status: Submitted [https://github.com/ToruNiina/toml11/pull/306]
7Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
8---
9 include/toml11/fwd/literal_fwd.hpp | 4 ++--
10 include/toml11/impl/literal_impl.hpp | 4 ++--
11 2 files changed, 4 insertions(+), 4 deletions(-)
12
13--- a/include/toml11/fwd/literal_fwd.hpp
14+++ b/include/toml11/fwd/literal_fwd.hpp
15@@ -24,7 +24,7 @@ inline namespace toml_literals
16 #if defined(TOML11_HAS_CHAR8_T)
17 // value of u8"" literal has been changed from char to char8_t and char8_t is
18 // NOT compatible to char
19-::toml::value operator"" _toml(const char8_t* str, std::size_t len);
20+::toml::value operator""_toml(const char8_t* str, std::size_t len);
21 #endif
22
23 } // toml_literals
24--- a/include/toml11/impl/literal_impl.hpp
25+++ b/include/toml11/impl/literal_impl.hpp
26@@ -146,7 +146,7 @@ operator""_toml(const char* str, std::si
27 // value of u8"" literal has been changed from char to char8_t and char8_t is
28 // NOT compatible to char
29 TOML11_INLINE ::toml::value
30-operator"" _toml(const char8_t* str, std::size_t len)
31+operator""_toml(const char8_t* str, std::size_t len)
32 {
33 if(len == 0)
34 {
diff --git a/meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb b/meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
index 7e097e4612..49f9840f06 100644
--- a/meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
+++ b/meta-oe/recipes-devtools/libtoml11/libtoml11_4.4.0.bb
@@ -16,12 +16,15 @@ PE = "1"
16SRC_URI = "\ 16SRC_URI = "\
17 gitsm://github.com/ToruNiina/toml11.git;protocol=https;branch=main;tag=v${PV} \ 17 gitsm://github.com/ToruNiina/toml11.git;protocol=https;branch=main;tag=v${PV} \
18 file://0001-Remove-whitespace-in-operator.patch \ 18 file://0001-Remove-whitespace-in-operator.patch \
19 file://0001-Remove-more-whitespaces-after-operator.patch \
19 file://run-ptest \ 20 file://run-ptest \
20" 21"
21SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286" 22SRCREV = "be08ba2be2a964edcdb3d3e3ea8d100abc26f286"
22 23
23inherit cmake ptest 24inherit cmake ptest
24 25
26CXXFLAGS:append:toolchain-clang = " -Wno-error=c2y-extensions"
27
25EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \ 28EXTRA_OECMAKE += "-DTOML11_PRECOMPILE=ON \
26 -DTOML11_BUILD_TESTS=${@bb.utils.contains("PTEST_ENABLED", "1", "ON", "OFF", d)} \ 29 -DTOML11_BUILD_TESTS=${@bb.utils.contains("PTEST_ENABLED", "1", "ON", "OFF", d)} \
27" 30"
diff --git a/meta-oe/recipes-devtools/lshw/lshw_02.20.bb b/meta-oe/recipes-devtools/lshw/lshw_02.20.bb
index 95e2084255..2f1367341a 100644
--- a/meta-oe/recipes-devtools/lshw/lshw_02.20.bb
+++ b/meta-oe/recipes-devtools/lshw/lshw_02.20.bb
@@ -32,11 +32,11 @@ EXTRA_OEMAKE = "${PACKAGECONFIG_CONFARGS} RPM_OPT_FLAGS='${CFLAGS}'"
32 32
33do_compile() { 33do_compile() {
34 # build core only - don't ship gui 34 # build core only - don't ship gui
35 oe_runmake -C src core 35 oe_runmake -C src SBINDIR=${sbindir} core
36} 36}
37 37
38do_install() { 38do_install() {
39 oe_runmake install DESTDIR=${D} 39 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir}
40} 40}
41 41
42BBCLASSEXTEND = "native" 42BBCLASSEXTEND = "native"
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch
deleted file mode 100644
index 61932269bd..0000000000
--- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch
+++ /dev/null
@@ -1,86 +0,0 @@
1From 491b3b153f6b5cbf2d23a9778e5676eb29a6705f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Feb 2023 16:37:19 -0800
4Subject: [PATCH] Fix type of single bit bitfields
5
6clang16 warns
7trace.c:311:22: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
8
9quash the warning by using an unsigned type to allow
10an assignment of 0 or 1 without implicit conversion.
11
12Upstream-Status: Pending
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 library.h | 6 +++---
16 prototype.h | 2 +-
17 sysdeps/linux-gnu/trace.h | 10 +++++-----
18 3 files changed, 9 insertions(+), 9 deletions(-)
19
20--- a/library.h
21+++ b/library.h
22@@ -71,20 +71,20 @@ struct library_symbol {
23 * looking up one in LIB->protolib. */
24 struct prototype *proto;
25
26- int own_name : 1;
27+ unsigned int own_name : 1;
28
29 /* This is relevant for PLT symbols. Latent PLT symbols are
30 * those that don't match any of the -e rules, but that might
31 * potentially become active if a library implementing them
32 * appears that matches a -l rule. Ltrace core is responsible
33 * for clearing latent flag. */
34- int latent : 1;
35+ unsigned latent : 1;
36
37 /* Delayed symbols are those for which a breakpoint shouldn't
38 * be enabled yet. They are similar to latent symbols, but
39 * backend is responsible for clearing the delayed flag. See
40 * proc_activate_delayed_symbol. */
41- int delayed : 1;
42+ unsigned int delayed : 1;
43
44 struct arch_library_symbol_data arch;
45 struct os_library_symbol_data os;
46--- a/prototype.h
47+++ b/prototype.h
48@@ -162,7 +162,7 @@ struct protolib_cache {
49
50 /* For tracking uses of cache during cache's own
51 * initialization. */
52- int bootstrap : 1;
53+ unsigned int bootstrap : 1;
54 };
55
56 /* Initialize CACHE. Returns 0 on success or a negative value on
57--- a/sysdeps/linux-gnu/trace.h
58+++ b/sysdeps/linux-gnu/trace.h
59@@ -33,11 +33,11 @@
60 struct pid_task {
61 pid_t pid; /* This may be 0 for tasks that exited
62 * mid-handling. */
63- int sigstopped : 1;
64- int got_event : 1;
65- int delivered : 1;
66- int vforked : 1;
67- int sysret : 1;
68+ unsigned int sigstopped : 1;
69+ unsigned int got_event : 1;
70+ unsigned int delivered : 1;
71+ unsigned int vforked : 1;
72+ unsigned int sysret : 1;
73 };
74
75 struct pid_set {
76--- a/sysdeps/linux-gnu/trace.c
77+++ b/sysdeps/linux-gnu/trace.c
78@@ -1043,7 +1043,7 @@ ltrace_exiting_install_handler(struct pr
79 struct process_vfork_handler
80 {
81 struct event_handler super;
82- int vfork_bp_refd:1;
83+ unsigned int vfork_bp_refd:1;
84 };
85
86 static Event *
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch
deleted file mode 100644
index f3a6d9e599..0000000000
--- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1From c1d3aaf5ec810c2594938438c7b4ccd20943f255 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 7 Jul 2017 10:20:52 -0700
4Subject: [PATCH] configure: Recognise linux-musl as a host OS
5
6Signed-off-by: Khem Raj <raj.khem@gmail.com>
7---
8Upstream-Status: Pending
9
10 configure.ac | 1 +
11 1 file changed, 1 insertion(+)
12
13diff --git a/configure.ac b/configure.ac
14index 3e8667f..95d6642 100644
15--- a/configure.ac
16+++ b/configure.ac
17@@ -35,6 +35,7 @@ AC_CANONICAL_HOST
18 case "${host_os}" in
19 linux-gnu*) HOST_OS="linux-gnu" ;;
20 linux-uclibc*) HOST_OS="linux-gnu" ;;
21+ linux-musl*) HOST_OS="linux-gnu" ;;
22 *) AC_MSG_ERROR([unkown host-os ${host_os}]) ;;
23 esac
24 AC_SUBST(HOST_OS)
25--
262.13.2
27
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch
new file mode 100644
index 0000000000..e7aa0fdabe
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch
@@ -0,0 +1,34 @@
1From d568c0cbdecf31a7020f2a0574470d014f447a86 Mon Sep 17 00:00:00 2001
2From: Khem Raj <khem.raj@oss.qualcomm.com>
3Date: Sun, 12 Apr 2026 00:07:06 -0700
4Subject: [PATCH] dwarf_prototypes: return NULL from NEXT_SIBLING on error
5
6NEXT_SIBLING is used in functions that return pointers, so returning
7false on error is misleading and relies on implicit conversion.
8Return (void *)0 instead to make the failure value explicit and match
9the surrounding function return type.
10
11This is flagged by clang-22 due to
12Replacing return false with return (void *)0
13avoids clang's -Wbool-conversion error when the macro expands
14inside functions returning a pointer type.
15
16Upstream-Status: Submitted [https://gitlab.com/cespedes/ltrace/-/merge_requests/30]
17Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
18---
19 dwarf_prototypes.c | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/dwarf_prototypes.c b/dwarf_prototypes.c
23index bfac177..e7ea1bc 100644
24--- a/dwarf_prototypes.c
25+++ b/dwarf_prototypes.c
26@@ -36,7 +36,7 @@
27 #define NEXT_SIBLING(die) \
28 int res = dwarf_siblingof(die, die); \
29 if (res == 0) continue; /* sibling exists */ \
30- if (res < 0) return false; /* error */ \
31+ if (res < 0) return (void *)0; /* error */ \
32 break /* no sibling exists */
33
34 static struct arg_type_info *get_type(int *newly_allocated_info,
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch
new file mode 100644
index 0000000000..0f8a9766f4
--- /dev/null
+++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch
@@ -0,0 +1,86 @@
1From 65c5a621a366a25b8572cd29c01b4aa92c02903a Mon Sep 17 00:00:00 2001
2From: Khem Raj <khem.raj@oss.qualcomm.com>
3Date: Sun, 12 Apr 2026 00:46:20 -0700
4Subject: [PATCH] trace: fix 1-bit bitfield assignments for clang
5 -Wsingle-bit-bitfield-constant-conversion
6
7Replace '1' with 'true' for all 1-bit signed bitfield assignments.
8Assigning integer 1 to a 1-bit signed bitfield truncates to -1; using
9'true' which is a bool is well-defined and avoids the clang error.
10
11Upstream-Status: Submitted [https://gitlab.com/cespedes/ltrace/-/merge_requests/30]
12Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
13---
14 ltrace-elf.c | 2 +-
15 sysdeps/linux-gnu/trace.c | 12 ++++++------
16 2 files changed, 7 insertions(+), 7 deletions(-)
17
18diff --git a/ltrace-elf.c b/ltrace-elf.c
19index beaf69f..2be609c 100644
20--- a/ltrace-elf.c
21+++ b/ltrace-elf.c
22@@ -819,7 +819,7 @@ mark_chain_latent(struct library_symbol *libsym)
23 {
24 for (; libsym != NULL; libsym = libsym->next) {
25 debug(DEBUG_FUNCTION, "marking %s latent", libsym->name);
26- libsym->latent = 1;
27+ libsym->latent = true;
28 }
29 }
30
31diff --git a/sysdeps/linux-gnu/trace.c b/sysdeps/linux-gnu/trace.c
32index 12c8747..b7f4c57 100644
33--- a/sysdeps/linux-gnu/trace.c
34+++ b/sysdeps/linux-gnu/trace.c
35@@ -310,13 +310,13 @@ send_sigstop(struct process *task, void *data)
36 * weed out unnecessary looping. */
37 if (st == PS_SLEEPING
38 && is_vfork_parent(task)) {
39- task_info->vforked = 1;
40+ task_info->vforked = true;
41 return CBS_CONT;
42 }
43
44 if (task_kill(task->pid, SIGSTOP) >= 0) {
45 debug(DEBUG_PROCESS, "send SIGSTOP to %d", task->pid);
46- task_info->sigstopped = 1;
47+ task_info->sigstopped = true;
48 } else
49 fprintf(stderr,
50 "Warning: couldn't send SIGSTOP to %d\n", task->pid);
51@@ -442,7 +442,7 @@ handle_stopping_event(struct pid_task *task_info, Event **eventp)
52 {
53 /* Mark all events, so that we know whom to SIGCONT later. */
54 if (task_info != NULL)
55- task_info->got_event = 1;
56+ task_info->got_event = true;
57
58 Event *event = *eventp;
59
60@@ -454,7 +454,7 @@ handle_stopping_event(struct pid_task *task_info, Event **eventp)
61 debug(DEBUG_PROCESS, "SIGSTOP delivered to %d", task_info->pid);
62 if (task_info->sigstopped
63 && !task_info->delivered) {
64- task_info->delivered = 1;
65+ task_info->delivered = true;
66 *eventp = NULL; // sink the event
67 } else
68 fprintf(stderr, "suspicious: %d got SIGSTOP, but "
69@@ -748,7 +748,7 @@ process_stopping_on_event(struct event_handler *super, Event *event)
70 debug(1, "%d LT_EV_SYSRET", event->proc->pid);
71 event_to_queue = 0;
72 if (task_info != NULL)
73- task_info->sysret = 1;
74+ task_info->sysret = true;
75 }
76
77 switch (state) {
78@@ -1070,7 +1070,7 @@ process_vfork_on_event(struct event_handler *super, Event *event)
79 &event->e_un.brk_addr, &sbp);
80 assert(sbp != NULL);
81 breakpoint_turn_on(sbp, proc->leader);
82- self->vfork_bp_refd = 1;
83+ self->vfork_bp_refd = true;
84 }
85 break;
86
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_0.8.1.bb
index f84d989eef..77bb61830b 100644
--- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb
+++ b/meta-oe/recipes-devtools/ltrace/ltrace_0.8.1.bb
@@ -9,25 +9,24 @@ HOMEPAGE = "http://ltrace.org/"
9LICENSE = "GPL-2.0-only" 9LICENSE = "GPL-2.0-only"
10LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" 10LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
11 11
12PE = "1" 12PE = "2"
13PV = "7.91+git" 13SRCREV = "7ef6e6097586b751cce298c256a919404dab259d"
14SRCREV = "8eabf684ba6b11ae7a1a843aca3c0657c6329d73"
15 14
16DEPENDS = "elfutils" 15DEPENDS = "elfutils"
17SRC_URI = "git://gitlab.com/cespedes/ltrace.git;protocol=https;branch=main \ 16SRC_URI = "git://gitlab.com/cespedes/ltrace.git;protocol=https;branch=main;tag=${PV} \
18 file://configure-allow-to-disable-selinux-support.patch \ 17 file://configure-allow-to-disable-selinux-support.patch \
19 file://0001-Use-correct-enum-type.patch \ 18 file://0001-Use-correct-enum-type.patch \
20 file://0002-Fix-const-qualifier-error.patch \ 19 file://0002-Fix-const-qualifier-error.patch \
21 file://0001-Add-support-for-mips64-n32-n64.patch \ 20 file://0001-Add-support-for-mips64-n32-n64.patch \
22 file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \
23 file://0001-mips-plt.c-Delete-include-error.h.patch \ 21 file://0001-mips-plt.c-Delete-include-error.h.patch \
24 file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ 22 file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \
25 file://0001-hook-Do-not-append-int-to-std-string.patch \ 23 file://0001-hook-Do-not-append-int-to-std-string.patch \
26 file://0001-Bug-fix-for-data-type-length-judgment.patch \ 24 file://0001-Bug-fix-for-data-type-length-judgment.patch \
27 file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ 25 file://0001-ppc-Remove-unused-host_powerpc64-function.patch \
28 file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ 26 file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \
29 file://0001-Fix-type-of-single-bit-bitfields.patch \
30 file://0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch \ 27 file://0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch \
28 file://0001-dwarf_prototypes-return-NULL-from-NEXT_SIBLING-on-er.patch \
29 file://0001-trace-fix-1-bit-bitfield-assignments-for-clang-Wsing.patch \
31 " 30 "
32SRC_URI:append:libc-musl = " file://add_ppc64le.patch" 31SRC_URI:append:libc-musl = " file://add_ppc64le.patch"
33 32
diff --git a/meta-oe/recipes-devtools/luajit/luajit_git.bb b/meta-oe/recipes-devtools/luajit/luajit_git.bb
index 9d392f1c29..9873ed6f05 100644
--- a/meta-oe/recipes-devtools/luajit/luajit_git.bb
+++ b/meta-oe/recipes-devtools/luajit/luajit_git.bb
@@ -1,6 +1,6 @@
1SUMMARY = "Just-In-Time Compiler for Lua" 1SUMMARY = "Just-In-Time Compiler for Lua"
2LICENSE = "MIT" 2LICENSE = "MIT"
3LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=d421a5e2a24207f5e260537399a9a38b" 3LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=a2c43bf4a9ea63755af2131b0ae59ff3"
4HOMEPAGE = "http://luajit.org" 4HOMEPAGE = "http://luajit.org"
5 5
6SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \ 6SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \
@@ -9,7 +9,7 @@ SRC_URI = "git://luajit.org/git/luajit-2.0.git;protocol=http;branch=v2.1 \
9 " 9 "
10 10
11PV = "2.1" 11PV = "2.1"
12SRCREV = "538a82133ad6fddfd0ca64de167c4aca3bc1a2da" 12SRCREV = "659a61693aa3b87661864ad0f12eee14c865cd7f"
13 13
14inherit pkgconfig binconfig siteinfo 14inherit pkgconfig binconfig siteinfo
15 15
diff --git a/meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb b/meta-oe/recipes-devtools/mercurial/mercurial_7.2.2.bb
index 3fa692029e..5e350831f5 100644
--- a/meta-oe/recipes-devtools/mercurial/mercurial_6.6.3.bb
+++ b/meta-oe/recipes-devtools/mercurial/mercurial_7.2.2.bb
@@ -10,7 +10,7 @@ RDEPENDS:${PN} = "python3 python3-modules"
10inherit python3native python3targetconfig 10inherit python3native python3targetconfig
11 11
12SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz" 12SRC_URI = "https://www.mercurial-scm.org/release/${BP}.tar.gz"
13SRC_URI[sha256sum] = "f75d6a4a75823a1b7d713a4967eca2f596f466e58fc6bc06d72642932fd7e307" 13SRC_URI[sha256sum] = "f2ec8e7eeef0500591706d374555f0ceb118822068e75fa3b32be07dd2184f6c"
14 14
15S = "${UNPACKDIR}/mercurial-${PV}" 15S = "${UNPACKDIR}/mercurial-${PV}"
16 16
diff --git a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.1.bb b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.2.bb
index 87a8cbbb88..3d795878b2 100644
--- a/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.1.bb
+++ b/meta-oe/recipes-devtools/microsoft-gsl/microsoft-gsl_4.2.2.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=363055e71e77071107ba2bb9a54bd9a7"
11SRC_URI = "git://github.com/microsoft/GSL.git;protocol=https;branch=rel/4.2;tag=v${PV} \ 11SRC_URI = "git://github.com/microsoft/GSL.git;protocol=https;branch=rel/4.2;tag=v${PV} \
12 file://run-ptest \ 12 file://run-ptest \
13 " 13 "
14SRCREV = "249146590e322123cd0b378b1f364d6069717687" 14SRCREV = "152d6eb989a1ecd23fe9c9cfb2fb8cfc7c0cd0c1"
15 15
16inherit cmake pkgconfig ptest 16inherit cmake pkgconfig ptest
17 17
diff --git a/meta-oe/recipes-devtools/mpich/mpich_5.0.0.bb b/meta-oe/recipes-devtools/mpich/mpich_5.0.1.bb
index 505fc6f92b..55f6cde82f 100644
--- a/meta-oe/recipes-devtools/mpich/mpich_5.0.0.bb
+++ b/meta-oe/recipes-devtools/mpich/mpich_5.0.1.bb
@@ -6,7 +6,7 @@ LICENSE = "BSD-2-Clause"
6LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3a296dfb961b957b0e8adf67d8478d3d" 6LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=3a296dfb961b957b0e8adf67d8478d3d"
7 7
8SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz" 8SRC_URI = "http://www.mpich.org/static/downloads/${PV}/mpich-${PV}.tar.gz"
9SRC_URI[sha256sum] = "e9350e32224283e95311f22134f36c98e3cd1c665d17fae20a6cc92ed3cffe11" 9SRC_URI[sha256sum] = "8c1832a13ddacf071685069f5fadfd1f2877a29e1a628652892c65211b1f3327"
10 10
11RDEPENDS:${PN} += "bash perl libxml2" 11RDEPENDS:${PN} += "bash perl libxml2"
12 12
diff --git a/meta-oe/recipes-devtools/msgpack/msgpack-cpp_7.0.0.bb b/meta-oe/recipes-devtools/msgpack/msgpack-cpp_8.0.0.bb
index 5b296a20cd..87f11d279b 100644
--- a/meta-oe/recipes-devtools/msgpack/msgpack-cpp_7.0.0.bb
+++ b/meta-oe/recipes-devtools/msgpack/msgpack-cpp_8.0.0.bb
@@ -8,7 +8,7 @@ LIC_FILES_CHKSUM = "file://NOTICE;md5=7a858c074723608e08614061dc044352 \
8 " 8 "
9 9
10SRC_URI = "https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/msgpack-cxx-${PV}.tar.gz" 10SRC_URI = "https://github.com/msgpack/msgpack-c/releases/download/cpp-${PV}/msgpack-cxx-${PV}.tar.gz"
11SRC_URI[sha256sum] = "7504b7af7e7b9002ce529d4f941e1b7fb1fb435768780ce7da4abaac79bb156f" 11SRC_URI[sha256sum] = "4a3c0c0ac55ef4456c2d0b93c21b5d105aa3a8f21ef8fa9758550feaf989b92f"
12 12
13UPSTREAM_CHECK_URI = "https://github.com/msgpack/msgpack-c/releases" 13UPSTREAM_CHECK_URI = "https://github.com/msgpack/msgpack-c/releases"
14UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)" 14UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)"
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0001-Do-not-use-glob-in-deps.patch
index f692eedd41..622d25bbd3 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0001-Do-not-use-glob-in-deps.patch
@@ -1,10 +1,13 @@
1// Revert the patch found here https://github.com/nodejs/node/commit/fe1dd26398e1887b96b2dc51ab59371ad4d6bc20?diff=unified&w=0
2// so that the dependencies are still explicitly enumerated. That way we
3// can pick and choose which pieces to build and which to use existing system
4// packages for.
5
1From 689e098cbde130ecde523ae39df3567456271fda Mon Sep 17 00:00:00 2001 6From 689e098cbde130ecde523ae39df3567456271fda Mon Sep 17 00:00:00 2001
2From: Zuzana Svetlikova <zsvetlik@redhat.com> 7From: Zuzana Svetlikova <zsvetlik@redhat.com>
3Date: Thu, 27 Apr 2017 14:25:42 +0200 8Date: Thu, 27 Apr 2017 14:25:42 +0200
4Subject: [PATCH] Disable running gyp on shared deps 9Subject: [PATCH] Disable running gyp on shared deps
5 10
6Upstream-Status: Inappropriate [embedded specific]
7
8Probably imported from: 11Probably imported from:
9https://src.fedoraproject.org/rpms/nodejs/c/41af04f2a3c050fb44628e91ac65fd225b927acb?branch=22609d8c1bfeaa21fe0057645af20b3a2ccc7f53 12https://src.fedoraproject.org/rpms/nodejs/c/41af04f2a3c050fb44628e91ac65fd225b927acb?branch=22609d8c1bfeaa21fe0057645af20b3a2ccc7f53
10which is probably based on dont-run-gyp-files-for-bundled-deps.patch added in: 13which is probably based on dont-run-gyp-files-for-bundled-deps.patch added in:
@@ -28,20 +31,17 @@ python prune_sources() {
28 shutil.rmtree(d.getVar('S') + '/deps/zlib') 31 shutil.rmtree(d.getVar('S') + '/deps/zlib')
29} 32}
30do_unpack[postfuncs] += "prune_sources" 33do_unpack[postfuncs] += "prune_sources"
31---
32 Makefile | 2 +-
33 1 file changed, 1 insertion(+), 1 deletion(-)
34 34
35diff --git a/Makefile b/Makefile 35Upstream-Status: Inappropriate [embedded specific]
36index dba16e5e..da4faffc 100644 36
37--- a/Makefile 37--- a/Makefile
38+++ b/Makefile 38+++ b/Makefile
39@@ -173,7 +173,7 @@ with-code-cache test-code-cache: 39@@ -179,7 +179,7 @@ with-code-cache test-code-cache:
40 $(warning '$@' target is a noop) 40 $(warning '$@' target is a noop)
41 41
42 out/Makefile: config.gypi common.gypi common_node.gypi node.gyp \ 42 out/Makefile: config.gypi common.gypi node.gyp \
43- deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \ 43- deps/*/*.gyp \
44+ deps/llhttp/llhttp.gyp \ 44+ deps/llhttp/llhttp.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
45 deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
46 tools/v8_gypfiles/toolchain.gypi \ 45 tools/v8_gypfiles/toolchain.gypi \
47 tools/v8_gypfiles/features.gypi \ 46 tools/v8_gypfiles/features.gypi \
47 tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0002-v8-don-t-override-ARM-CFLAGS.patch
index cc920118a2..cc920118a2 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0004-v8-don-t-override-ARM-CFLAGS.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0002-v8-don-t-override-ARM-CFLAGS.patch
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0003-system-c-ares.patch
index 6f08c71e18..6f08c71e18 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/system-c-ares.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0003-system-c-ares.patch
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0004-liftoff-Correct-function-signatures.patch
index 5e617e6554..5e617e6554 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-liftoff-Correct-function-signatures.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0004-liftoff-Correct-function-signatures.patch
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0006-deps-disable-io_uring-support-in-libuv.patch
index 50d63cf78c..50d63cf78c 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-deps-disable-io_uring-support-in-libuv.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0006-deps-disable-io_uring-support-in-libuv.patch
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-positional-args.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0007-positional-args.patch
index 5fd6aee351..5fd6aee351 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-positional-args.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0007-positional-args.patch
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-custom-env.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0008-custom-env.patch
index 532d3c5f51..532d3c5f51 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-custom-env.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0008-custom-env.patch
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0009-Using-native-binaries.patch
index 0178cec777..0178cec777 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Using-native-binaries.patch
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0009-Using-native-binaries.patch
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-24/0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch b/meta-oe/recipes-devtools/nodejs/nodejs-24/0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch
new file mode 100644
index 0000000000..4053f97053
--- /dev/null
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch
@@ -0,0 +1,52 @@
1From 9f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a Mon Sep 17 00:00:00 2001
2From: Bin Cao <bin.cao.cn@windriver.com>
3Date: Thu, 29 May 2026 12:00:00 +0800
4Subject: [PATCH] v8: fix -Wtemplate-body error with GCC 15 on ia32
5
6GCC 15 introduced -Wtemplate-body (enabled by default as an error) which
7performs stricter name lookup checking inside template bodies. In the
8Int64LoweringReducer template class (only compiled for 32-bit targets),
9the expression `__ Tuple<Word32, Word32>(...)` is ambiguous in a
10dependent context because GCC cannot determine whether `Tuple` after
11the `__` macro expansion (`Asm().`) refers to a template member function
12or the struct type `Tuple`.
13
14Add the C++ `template` disambiguator keyword to tell the compiler that
15`Tuple` is a dependent template name. This is the standards-correct fix
16and is backward-compatible with older GCC versions.
17
18This is a minimal backport of the fix already present in upstream V8
19(main branch), where the method was additionally renamed from `Tuple` to
20`MakeTuple`.
21
22Upstream-Status: Backport [https://github.com/nodejs/node/commit/7772a2df9d0b4db9947dbb902b4aec33c35401c0]
23Signed-off-by: Bin Cao <bin.cao.cn@windriver.com>
24---
25 .../turboshaft/int64-lowering-reducer.h | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28diff --git a/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h b/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
29index abcdef1..1234567 100644
30--- a/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
31+++ b/deps/v8/src/compiler/turboshaft/int64-lowering-reducer.h
32@@ -637,7 +637,7 @@ class Int64LoweringReducer : public Next {
33 result = __ Word32CountLeadingZeros(high);
34 }
35
36- return __ Tuple<Word32, Word32>(result, __ Word32Constant(0));
37+ return __ template Tuple<Word32, Word32>(result, __ Word32Constant(0));
38 }
39
40 V<Word32Pair> LowerCtz(V<Word32Pair> input) {
41@@ -650,7 +650,7 @@ class Int64LoweringReducer : public Next {
42 result = __ Word32CountTrailingZeros(low);
43 }
44
45- return __ Tuple<Word32, Word32>(result, __ Word32Constant(0));
46+ return __ template Tuple<Word32, Word32>(result, __ Word32Constant(0));
47 }
48
49 V<Word32Pair> LowerPopCount(V<Word32Pair> input) {
50--
512.43.0
52
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest b/meta-oe/recipes-devtools/nodejs/nodejs-24/run-ptest
index e82f373626..e82f373626 100755
--- a/meta-oe/recipes-devtools/nodejs/nodejs/run-ptest
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-24/run-ptest
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.22/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-24.16/oe-npm-cache
index eb0f143eae..eb0f143eae 100755
--- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-22.22/oe-npm-cache
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-24.16/oe-npm-cache
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.22.bb b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_24.16.bb
index 1dcd1f7926..1dcd1f7926 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_22.22.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-native_24.16.bb
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch
deleted file mode 100644
index 551869523e..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-Do-not-use-glob-in-deps.patch
+++ /dev/null
@@ -1,22 +0,0 @@
1// Revert the patch found here https://github.com/nodejs/node/commit/fe1dd26398e1887b96b2dc51ab59371ad4d6bc20?diff=unified&w=0
2// so that the dependencies are still explicitly enumerated. That way we
3// can pick and choose which pieces to build and which to use existing system
4// packages for.
5
6Upstream-Status: Inappropriate [embedded specific]
7
8
9--- a/Makefile 2025-01-11 14:37:29.059536707 -0500
10+++ b/Makefile 2025-01-11 14:39:52.419867046 -0500
11@@ -171,7 +171,8 @@
12 $(warning '$@' target is a noop)
13
14 out/Makefile: config.gypi common.gypi common_node.gypi node.gyp \
15- deps/*/*.gyp \
16+ deps/uv/uv.gyp deps/llhttp/llhttp.gyp deps/zlib/zlib.gyp \
17+ deps/simdutf/simdutf.gyp deps/ada/ada.gyp deps/nbytes/nbytes.gyp \
18 tools/v8_gypfiles/toolchain.gypi \
19 tools/v8_gypfiles/features.gypi \
20 tools/v8_gypfiles/inspector.gypi tools/v8_gypfiles/v8.gyp
21
22
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-remove-redundant-mXX-flags-for-V8.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-remove-redundant-mXX-flags-for-V8.patch
deleted file mode 100644
index b47aa564cf..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-build-remove-redundant-mXX-flags-for-V8.patch
+++ /dev/null
@@ -1,133 +0,0 @@
1From 403264c02edc2689671dbefaf032e3acb4fb713d Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
3Date: Sat, 19 Apr 2025 12:22:10 +0200
4Subject: [PATCH] build: remove redundant `-mXX` flags for V8
5
6They are already set by `common.gypi`.
7
8
9Needed to build on aarch64 build hosts with clang compiler
10Drop it when upgrading to 0.24.x or newer.
11
12Upstream-Status: Backport [https://github.com/nodejs/node/commit/403264c02edc2689671dbefaf032e3acb4fb713d]
13
14PR-URL: https://github.com/nodejs/node/pull/57907
15Reviewed-By: James M Snell <jasnell@gmail.com>
16Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
17Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
18Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
19Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
20---
21 tools/v8_gypfiles/toolchain.gypi | 91 --------------------------------
22 1 file changed, 91 deletions(-)
23
24Index: node-v22.16.0/tools/v8_gypfiles/toolchain.gypi
25===================================================================
26--- node-v22.16.0.orig/tools/v8_gypfiles/toolchain.gypi
27+++ node-v22.16.0/tools/v8_gypfiles/toolchain.gypi
28@@ -103,33 +103,6 @@
29 # Indicates if gcmole tools are downloaded by a hook.
30 'gcmole%': 0,
31 },
32-
33- # [GYP] this needs to be outside of the top level 'variables'
34- 'conditions': [
35- ['host_arch=="ia32" or host_arch=="x64" or \
36- host_arch=="ppc" or host_arch=="ppc64" or \
37- host_arch=="s390x" or \
38- clang==1', {
39- 'variables': {
40- 'host_cxx_is_biarch%': 1,
41- },
42- }, {
43- 'variables': {
44- 'host_cxx_is_biarch%': 0,
45- },
46- }],
47- ['target_arch=="ia32" or target_arch=="x64" or \
48- target_arch=="ppc" or target_arch=="ppc64" or \
49- target_arch=="s390x" or clang==1', {
50- 'variables': {
51- 'target_cxx_is_biarch%': 1,
52- },
53- }, {
54- 'variables': {
55- 'target_cxx_is_biarch%': 0,
56- },
57- }],
58- ],
59 'target_defaults': {
60 'cflags!': ['-Wall', '-Wextra'],
61 'conditions': [
62@@ -553,71 +526,6 @@
63 '-mmmx', # Allows mmintrin.h for MMX intrinsics.
64 ],
65 }],
66- ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris" \
67- or OS=="netbsd" or OS=="mac" or OS=="android" or OS=="qnx") and \
68- (v8_target_arch=="arm" or v8_target_arch=="ia32" or \
69- v8_target_arch=="ppc")', {
70- 'target_conditions': [
71- ['_toolset=="host"', {
72- 'conditions': [
73- ['host_cxx_is_biarch==1', {
74- 'conditions': [
75- ['host_arch=="s390x"', {
76- 'cflags': [ '-m31' ],
77- 'ldflags': [ '-m31' ]
78- },{
79- 'cflags': [ '-m32' ],
80- 'ldflags': [ '-m32' ]
81- }],
82- ],
83- }],
84- ],
85- 'xcode_settings': {
86- 'ARCHS': [ 'i386' ],
87- },
88- }],
89- ['_toolset=="target"', {
90- 'conditions': [
91- ['target_cxx_is_biarch==1', {
92- 'conditions': [
93- ['host_arch=="s390x"', {
94- 'cflags': [ '-m31' ],
95- 'ldflags': [ '-m31' ]
96- },{
97- 'cflags': [ '-m32' ],
98- 'ldflags': [ '-m32' ],
99- }],
100- ],
101- }],
102- ],
103- 'xcode_settings': {
104- 'ARCHS': [ 'i386' ],
105- },
106- }],
107- ],
108- }],
109- ['(OS=="linux" or OS=="android") and \
110- (v8_target_arch=="x64" or v8_target_arch=="arm64" or \
111- v8_target_arch=="ppc64" or v8_target_arch=="s390x")', {
112- 'target_conditions': [
113- ['_toolset=="host"', {
114- 'conditions': [
115- ['host_cxx_is_biarch==1', {
116- 'cflags': [ '-m64' ],
117- 'ldflags': [ '-m64' ]
118- }],
119- ],
120- }],
121- ['_toolset=="target"', {
122- 'conditions': [
123- ['target_cxx_is_biarch==1', {
124- 'cflags': [ '-m64' ],
125- 'ldflags': [ '-m64' ],
126- }],
127- ]
128- }],
129- ],
130- }],
131 ['OS=="android" and v8_android_log_stdout==1', {
132 'defines': [
133 'V8_ANDROID_LOG_STDOUT',
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-detect-aarch64-Neon-correctly.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-detect-aarch64-Neon-correctly.patch
deleted file mode 100644
index 15de2c1119..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-detect-aarch64-Neon-correctly.patch
+++ /dev/null
@@ -1,51 +0,0 @@
1From 41ec2d5302b77be27ca972102c29ce12471ed4b0 Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Thu, 12 Feb 2026 11:09:44 +0100
4Subject: [PATCH 2/2] detect aarch64 Neon correctly
5
6The llhttp vendored dependency of nodejs takes advantage of Arm NEON
7instructions when they are available, however they are detected by
8checking for an outdated CPU feature macro: it checks for __ARM_NEON__,
9however it is not defined by new compilers for aarch64, rather they
10set __ARM_NEON. The Arm C extension guide[1] refers to __ARM_NEON macro
11aswell.
12
13This patch changes the detection to check for both macros when detecting
14the availability of NEON instructions.
15
16The code this patch modifies is generated, so the patch itself isn't
17suitable for upstream submission, as the root cause of the error is
18in the generator itself. A PR has been submitted[2] to the generator
19project to rectify this issue.
20
21[1]: https://developer.arm.com/documentation/ihi0053/d/ - pdf, section 6.9
22[2]: https://github.com/nodejs/llparse/pull/84
23
24Upstream-Status: Inappropriate [see above]
25Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
26---
27 deps/llhttp/src/llhttp.c | 4 ++--
28 1 file changed, 2 insertions(+), 2 deletions(-)
29
30diff --git a/deps/llhttp/src/llhttp.c b/deps/llhttp/src/llhttp.c
31index a0e59e50..b069bbbb 100644
32--- a/deps/llhttp/src/llhttp.c
33+++ b/deps/llhttp/src/llhttp.c
34@@ -10,7 +10,7 @@
35 #endif /* _MSC_VER */
36 #endif /* __SSE4_2__ */
37
38-#ifdef __ARM_NEON__
39+#if defined(__ARM_NEON__) || defined(__ARM_NEON)
40 #include <arm_neon.h>
41 #endif /* __ARM_NEON__ */
42
43@@ -2625,7 +2625,7 @@ static llparse_state_t llhttp__internal__run(
44 goto s_n_llhttp__internal__n_header_value_otherwise;
45 }
46 #endif /* __SSE4_2__ */
47- #ifdef __ARM_NEON__
48+ #if defined(__ARM_NEON__) || defined(__ARM_NEON)
49 while (endp - p >= 16) {
50 uint8x16_t input;
51 uint8x16_t single;
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-fix-arm-Neon-intrinsics-types.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-fix-arm-Neon-intrinsics-types.patch
deleted file mode 100644
index ddbad575f0..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-fix-arm-Neon-intrinsics-types.patch
+++ /dev/null
@@ -1,59 +0,0 @@
1From 3f4283dac7d88a89b42f1f2966a862cee5afe486 Mon Sep 17 00:00:00 2001
2From: Gyorgy Sarvari <skandigraun@gmail.com>
3Date: Thu, 12 Feb 2026 11:03:53 +0100
4Subject: [PATCH 1/2] fix arm Neon intrinsics types
5
6The current code calls these intrinsics with incorrect datatypes
7(it uses a vector of uint16 instead of uint8), causing compilation
8to fail with the following error:
9
10| ../deps/llhttp/src/llhttp.c: In function 'llhttp__internal__run':
11| ../deps/llhttp/src/llhttp.c:2645:9: note: use '-flax-vector-conversions' to permit conversions between vectors with differing element types or numbers of subparts
12| 2645 | );
13| | ^
14| ../deps/llhttp/src/llhttp.c:2643:11: error: incompatible type for argument 1 of 'vandq_u16'
15| 2643 | vcgeq_u8(input, vdupq_n_u8(' ')),
16
17To avoid this, set the correct intrinsics call that matches the
18actual arguments.
19
20The code that this patch modifies is generated code, so in itself
21this change isn't appropriate for upstream. The actual problem
22is in the code generator itself, for which a PR is already pending
23for merging[1]. This patch is a port of that PR.
24
25[1]: https://github.com/nodejs/llparse/pull/79
26
27Upstream-Status: Inappropriate [see above]
28Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
29---
30 deps/llhttp/src/llhttp.c | 12 ++++++------
31 1 file changed, 6 insertions(+), 6 deletions(-)
32
33diff --git a/deps/llhttp/src/llhttp.c b/deps/llhttp/src/llhttp.c
34index aa4c4682..887603fd 100644
35--- a/deps/llhttp/src/llhttp.c
36+++ b/deps/llhttp/src/llhttp.c
37@@ -2639,17 +2639,17 @@ static llparse_state_t llhttp__internal__run(
38 /* Find first character that does not match `ranges` */
39 single = vceqq_u8(input, vdupq_n_u8(0x9));
40 mask = single;
41- single = vandq_u16(
42+ single = vandq_u8(
43 vcgeq_u8(input, vdupq_n_u8(' ')),
44 vcleq_u8(input, vdupq_n_u8('~'))
45 );
46- mask = vorrq_u16(mask, single);
47- single = vandq_u16(
48+ mask = vorrq_u8(mask, single);
49+ single = vandq_u8(
50 vcgeq_u8(input, vdupq_n_u8(0x80)),
51 vcleq_u8(input, vdupq_n_u8(0xff))
52 );
53- mask = vorrq_u16(mask, single);
54- narrow = vshrn_n_u16(mask, 4);
55+ mask = vorrq_u8(mask, single);
56+ narrow = vshrn_n_u16(vreinterpretq_u16_u8(mask), 4);
57 match_mask = ~vget_lane_u64(vreinterpret_u64_u8(narrow), 0);
58 match_len = __builtin_ctzll(match_mask) >> 2;
59 if (match_len != 16) {
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-llhttp-fix-NEON-header-value-__builtin_ctzll-undefin.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-llhttp-fix-NEON-header-value-__builtin_ctzll-undefin.patch
deleted file mode 100644
index 683dddcf04..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-llhttp-fix-NEON-header-value-__builtin_ctzll-undefin.patch
+++ /dev/null
@@ -1,60 +0,0 @@
1From a63a5faea54055973bf5f0a514444532563cc20d Mon Sep 17 00:00:00 2001
2From: Telukula Jeevan Kumar Sahu <j-sahu@ti.com>
3Date: Fri, 27 Feb 2026 20:58:43 +0530
4Subject: [PATCH] llhttp: fix NEON header value __builtin_ctzll undefined
5 behavior
6
7When all 16 bytes match the allowed range, match_mask becomes 0 after
8the bitwise NOT. Calling __builtin_ctzll(0) is undefined behavior per
9the C standard.
10
11The code expects match_len == 16 when all bytes match (so the branch
12is skipped and p += 16 continues the loop), but this relied on
13ctzll(0) returning 64, which is not guaranteed.
14
15GCC at -O2 exploits this UB by deducing that __builtin_ctzll() result
16is always in range [0, 63], and after >> 2 always in [0, 15], which
17is never equal to 16. The compiler then optimizes
18"if (match_len != 16)" to always-true, causing every valid 16-byte
19chunk to be falsely rejected as containing an invalid character.
20
21This manifests as HTTP 400 Bad Request (HPE_INVALID_HEADER_TOKEN) for
22any HTTP header value longer than 16 characters on ARM targets with
23NEON enabled.
24
25Fix by explicitly checking for match_mask == 0 and setting
26match_len = 16, avoiding the undefined behavior entirely. This bug
27affects both aarch64 and armv7 NEON targets.
28
29The fix has been merged upstream in llparse 7.3.1 [1] and is included
30in llhttp 9.3.1. This patch can be dropped when nodejs updates its
31bundled llhttp to >= 9.3.1.
32
33[1]: https://github.com/nodejs/llparse/pull/83
34
35Upstream-Status: Inappropriate
36Signed-off-by: Telukula Jeevan Kumar Sahu <j-sahu@ti.com>
37---
38 deps/llhttp/src/llhttp.c | 6 +++++-
39 1 file changed, 5 insertions(+), 1 deletion(-)
40
41diff --git a/deps/llhttp/src/llhttp.c b/deps/llhttp/src/llhttp.c
42index 14b731e..b0a46c6 100644
43--- a/deps/llhttp/src/llhttp.c
44+++ b/deps/llhttp/src/llhttp.c
45@@ -2651,7 +2651,11 @@ static llparse_state_t llhttp__internal__run(
46 mask = vorrq_u8(mask, single);
47 narrow = vshrn_n_u16(vreinterpretq_u16_u8(mask), 4);
48 match_mask = ~vget_lane_u64(vreinterpret_u64_u8(narrow), 0);
49- match_len = __builtin_ctzll(match_mask) >> 2;
50+ if (match_mask == 0) {
51+ match_len = 16;
52+ } else {
53+ match_len = __builtin_ctzll(match_mask) >> 2;
54+ }
55 if (match_len != 16) {
56 p += match_len;
57 goto s_n_llhttp__internal__n_header_value_otherwise;
58--
592.34.1
60
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch b/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch
deleted file mode 100644
index dd9c9015e2..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch
+++ /dev/null
@@ -1,25 +0,0 @@
1From 0976af0f3b328436ea44a74a406f311adb2ab211 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 15 Jun 2021 19:01:31 -0700
4Subject: [PATCH] ppc64: Do not use -mminimal-toc with clang
5
6clang does not support this option
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10Upstream-Status: Pending
11
12 common.gypi | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15--- a/common.gypi
16+++ b/common.gypi
17@@ -417,7 +417,7 @@
18 'ldflags': [ '-m32' ],
19 }],
20 [ 'target_arch=="ppc64" and OS!="aix"', {
21- 'cflags': [ '-m64', '-mminimal-toc' ],
22+ 'cflags': [ '-m64' ],
23 'ldflags': [ '-m64' ],
24 }],
25 [ 'target_arch=="s390x"', {
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch b/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch
deleted file mode 100644
index 835c7018de..0000000000
--- a/meta-oe/recipes-devtools/nodejs/nodejs/libatomic.patch
+++ /dev/null
@@ -1,96 +0,0 @@
1From 15e751e4b79475fb34e4b32a3ca54119b20c564a Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Sat, 17 Aug 2024 21:33:18 +0800
4Subject: [PATCH] link libatomic for clang conditionally
5
6Clang emits atomic builtin, explicitly link libatomic conditionally:
7- For target build, always link -latomic for clang as usual
8- For host build, if host and target have same bit width, cross compiling
9 is enabled, and host toolchain is gcc which does not link -latomic;
10 if host and target have different bit width, no cross compiling,
11 host build is the same with target build that requires to link
12 -latomic;
13
14Fix:
15|tmp-glibc/work/core2-64-wrs-linux/nodejs/20.13.0/node-v20.13.0/out/Release/node_js2c: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
16
17Upstream-Status: Inappropriate [OE specific]
18
19Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
20
21Added libatomic library explicitly to x86 targets.
22
23Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
24---
25 node.gyp | 13 ++++++++++++-
26 tools/v8_gypfiles/v8.gyp | 15 ++++++++++++---
27 2 files changed, 24 insertions(+), 4 deletions(-)
28
29diff --git a/node.gyp b/node.gyp
30index b425f443..f296f35c 100644
31--- a/node.gyp
32+++ b/node.gyp
33@@ -503,7 +503,18 @@
34 ],
35 }],
36 ['OS=="linux" and clang==1', {
37- 'libraries': ['-latomic'],
38+ 'target_conditions': [
39+ ['_toolset=="host"', {
40+ 'conditions': [
41+ ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', {
42+ 'libraries': ['-latomic'],
43+ }],
44+ ],
45+ }],
46+ ['_toolset=="target"', {
47+ 'libraries': ['-latomic'],
48+ }],
49+ ],
50 }],
51 ],
52 },
53diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
54index b23263cf..dcabf4ca 100644
55--- a/tools/v8_gypfiles/v8.gyp
56+++ b/tools/v8_gypfiles/v8.gyp
57@@ -1348,9 +1348,18 @@
58 # Platforms that don't have Compare-And-Swap (CAS) support need to link atomic library
59 # to implement atomic memory access
60 ['v8_current_cpu in ["mips64", "mips64el", "ppc", "arm", "riscv64", "loong64"]', {
61- 'link_settings': {
62- 'libraries': ['-latomic', ],
63- },
64+ 'target_conditions': [
65+ ['_toolset=="host"', {
66+ 'conditions': [
67+ ['"<!(echo $HOST_AND_TARGET_SAME_WIDTH)"=="0"', {
68+ 'libraries': ['-latomic'],
69+ }],
70+ ],
71+ }],
72+ ['_toolset=="target"', {
73+ 'libraries': ['-latomic', ],
74+ }],
75+ ],
76 }],
77 ],
78 }, # v8_base_without_compiler
79diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
80index cb82d4f15bc..65cb123b7bf 100644
81--- a/tools/v8_gypfiles/v8.gyp
82+++ b/tools/v8_gypfiles/v8.gyp
83@@ -1820,6 +1820,13 @@
84 ['enable_lto=="true"', {
85 'ldflags': [ '-fno-lto' ],
86 }],
87+ # For future patch-rebases: this hunk is in mksnapshot target.
88+ # ia32 includes x86 also
89+ ['v8_target_arch=="ia32"', {
90+ 'link_settings': {
91+ 'libraries': ['-latomic']
92+ }
93+ }],
94 ],
95 }, # mksnapshot
96 {
diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_22.22.1.bb b/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb
index 09d6b896b2..ff40a09656 100644
--- a/meta-oe/recipes-devtools/nodejs/nodejs_22.22.1.bb
+++ b/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb
@@ -1,7 +1,8 @@
1DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" 1DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript"
2HOMEPAGE = "http://nodejs.org" 2HOMEPAGE = "http://nodejs.org"
3LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0 & BlueOak-1.0.0" 3LICENSE = "MIT & ISC & BSD-2-Clause & BSD-3-Clause & Artistic-2.0 & Apache-2.0 & BlueOak-1.0.0"
4LIC_FILES_CHKSUM = "file://LICENSE;md5=b195f4ea4368177a2fd84b879f09cba8" 4LIC_FILES_CHKSUM = "file://LICENSE;md5=9f816753e8bdfe4576cb87159a0cd60c"
5FILESEXTRAPATHS:prepend := "${THISDIR}/nodejs-24:"
5 6
6CVE_PRODUCT = "nodejs node.js" 7CVE_PRODUCT = "nodejs node.js"
7 8
@@ -22,27 +23,19 @@ COMPATIBLE_HOST:powerpc64le = "null"
22 23
23SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ 24SRC_URI = "https://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \
24 file://0001-Do-not-use-glob-in-deps.patch \ 25 file://0001-Do-not-use-glob-in-deps.patch \
25 file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ 26 file://0002-v8-don-t-override-ARM-CFLAGS.patch \
26 file://0004-v8-don-t-override-ARM-CFLAGS.patch \ 27 file://0003-system-c-ares.patch \
27 file://system-c-ares.patch \ 28 file://0004-liftoff-Correct-function-signatures.patch \
28 file://0001-liftoff-Correct-function-signatures.patch \ 29 file://0006-deps-disable-io_uring-support-in-libuv.patch \
29 file://libatomic.patch \ 30 file://0007-positional-args.patch \
30 file://0001-deps-disable-io_uring-support-in-libuv.patch \ 31 file://0008-custom-env.patch \
31 file://0001-positional-args.patch \ 32 file://0010-v8-fix-Wtemplate-body-error-with-GCC-15-on-ia32.patch \
32 file://0001-custom-env.patch \
33 file://0001-build-remove-redundant-mXX-flags-for-V8.patch \
34 file://0001-fix-arm-Neon-intrinsics-types.patch \
35 file://0001-detect-aarch64-Neon-correctly.patch \
36 file://0001-llhttp-fix-NEON-header-value-__builtin_ctzll-undefin.patch \
37 file://run-ptest \ 33 file://run-ptest \
38 " 34 "
39SRC_URI:append:class-target = " \ 35SRC_URI:append:class-target = " \
40 file://0001-Using-native-binaries.patch \ 36 file://0009-Using-native-binaries.patch \
41 " 37 "
42SRC_URI:append:toolchain-clang:powerpc64le = " \ 38SRC_URI[sha256sum] = "2ff84a6de70b6165290111b0fc656ded1ad207a799816fe720cc7c31232df30f"
43 file://0001-ppc64-Do-not-use-mminimal-toc-with-clang.patch \
44 "
45SRC_URI[sha256sum] = "87104b07e7acee748bcc5391e1bc69cf3571caa0fdfb8b1d6b5fd3f9599b7849"
46 39
47S = "${UNPACKDIR}/node-v${PV}" 40S = "${UNPACKDIR}/node-v${PV}"
48 41
diff --git a/meta-oe/recipes-devtools/perl/exiftool_13.52.bb b/meta-oe/recipes-devtools/perl/exiftool_13.59.bb
index f40116144e..224741cce4 100644
--- a/meta-oe/recipes-devtools/perl/exiftool_13.52.bb
+++ b/meta-oe/recipes-devtools/perl/exiftool_13.59.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://perl-Image-ExifTool.spec;beginline=5;endline=5;md5=ff
7 7
8inherit cpan 8inherit cpan
9 9
10SRCREV = "02c78a2e051894b57ad8a11024f8cfa05957e725" 10SRCREV = "2200871d9cef988051d2a99d67df3bda6cbb30a8"
11SRC_URI = "git://github.com/exiftool/exiftool;protocol=https;branch=master;tag=${PV}" 11SRC_URI = "git://github.com/exiftool/exiftool;protocol=https;branch=master;tag=${PV}"
12 12
13RDEPENDS:${PN} = " \ 13RDEPENDS:${PN} = " \
diff --git a/meta-oe/recipes-devtools/perl/libdbi-perl_1.647.bb b/meta-oe/recipes-devtools/perl/libdbi-perl_1.648.bb
index 00f8181065..603c3b3cd2 100644
--- a/meta-oe/recipes-devtools/perl/libdbi-perl_1.647.bb
+++ b/meta-oe/recipes-devtools/perl/libdbi-perl_1.648.bb
@@ -7,10 +7,10 @@ database interface independent of the actual database being used. \
7HOMEPAGE = "https://metacpan.org/dist/DBI" 7HOMEPAGE = "https://metacpan.org/dist/DBI"
8SECTION = "libs" 8SECTION = "libs"
9LICENSE = "Artistic-1.0 | GPL-1.0-or-later" 9LICENSE = "Artistic-1.0 | GPL-1.0-or-later"
10LIC_FILES_CHKSUM = "file://LICENSE;md5=65f65488c774efe1da488e36ad6c4a36" 10LIC_FILES_CHKSUM = "file://LICENSE;md5=1a1138dff61f77bbc3d8782caba6758d"
11 11
12SRC_URI = "${CPAN_MIRROR}/authors/id/H/HM/HMBRAND/DBI-${PV}.tgz" 12SRC_URI = "${CPAN_MIRROR}/authors/id/H/HM/HMBRAND/DBI-${PV}.tgz"
13SRC_URI[sha256sum] = "0df16af8e5b3225a68b7b592ab531004ddb35a9682b50300ce50174ad867d9aa" 13SRC_URI[sha256sum] = "ef266aad6010ce2eabb7e465ebd73ca3020bc58150f6989bd89c2b8f9bac6a86"
14 14
15S = "${UNPACKDIR}/DBI-${PV}" 15S = "${UNPACKDIR}/DBI-${PV}"
16 16
diff --git a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.20.bb b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.31.bb
index 1464a84d34..b5b52148c4 100644
--- a/meta-oe/recipes-devtools/perl/libio-pty-perl_1.20.bb
+++ b/meta-oe/recipes-devtools/perl/libio-pty-perl_1.31.bb
@@ -5,7 +5,7 @@ LIC_FILES_CHKSUM = "file://META.yml;beginline=11;endline=12;md5=b2562f94907eeb42
5 5
6SRC_URI = "http://www.cpan.org/modules/by-module/IO/IO-Tty-${PV}.tar.gz" 6SRC_URI = "http://www.cpan.org/modules/by-module/IO/IO-Tty-${PV}.tar.gz"
7 7
8SRC_URI[sha256sum] = "b15309fc85623893289cb9b2b88dfa9ed1e69156b75f29938553a45be6d730af" 8SRC_URI[sha256sum] = "d597af221628571cbecf35b44520148c44798dfc8a9867774e60453f79d25ff7"
9 9
10S = "${UNPACKDIR}/IO-Tty-${PV}" 10S = "${UNPACKDIR}/IO-Tty-${PV}"
11 11
diff --git a/meta-oe/recipes-devtools/php/php_8.5.4.bb b/meta-oe/recipes-devtools/php/php_8.5.7.bb
index efa778b6d8..4fd517f789 100644
--- a/meta-oe/recipes-devtools/php/php_8.5.4.bb
+++ b/meta-oe/recipes-devtools/php/php_8.5.7.bb
@@ -2,7 +2,7 @@ SUMMARY = "A server-side, HTML-embedded scripting language"
2HOMEPAGE = "https://www.php.net" 2HOMEPAGE = "https://www.php.net"
3SECTION = "console/network" 3SECTION = "console/network"
4 4
5LICENSE = "PHP-3.0" 5LICENSE = "PHP-3.01"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=fd469cce1a919f0cc95bab7afb28d19d" 6LIC_FILES_CHKSUM = "file://LICENSE;md5=fd469cce1a919f0cc95bab7afb28d19d"
7 7
8BBCLASSEXTEND = "native" 8BBCLASSEXTEND = "native"
@@ -32,7 +32,7 @@ UPSTREAM_CHECK_REGEX = "releases/tag/php-(?P<pver>\d+(\.\d+)+)"
32 32
33S = "${UNPACKDIR}/php-${PV}" 33S = "${UNPACKDIR}/php-${PV}"
34 34
35SRC_URI[sha256sum] = "2ac929a29a6b7ef4b8acec981a417b91bdf7f548f597df665cc56ab9ea95fc75" 35SRC_URI[sha256sum] = "4ef9355f784d4b320151eb3f31c5941c0da297025eedb97f2838b2ce73dd59bf"
36 36
37CVE_STATUS_GROUPS += "CVE_STATUS_PHP" 37CVE_STATUS_GROUPS += "CVE_STATUS_PHP"
38CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored." 38CVE_STATUS_PHP[status] = "fixed-version: The name of this product is exactly the same as github.com/emlog/emlog. CVE can be safely ignored."
diff --git a/meta-oe/recipes-devtools/poke/poke_4.2.bb b/meta-oe/recipes-devtools/poke/poke_4.3.bb
index 0ae392947e..85b3c9b08d 100644
--- a/meta-oe/recipes-devtools/poke/poke_4.2.bb
+++ b/meta-oe/recipes-devtools/poke/poke_4.3.bb
@@ -11,7 +11,7 @@ SRC_URI = "${GNU_MIRROR}/poke/poke-${PV}.tar.gz \
11 11
12DEPENDS = "flex-native bison-native bdwgc readline" 12DEPENDS = "flex-native bison-native bdwgc readline"
13 13
14SRC_URI[sha256sum] = "8aaf36e61e367a53140ea40e2559e9ec512e779c42bee34e7ac24b34ba119bde" 14SRC_URI[sha256sum] = "a84cb9175d50d45a411f2481fd0662b83cb32ce517316b889cfb570819579373"
15 15
16inherit autotools gettext pkgconfig 16inherit autotools gettext pkgconfig
17 17
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c/protobuf-30.patch b/meta-oe/recipes-devtools/protobuf/protobuf-c/protobuf-30.patch
deleted file mode 100644
index 1aae1f17b0..0000000000
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c/protobuf-30.patch
+++ /dev/null
@@ -1,1446 +0,0 @@
1From b28683f8027bf1e886b748b5603eb16d203b5a92 Mon Sep 17 00:00:00 2001
2From: Robert Edmonds <edmonds@users.noreply.github.com>
3Date: Sat, 8 Feb 2025 18:18:33 -0500
4Subject: [PATCH 01/11] protoc-gen-c/c_helpers.h: Move compat defines into new
5 header file compat.h
6
7Upstream-Status: Backport [https://gitlab.archlinux.org/archlinux/packaging/packages/protobuf-c/-/blob/main/protobuf-30.patch]
8Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
9
10---
11 protoc-gen-c/c_field.cc | 1 +
12 protoc-gen-c/c_helpers.cc | 1 +
13 protoc-gen-c/c_helpers.h | 10 -------
14 protoc-gen-c/c_message.cc | 1 +
15 protoc-gen-c/c_primitive_field.cc | 1 +
16 protoc-gen-c/compat.h | 46 +++++++++++++++++++++++++++++++
17 protoc-gen-c/main.cc | 1 +
18 7 files changed, 51 insertions(+), 10 deletions(-)
19 create mode 100644 protoc-gen-c/compat.h
20
21diff --git a/protoc-gen-c/c_field.cc b/protoc-gen-c/c_field.cc
22index 5e79967b..d6d8597e 100644
23--- a/protoc-gen-c/c_field.cc
24+++ b/protoc-gen-c/c_field.cc
25@@ -74,6 +74,7 @@
26 #include "c_message_field.h"
27 #include "c_primitive_field.h"
28 #include "c_string_field.h"
29+#include "compat.h"
30
31 namespace protobuf_c {
32
33diff --git a/protoc-gen-c/c_helpers.cc b/protoc-gen-c/c_helpers.cc
34index 5edcf904..c38843f8 100644
35--- a/protoc-gen-c/c_helpers.cc
36+++ b/protoc-gen-c/c_helpers.cc
37@@ -73,6 +73,7 @@
38 #include <google/protobuf/stubs/common.h>
39
40 #include "c_helpers.h"
41+#include "compat.h"
42
43 namespace protobuf_c {
44
45diff --git a/protoc-gen-c/c_helpers.h b/protoc-gen-c/c_helpers.h
46index 943676e9..e69504bb 100644
47--- a/protoc-gen-c/c_helpers.h
48+++ b/protoc-gen-c/c_helpers.h
49@@ -186,16 +186,6 @@ inline int FieldSyntax(const google::protobuf::FieldDescriptor* field) {
50 return 2;
51 }
52
53-// Work around changes in protobuf >= 22.x without breaking compilation against
54-// older protobuf versions.
55-#if GOOGLE_PROTOBUF_VERSION >= 4022000
56-# define GOOGLE_ARRAYSIZE ABSL_ARRAYSIZE
57-# define GOOGLE_CHECK_EQ ABSL_CHECK_EQ
58-# define GOOGLE_CHECK_EQ ABSL_CHECK_EQ
59-# define GOOGLE_DCHECK_GE ABSL_DCHECK_GE
60-# define GOOGLE_LOG ABSL_LOG
61-#endif
62-
63 } // namespace protobuf_c
64
65 #endif // PROTOBUF_C_PROTOC_GEN_C_C_HELPERS_H__
66diff --git a/protoc-gen-c/c_message.cc b/protoc-gen-c/c_message.cc
67index d4a9a01e..46413873 100644
68--- a/protoc-gen-c/c_message.cc
69+++ b/protoc-gen-c/c_message.cc
70@@ -78,6 +78,7 @@
71 #include "c_extension.h"
72 #include "c_helpers.h"
73 #include "c_message.h"
74+#include "compat.h"
75
76 namespace protobuf_c {
77
78diff --git a/protoc-gen-c/c_primitive_field.cc b/protoc-gen-c/c_primitive_field.cc
79index 253b00bd..588f60e6 100644
80--- a/protoc-gen-c/c_primitive_field.cc
81+++ b/protoc-gen-c/c_primitive_field.cc
82@@ -67,6 +67,7 @@
83
84 #include "c_helpers.h"
85 #include "c_primitive_field.h"
86+#include "compat.h"
87
88 namespace protobuf_c {
89
90diff --git a/protoc-gen-c/compat.h b/protoc-gen-c/compat.h
91new file mode 100644
92index 00000000..2ee78281
93--- /dev/null
94+++ b/protoc-gen-c/compat.h
95@@ -0,0 +1,46 @@
96+// Copyright (c) 2008-2025, Dave Benson and the protobuf-c authors.
97+// All rights reserved.
98+//
99+// Redistribution and use in source and binary forms, with or without
100+// modification, are permitted provided that the following conditions are
101+// met:
102+//
103+// * Redistributions of source code must retain the above copyright
104+// notice, this list of conditions and the following disclaimer.
105+//
106+// * Redistributions in binary form must reproduce the above
107+// copyright notice, this list of conditions and the following disclaimer
108+// in the documentation and/or other materials provided with the
109+// distribution.
110+//
111+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
112+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
113+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
114+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
115+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
116+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
117+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
118+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
119+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
120+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
121+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
122+
123+#ifndef PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
124+#define PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
125+
126+#if GOOGLE_PROTOBUF_VERSION >= 4022000
127+# define GOOGLE_ARRAYSIZE ABSL_ARRAYSIZE
128+# define GOOGLE_CHECK_EQ ABSL_CHECK_EQ
129+# define GOOGLE_DCHECK_GE ABSL_DCHECK_GE
130+# define GOOGLE_LOG ABSL_LOG
131+#endif
132+
133+namespace protobuf_c {
134+
135+namespace compat {
136+
137+} // namespace compat
138+
139+} // namespace protobuf_c
140+
141+#endif // PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
142diff --git a/protoc-gen-c/main.cc b/protoc-gen-c/main.cc
143index 0656c113..5ab929d3 100644
144--- a/protoc-gen-c/main.cc
145+++ b/protoc-gen-c/main.cc
146@@ -32,6 +32,7 @@
147
148 #include "c_generator.h"
149 #include "c_helpers.h"
150+#include "compat.h"
151
152 int main(int argc, char* argv[]) {
153 protobuf_c::CGenerator c_generator;
154
155From 1678f1fba6f2d3e5c1db2817495ddcd72bd4e87b Mon Sep 17 00:00:00 2001
156From: Robert Edmonds <edmonds@users.noreply.github.com>
157Date: Sat, 8 Feb 2025 20:09:03 -0500
158Subject: [PATCH 02/11] protoc-gen-c/compat.h: Add `compat::StringView` type
159
160protobuf >= 30.x replaces `const std::string&` in various APIs with
161its own string view type that may actually be a `absl::string_view`.
162Introduce our own `compat::StringView` type that we can use instead
163of `const std::string&` in order to support compiling across multiple
164protobuf versions.
165---
166 protoc-gen-c/compat.h | 8 ++++++++
167 1 file changed, 8 insertions(+)
168
169diff --git a/protoc-gen-c/compat.h b/protoc-gen-c/compat.h
170index 2ee78281..fe8041b5 100644
171--- a/protoc-gen-c/compat.h
172+++ b/protoc-gen-c/compat.h
173@@ -28,6 +28,8 @@
174 #ifndef PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
175 #define PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
176
177+#include <string>
178+
179 #if GOOGLE_PROTOBUF_VERSION >= 4022000
180 # define GOOGLE_ARRAYSIZE ABSL_ARRAYSIZE
181 # define GOOGLE_CHECK_EQ ABSL_CHECK_EQ
182@@ -39,6 +41,12 @@ namespace protobuf_c {
183
184 namespace compat {
185
186+#if GOOGLE_PROTOBUF_VERSION >= 6030000
187+typedef google::protobuf::internal::DescriptorStringView StringView;
188+#else
189+typedef const std::string& StringView;
190+#endif
191+
192 } // namespace compat
193
194 } // namespace protobuf_c
195
196From db5252c131c82fb48ee599179b6989a577b7fbc8 Mon Sep 17 00:00:00 2001
197From: Robert Edmonds <edmonds@users.noreply.github.com>
198Date: Sat, 8 Feb 2025 20:13:44 -0500
199Subject: [PATCH 03/11] Remove some unused functions
200
201---
202 protoc-gen-c/c_helpers.cc | 64 ---------------------------------------
203 protoc-gen-c/c_helpers.h | 3 --
204 2 files changed, 67 deletions(-)
205
206diff --git a/protoc-gen-c/c_helpers.cc b/protoc-gen-c/c_helpers.cc
207index c38843f8..bbb4a615 100644
208--- a/protoc-gen-c/c_helpers.cc
209+++ b/protoc-gen-c/c_helpers.cc
210@@ -90,14 +90,6 @@ namespace protobuf_c {
211 #pragma warning(disable:4996)
212 #endif
213
214-std::string DotsToUnderscores(const std::string& name) {
215- return StringReplace(name, ".", "_", true);
216-}
217-
218-std::string DotsToColons(const std::string& name) {
219- return StringReplace(name, ".", "::", true);
220-}
221-
222 std::string SimpleFtoa(float f) {
223 char buf[100];
224 snprintf(buf,sizeof(buf),"%.*g", FLT_DIG, f);
225@@ -333,11 +325,6 @@ std::string FilenameIdentifier(const std::string& filename) {
226 return result;
227 }
228
229-// Return the name of the BuildDescriptors() function for a given file.
230-std::string GlobalBuildDescriptorsName(const std::string& filename) {
231- return "proto_BuildDescriptors_" + FilenameIdentifier(filename);
232-}
233-
234 std::string GetLabelName(google::protobuf::FieldDescriptor::Label label) {
235 switch (label) {
236 case google::protobuf::FieldDescriptor::LABEL_OPTIONAL: return "optional";
237@@ -392,57 +379,6 @@ WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, const int *
238 }
239 }
240
241-
242-
243-// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
244-// XXXXXXXXX this stuff is copied from strutils.cc !!!! XXXXXXXXXXXXXXXXXXXXXXXXXXXXx
245-// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXx
246-// ----------------------------------------------------------------------
247-// StringReplace()
248-// Replace the "old" pattern with the "new" pattern in a string,
249-// and append the result to "res". If replace_all is false,
250-// it only replaces the first instance of "old."
251-// ----------------------------------------------------------------------
252-
253-void StringReplace(const std::string& s, const std::string& oldsub,
254- const std::string& newsub, bool replace_all,
255- std::string* res) {
256- if (oldsub.empty()) {
257- res->append(s); // if empty, append the given string.
258- return;
259- }
260-
261- std::string::size_type start_pos = 0;
262- std::string::size_type pos;
263- do {
264- pos = s.find(oldsub, start_pos);
265- if (pos == std::string::npos) {
266- break;
267- }
268- res->append(s, start_pos, pos - start_pos);
269- res->append(newsub);
270- start_pos = pos + oldsub.size(); // start searching again after the "old"
271- } while (replace_all);
272- res->append(s, start_pos, s.length() - start_pos);
273-}
274-
275-
276-// ----------------------------------------------------------------------
277-// StringReplace()
278-// Give me a string and two patterns "old" and "new", and I replace
279-// the first instance of "old" in the string with "new", if it
280-// exists. If "global" is true; call this repeatedly until it
281-// fails. RETURN a new string, regardless of whether the replacement
282-// happened or not.
283-// ----------------------------------------------------------------------
284-
285-std::string StringReplace(const std::string& s, const std::string& oldsub,
286- const std::string& newsub, bool replace_all) {
287- std::string ret;
288- StringReplace(s, oldsub, newsub, replace_all, &ret);
289- return ret;
290-}
291-
292 // ----------------------------------------------------------------------
293 // SplitStringUsing()
294 // Split a string using a character delimiter. Append the components
295diff --git a/protoc-gen-c/c_helpers.h b/protoc-gen-c/c_helpers.h
296index e69504bb..377d4272 100644
297--- a/protoc-gen-c/c_helpers.h
298+++ b/protoc-gen-c/c_helpers.h
299@@ -150,9 +150,6 @@ const char* DeclaredTypeMethodName(google::protobuf::FieldDescriptor::Type type)
300 // Convert a file name into a valid identifier.
301 std::string FilenameIdentifier(const std::string& filename);
302
303-// Return the name of the BuildDescriptors() function for a given file.
304-std::string GlobalBuildDescriptorsName(const std::string& filename);
305-
306 // return 'required', 'optional', or 'repeated'
307 std::string GetLabelName(google::protobuf::FieldDescriptor::Label label);
308
309
310From bc2cb66d908f016dd3f7082c8a6ad7c58bc03412 Mon Sep 17 00:00:00 2001
311From: Robert Edmonds <edmonds@users.noreply.github.com>
312Date: Sat, 8 Feb 2025 20:18:05 -0500
313Subject: [PATCH 04/11] Use `compat::StringView` type across various function
314 signatures
315
316---
317 protoc-gen-c/c_helpers.cc | 44 +++++++++++++++++++++------------------
318 protoc-gen-c/c_helpers.h | 36 ++++++++++++++++----------------
319 2 files changed, 42 insertions(+), 38 deletions(-)
320
321diff --git a/protoc-gen-c/c_helpers.cc b/protoc-gen-c/c_helpers.cc
322index bbb4a615..c759c8c2 100644
323--- a/protoc-gen-c/c_helpers.cc
324+++ b/protoc-gen-c/c_helpers.cc
325@@ -96,6 +96,7 @@ std::string SimpleFtoa(float f) {
326 buf[sizeof(buf)-1] = 0; /* should NOT be necessary */
327 return buf;
328 }
329+
330 std::string SimpleDtoa(double d) {
331 char buf[100];
332 snprintf(buf,sizeof(buf),"%.*g", DBL_DIG, d);
333@@ -103,7 +104,7 @@ std::string SimpleDtoa(double d) {
334 return buf;
335 }
336
337-std::string CamelToUpper(const std::string &name) {
338+std::string CamelToUpper(compat::StringView name) {
339 bool was_upper = true; // suppress initial _
340 std::string rv = "";
341 int len = name.length();
342@@ -120,7 +121,8 @@ std::string CamelToUpper(const std::string &name) {
343 }
344 return rv;
345 }
346-std::string CamelToLower(const std::string &name) {
347+
348+std::string CamelToLower(compat::StringView name) {
349 bool was_upper = true; // suppress initial _
350 std::string rv = "";
351 int len = name.length();
352@@ -138,8 +140,7 @@ std::string CamelToLower(const std::string &name) {
353 return rv;
354 }
355
356-
357-std::string ToUpper(const std::string &name) {
358+std::string ToUpper(compat::StringView name) {
359 std::string rv = "";
360 int len = name.length();
361 for (int i = 0; i < len; i++) {
362@@ -147,7 +148,8 @@ std::string ToUpper(const std::string &name) {
363 }
364 return rv;
365 }
366-std::string ToLower(const std::string &name) {
367+
368+std::string ToLower(compat::StringView name) {
369 std::string rv = "";
370 int len = name.length();
371 for (int i = 0; i < len; i++) {
372@@ -155,7 +157,8 @@ std::string ToLower(const std::string &name) {
373 }
374 return rv;
375 }
376-std::string ToCamel(const std::string &name) {
377+
378+std::string ToCamel(compat::StringView name) {
379 std::string rv = "";
380 int len = name.length();
381 bool next_is_upper = true;
382@@ -172,7 +175,7 @@ std::string ToCamel(const std::string &name) {
383 return rv;
384 }
385
386-std::string OverrideFullName(const std::string &full_name, const google::protobuf::FileDescriptor* file) {
387+std::string OverrideFullName(compat::StringView full_name, const google::protobuf::FileDescriptor* file) {
388 const ProtobufCFileOptions opt = file->options().GetExtension(pb_c_file);
389 if (!opt.has_c_package())
390 return full_name;
391@@ -184,7 +187,7 @@ std::string OverrideFullName(const std::string &full_name, const google::protobu
392 return new_name + full_name.substr(file->package().length());
393 }
394
395-std::string FullNameToLower(const std::string &full_name, const google::protobuf::FileDescriptor* file) {
396+std::string FullNameToLower(compat::StringView full_name, const google::protobuf::FileDescriptor* file) {
397 std::vector<std::string> pieces;
398 SplitStringUsing(OverrideFullName(full_name, file), ".", &pieces);
399 std::string rv = "";
400@@ -195,7 +198,8 @@ std::string FullNameToLower(const std::string &full_name, const google::protobuf
401 }
402 return rv;
403 }
404-std::string FullNameToUpper(const std::string &full_name, const google::protobuf::FileDescriptor* file) {
405+
406+std::string FullNameToUpper(compat::StringView full_name, const google::protobuf::FileDescriptor* file) {
407 std::vector<std::string> pieces;
408 SplitStringUsing(OverrideFullName(full_name, file), ".", &pieces);
409 std::string rv = "";
410@@ -206,7 +210,8 @@ std::string FullNameToUpper(const std::string &full_name, const google::protobuf
411 }
412 return rv;
413 }
414-std::string FullNameToC(const std::string &full_name, const google::protobuf::FileDescriptor* file) {
415+
416+std::string FullNameToC(compat::StringView full_name, const google::protobuf::FileDescriptor* file) {
417 std::vector<std::string> pieces;
418 SplitStringUsing(OverrideFullName(full_name, file), ".", &pieces);
419 std::string rv = "";
420@@ -248,7 +253,7 @@ void PrintComment(google::protobuf::io::Printer* printer, std::string comment)
421 }
422 }
423
424-std::string ConvertToSpaces(const std::string &input) {
425+std::string ConvertToSpaces(compat::StringView input) {
426 return std::string(input.size(), ' ');
427 }
428
429@@ -259,8 +264,7 @@ int compare_name_indices_by_name(const void *a, const void *b)
430 return strcmp (ni_a->name, ni_b->name);
431 }
432
433-
434-std::string CEscape(const std::string& src);
435+std::string CEscape(compat::StringView src);
436
437 const char* const kKeywordList[] = {
438 "and", "and_eq", "asm", "auto", "bitand", "bitor", "bool", "break", "case",
439@@ -300,7 +304,7 @@ std::string FieldDeprecated(const google::protobuf::FieldDescriptor* field) {
440 return "";
441 }
442
443-std::string StripProto(const std::string& filename) {
444+std::string StripProto(compat::StringView filename) {
445 if (HasSuffixString(filename, ".protodevel")) {
446 return StripSuffixString(filename, ".protodevel");
447 } else {
448@@ -309,7 +313,7 @@ std::string StripProto(const std::string& filename) {
449 }
450
451 // Convert a file name into a valid identifier.
452-std::string FilenameIdentifier(const std::string& filename) {
453+std::string FilenameIdentifier(compat::StringView filename) {
454 std::string result;
455 for (unsigned i = 0; i < filename.size(); i++) {
456 if (isalnum(filename[i])) {
457@@ -335,7 +339,7 @@ std::string GetLabelName(google::protobuf::FieldDescriptor::Label label) {
458 }
459
460 unsigned
461-WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, const int *values, const std::string &name)
462+WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, const int *values, compat::StringView name)
463 {
464 std::map<std::string, std::string> vars;
465 vars["name"] = name;
466@@ -389,7 +393,7 @@ WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, const int *
467 // ----------------------------------------------------------------------
468 template <typename ITR>
469 static inline
470-void SplitStringToIteratorUsing(const std::string& full,
471+void SplitStringToIteratorUsing(compat::StringView full,
472 const char* delim,
473 ITR& result) {
474 // Optimize the common case where delim is a single character.
475@@ -422,7 +426,7 @@ void SplitStringToIteratorUsing(const std::string& full,
476 }
477 }
478
479-void SplitStringUsing(const std::string& full,
480+void SplitStringUsing(compat::StringView full,
481 const char* delim,
482 std::vector<std::string>* result) {
483 std::back_insert_iterator< std::vector<std::string> > it(*result);
484@@ -435,7 +439,6 @@ char* FastHexToBuffer(int i, char* buffer)
485 return buffer;
486 }
487
488-
489 static int CEscapeInternal(const char* src, int src_len, char* dest,
490 int dest_len, bool use_hex) {
491 const char* src_end = src + src_len;
492@@ -478,7 +481,8 @@ static int CEscapeInternal(const char* src, int src_len, char* dest,
493 dest[used] = '\0'; // doesn't count towards return value though
494 return used;
495 }
496-std::string CEscape(const std::string& src) {
497+
498+std::string CEscape(compat::StringView src) {
499 const int dest_length = src.size() * 4 + 1; // Maximum possible expansion
500 std::unique_ptr<char[]> dest(new char[dest_length]);
501 const int len = CEscapeInternal(src.data(), src.size(),
502diff --git a/protoc-gen-c/c_helpers.h b/protoc-gen-c/c_helpers.h
503index 377d4272..ccd39ca2 100644
504--- a/protoc-gen-c/c_helpers.h
505+++ b/protoc-gen-c/c_helpers.h
506@@ -73,6 +73,8 @@
507
508 #include <protobuf-c/protobuf-c.pb.h>
509
510+#include "compat.h"
511+
512 namespace protobuf_c {
513
514 // --- Borrowed from stubs. ---
515@@ -84,11 +86,10 @@ template <typename T> std::string SimpleItoa(T n) {
516
517 std::string SimpleFtoa(float f);
518 std::string SimpleDtoa(double f);
519-void SplitStringUsing(const std::string &str, const char *delim, std::vector<std::string> *out);
520-std::string CEscape(const std::string& src);
521-std::string StringReplace(const std::string& s, const std::string& oldsub, const std::string& newsub, bool replace_all);
522-inline bool HasSuffixString(const std::string& str, const std::string& suffix) { return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; }
523-inline std::string StripSuffixString(const std::string& str, const std::string& suffix) { if (HasSuffixString(str, suffix)) { return str.substr(0, str.size() - suffix.size()); } else { return str; } }
524+void SplitStringUsing(compat::StringView str, const char *delim, std::vector<std::string> *out);
525+std::string CEscape(compat::StringView src);
526+inline bool HasSuffixString(compat::StringView str, compat::StringView suffix) { return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; }
527+inline std::string StripSuffixString(compat::StringView str, compat::StringView suffix) { if (HasSuffixString(str, suffix)) { return str.substr(0, str.size() - suffix.size()); } else { return str; } }
528 char* FastHexToBuffer(int i, char* buffer);
529
530
531@@ -110,31 +111,31 @@ inline const google::protobuf::Descriptor* FieldScope(const google::protobuf::Fi
532
533 // convert a CamelCase class name into an all uppercase affair
534 // with underscores separating words, e.g. MyClass becomes MY_CLASS.
535-std::string CamelToUpper(const std::string &class_name);
536-std::string CamelToLower(const std::string &class_name);
537+std::string CamelToUpper(compat::StringView class_name);
538+std::string CamelToLower(compat::StringView class_name);
539
540 // lowercased, underscored name to camel case
541-std::string ToCamel(const std::string &name);
542+std::string ToCamel(compat::StringView name);
543
544 // lowercase the string
545-std::string ToLower(const std::string &class_name);
546-std::string ToUpper(const std::string &class_name);
547+std::string ToLower(compat::StringView class_name);
548+std::string ToUpper(compat::StringView class_name);
549
550 // full_name() to lowercase with underscores
551-std::string FullNameToLower(const std::string &full_name, const google::protobuf::FileDescriptor *file);
552-std::string FullNameToUpper(const std::string &full_name, const google::protobuf::FileDescriptor *file);
553+std::string FullNameToLower(compat::StringView full_name, const google::protobuf::FileDescriptor *file);
554+std::string FullNameToUpper(compat::StringView full_name, const google::protobuf::FileDescriptor *file);
555
556 // full_name() to c-typename (with underscores for packages, otherwise camel case)
557-std::string FullNameToC(const std::string &class_name, const google::protobuf::FileDescriptor *file);
558+std::string FullNameToC(compat::StringView class_name, const google::protobuf::FileDescriptor *file);
559
560 // Splits, indents, formats, and prints comment lines
561 void PrintComment(google::protobuf::io::Printer* printer, std::string comment);
562
563 // make a string of spaces as long as input
564-std::string ConvertToSpaces(const std::string &input);
565+std::string ConvertToSpaces(compat::StringView input);
566
567 // Strips ".proto" or ".protodevel" from the end of a filename.
568-std::string StripProto(const std::string& filename);
569+std::string StripProto(compat::StringView filename);
570
571 // Get the C++ type name for a primitive type (e.g. "double", "::google::protobuf::int32", etc.).
572 // Note: non-built-in type names will be qualified, meaning they will start
573@@ -148,15 +149,14 @@ const char* PrimitiveTypeName(google::protobuf::FieldDescriptor::CppType type);
574 const char* DeclaredTypeMethodName(google::protobuf::FieldDescriptor::Type type);
575
576 // Convert a file name into a valid identifier.
577-std::string FilenameIdentifier(const std::string& filename);
578+std::string FilenameIdentifier(compat::StringView filename);
579
580 // return 'required', 'optional', or 'repeated'
581 std::string GetLabelName(google::protobuf::FieldDescriptor::Label label);
582
583-
584 // write IntRanges entries for a bunch of sorted values.
585 // returns the number of ranges there are to bsearch.
586-unsigned WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, const int *values, const std::string &name);
587+unsigned WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, const int *values, compat::StringView name);
588
589 struct NameIndex
590 {
591
592From 75f1c32cc429233a3726358c999009f9ea373b45 Mon Sep 17 00:00:00 2001
593From: Robert Edmonds <edmonds@users.noreply.github.com>
594Date: Sat, 8 Feb 2025 20:25:43 -0500
595Subject: [PATCH 05/11] Convert string views to owned strings where necessary
596
597---
598 protoc-gen-c/c_enum.cc | 2 +-
599 protoc-gen-c/c_enum_field.cc | 2 +-
600 protoc-gen-c/c_helpers.cc | 8 ++++----
601 protoc-gen-c/c_helpers.h | 3 +--
602 4 files changed, 7 insertions(+), 8 deletions(-)
603
604diff --git a/protoc-gen-c/c_enum.cc b/protoc-gen-c/c_enum.cc
605index 9212ab82..311e4c86 100644
606--- a/protoc-gen-c/c_enum.cc
607+++ b/protoc-gen-c/c_enum.cc
608@@ -152,7 +152,7 @@ void EnumGenerator::GenerateValueInitializer(google::protobuf::io::Printer *prin
609 descriptor_->file()->options().optimize_for() ==
610 google::protobuf::FileOptions_OptimizeMode_CODE_SIZE;
611 vars["enum_value_name"] = vd->name();
612- vars["c_enum_value_name"] = FullNameToUpper(descriptor_->full_name(), descriptor_->file()) + "__" + vd->name();
613+ vars["c_enum_value_name"] = FullNameToUpper(descriptor_->full_name(), descriptor_->file()) + "__" + std::string(vd->name());
614 vars["value"] = SimpleItoa(vd->number());
615 if (optimize_code_size)
616 printer->Print(vars, " { NULL, NULL, $value$ }, /* CODE_SIZE */\n");
617diff --git a/protoc-gen-c/c_enum_field.cc b/protoc-gen-c/c_enum_field.cc
618index 0926ae59..c3111f50 100644
619--- a/protoc-gen-c/c_enum_field.cc
620+++ b/protoc-gen-c/c_enum_field.cc
621@@ -78,7 +78,7 @@ void SetEnumVariables(const google::protobuf::FieldDescriptor* descriptor,
622 (*variables)["type"] = FullNameToC(descriptor->enum_type()->full_name(), descriptor->enum_type()->file());
623 const google::protobuf::EnumValueDescriptor* default_value = descriptor->default_value_enum();
624 (*variables)["default"] = FullNameToUpper(default_value->type()->full_name(), default_value->type()->file())
625- + "__" + default_value->name();
626+ + "__" + std::string(default_value->name());
627 (*variables)["deprecated"] = FieldDeprecated(descriptor);
628 }
629
630diff --git a/protoc-gen-c/c_helpers.cc b/protoc-gen-c/c_helpers.cc
631index c759c8c2..1aecef93 100644
632--- a/protoc-gen-c/c_helpers.cc
633+++ b/protoc-gen-c/c_helpers.cc
634@@ -178,13 +178,13 @@ std::string ToCamel(compat::StringView name) {
635 std::string OverrideFullName(compat::StringView full_name, const google::protobuf::FileDescriptor* file) {
636 const ProtobufCFileOptions opt = file->options().GetExtension(pb_c_file);
637 if (!opt.has_c_package())
638- return full_name;
639+ return std::string(full_name);
640
641 std::string new_name = opt.c_package();
642 if (file->package().empty())
643 new_name += ".";
644
645- return new_name + full_name.substr(file->package().length());
646+ return new_name + std::string(full_name.substr(file->package().length()));
647 }
648
649 std::string FullNameToLower(compat::StringView full_name, const google::protobuf::FileDescriptor* file) {
650@@ -418,10 +418,10 @@ void SplitStringToIteratorUsing(compat::StringView full,
651 while (begin_index != std::string::npos) {
652 end_index = full.find_first_of(delim, begin_index);
653 if (end_index == std::string::npos) {
654- *result++ = full.substr(begin_index);
655+ *result++ = std::string(full.substr(begin_index));
656 return;
657 }
658- *result++ = full.substr(begin_index, (end_index - begin_index));
659+ *result++ = std::string(full.substr(begin_index, (end_index - begin_index)));
660 begin_index = full.find_first_not_of(delim, end_index);
661 }
662 }
663diff --git a/protoc-gen-c/c_helpers.h b/protoc-gen-c/c_helpers.h
664index ccd39ca2..985e4db6 100644
665--- a/protoc-gen-c/c_helpers.h
666+++ b/protoc-gen-c/c_helpers.h
667@@ -89,10 +89,9 @@ std::string SimpleDtoa(double f);
668 void SplitStringUsing(compat::StringView str, const char *delim, std::vector<std::string> *out);
669 std::string CEscape(compat::StringView src);
670 inline bool HasSuffixString(compat::StringView str, compat::StringView suffix) { return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; }
671-inline std::string StripSuffixString(compat::StringView str, compat::StringView suffix) { if (HasSuffixString(str, suffix)) { return str.substr(0, str.size() - suffix.size()); } else { return str; } }
672+inline std::string StripSuffixString(compat::StringView str, compat::StringView suffix) { if (HasSuffixString(str, suffix)) { return std::string(str.substr(0, str.size() - suffix.size())); } else { return std::string(str); } }
673 char* FastHexToBuffer(int i, char* buffer);
674
675-
676 // Get the (unqualified) name that should be used for this field in C code.
677 // The name is coerced to lower-case to emulate proto1 behavior. People
678 // should be using lowercase-with-underscores style for proto field names
679
680From 0edca93db369fb84f01cc0d4e3ee4cd6c2ad7f4f Mon Sep 17 00:00:00 2001
681From: Robert Edmonds <edmonds@users.noreply.github.com>
682Date: Sat, 8 Feb 2025 20:39:11 -0500
683Subject: [PATCH 06/11] Convert various uses of `const char *` to
684 `compat::StringView`
685
686Also replace some uses of arrays manually allocated with new/delete with
687uses of `std::vector`.
688---
689 protoc-gen-c/c_enum.cc | 35 ++++++++++++++++++-----------------
690 protoc-gen-c/c_helpers.cc | 2 +-
691 protoc-gen-c/c_helpers.h | 2 +-
692 protoc-gen-c/c_message.cc | 28 ++++++++++++----------------
693 protoc-gen-c/c_service.cc | 19 +++++++++----------
694 5 files changed, 41 insertions(+), 45 deletions(-)
695
696diff --git a/protoc-gen-c/c_enum.cc b/protoc-gen-c/c_enum.cc
697index 311e4c86..c7839edd 100644
698--- a/protoc-gen-c/c_enum.cc
699+++ b/protoc-gen-c/c_enum.cc
700@@ -142,7 +142,7 @@ struct ValueIndex
701 int value;
702 unsigned index;
703 unsigned final_index; /* index in uniqified array of values */
704- const char *name;
705+ compat::StringView name;
706 };
707 void EnumGenerator::GenerateValueInitializer(google::protobuf::io::Printer *printer, int index)
708 {
709@@ -176,7 +176,7 @@ static int compare_value_indices_by_name(const void *a, const void *b)
710 {
711 const ValueIndex *vi_a = (const ValueIndex *) a;
712 const ValueIndex *vi_b = (const ValueIndex *) b;
713- return strcmp (vi_a->name, vi_b->name);
714+ return vi_a->name.compare(vi_b->name);
715 }
716
717 void EnumGenerator::GenerateEnumDescriptor(google::protobuf::io::Printer* printer) {
718@@ -194,18 +194,20 @@ void EnumGenerator::GenerateEnumDescriptor(google::protobuf::io::Printer* printe
719
720 // Sort by name and value, dropping duplicate values if they appear later.
721 // TODO: use a c++ paradigm for this!
722- NameIndex *name_index = new NameIndex[descriptor_->value_count()];
723- ValueIndex *value_index = new ValueIndex[descriptor_->value_count()];
724- for (int j = 0; j < descriptor_->value_count(); j++) {
725+ std::vector<ValueIndex> value_index;
726+ for (unsigned j = 0; j < descriptor_->value_count(); j++) {
727 const google::protobuf::EnumValueDescriptor *vd = descriptor_->value(j);
728- name_index[j].index = j;
729- name_index[j].name = vd->name().c_str();
730- value_index[j].index = j;
731- value_index[j].value = vd->number();
732- value_index[j].name = vd->name().c_str();
733+ value_index.push_back({
734+ .value = vd->number(),
735+ .index = j,
736+ .final_index = 0,
737+ .name = vd->name(),
738+ });
739 }
740- qsort(value_index, descriptor_->value_count(),
741- sizeof(ValueIndex), compare_value_indices_by_value_then_index);
742+ qsort(&value_index[0],
743+ value_index.size(),
744+ sizeof(ValueIndex),
745+ compare_value_indices_by_value_then_index);
746
747 // only record unique values
748 int n_unique_values;
749@@ -275,8 +277,10 @@ void EnumGenerator::GenerateEnumDescriptor(google::protobuf::io::Printer* printe
750 vars["n_ranges"] = SimpleItoa(n_ranges);
751
752 if (!optimize_code_size) {
753- qsort(value_index, descriptor_->value_count(),
754- sizeof(ValueIndex), compare_value_indices_by_name);
755+ qsort(&value_index[0],
756+ value_index.size(),
757+ sizeof(ValueIndex),
758+ compare_value_indices_by_name);
759 printer->Print(vars,
760 "static const ProtobufCEnumValueIndex $lcclassname$__enum_values_by_name[$value_count$] =\n"
761 "{\n");
762@@ -319,9 +323,6 @@ void EnumGenerator::GenerateEnumDescriptor(google::protobuf::io::Printer* printe
763 " NULL,NULL,NULL,NULL /* reserved[1234] */\n"
764 "};\n");
765 }
766-
767- delete[] value_index;
768- delete[] name_index;
769 }
770
771 } // namespace protobuf_c
772diff --git a/protoc-gen-c/c_helpers.cc b/protoc-gen-c/c_helpers.cc
773index 1aecef93..dec9ce28 100644
774--- a/protoc-gen-c/c_helpers.cc
775+++ b/protoc-gen-c/c_helpers.cc
776@@ -261,7 +261,7 @@ int compare_name_indices_by_name(const void *a, const void *b)
777 {
778 const NameIndex *ni_a = (const NameIndex *) a;
779 const NameIndex *ni_b = (const NameIndex *) b;
780- return strcmp (ni_a->name, ni_b->name);
781+ return ni_a->name.compare(ni_b->name);
782 }
783
784 std::string CEscape(compat::StringView src);
785diff --git a/protoc-gen-c/c_helpers.h b/protoc-gen-c/c_helpers.h
786index 985e4db6..69369997 100644
787--- a/protoc-gen-c/c_helpers.h
788+++ b/protoc-gen-c/c_helpers.h
789@@ -160,7 +160,7 @@ unsigned WriteIntRanges(google::protobuf::io::Printer* printer, int n_values, co
790 struct NameIndex
791 {
792 unsigned index;
793- const char *name;
794+ compat::StringView name;
795 };
796 int compare_name_indices_by_name(const void*, const void*);
797
798diff --git a/protoc-gen-c/c_message.cc b/protoc-gen-c/c_message.cc
799index 46413873..7252923c 100644
800--- a/protoc-gen-c/c_message.cc
801+++ b/protoc-gen-c/c_message.cc
802@@ -567,27 +567,26 @@ GenerateMessageDescriptor(google::protobuf::io::Printer* printer, bool gen_init)
803 "static const ProtobufCFieldDescriptor $lcclassname$__field_descriptors[$n_fields$] =\n"
804 "{\n");
805 printer->Indent();
806- const google::protobuf::FieldDescriptor **sorted_fields = new const google::protobuf::FieldDescriptor *[descriptor_->field_count()];
807+
808+ std::vector<const google::protobuf::FieldDescriptor*> sorted_fields;
809 for (int i = 0; i < descriptor_->field_count(); i++) {
810- sorted_fields[i] = descriptor_->field(i);
811+ sorted_fields.push_back(descriptor_->field(i));
812 }
813- qsort (sorted_fields, descriptor_->field_count(),
814+ qsort(&sorted_fields[0], sorted_fields.size(),
815 sizeof(const google::protobuf::FieldDescriptor*),
816 compare_pfields_by_number);
817- for (int i = 0; i < descriptor_->field_count(); i++) {
818- const google::protobuf::FieldDescriptor* field = sorted_fields[i];
819+ for (auto field : sorted_fields) {
820 field_generators_.get(field).GenerateDescriptorInitializer(printer);
821 }
822 printer->Outdent();
823 printer->Print(vars, "};\n");
824
825 if (!optimize_code_size) {
826- NameIndex *field_indices = new NameIndex [descriptor_->field_count()];
827- for (int i = 0; i < descriptor_->field_count(); i++) {
828- field_indices[i].name = sorted_fields[i]->name().c_str();
829- field_indices[i].index = i;
830+ std::vector<NameIndex> field_indices;
831+ for (unsigned i = 0; i < descriptor_->field_count(); i++) {
832+ field_indices.push_back({ .index = i, .name = sorted_fields[i]->name() });
833 }
834- qsort (field_indices, descriptor_->field_count(), sizeof (NameIndex),
835+ qsort(&field_indices[0], field_indices.size(), sizeof(NameIndex),
836 compare_name_indices_by_name);
837 printer->Print(vars, "static const unsigned $lcclassname$__field_indices_by_name[] = {\n");
838 for (int i = 0; i < descriptor_->field_count(); i++) {
839@@ -596,19 +595,16 @@ GenerateMessageDescriptor(google::protobuf::io::Printer* printer, bool gen_init)
840 printer->Print(vars, " $index$, /* field[$index$] = $name$ */\n");
841 }
842 printer->Print("};\n");
843- delete[] field_indices;
844 }
845
846 // create range initializers
847- int *values = new int[descriptor_->field_count()];
848+ std::vector<int> values;
849 for (int i = 0; i < descriptor_->field_count(); i++) {
850- values[i] = sorted_fields[i]->number();
851+ values.push_back(sorted_fields[i]->number());
852 }
853 int n_ranges = WriteIntRanges(printer,
854- descriptor_->field_count(), values,
855+ descriptor_->field_count(), &values[0],
856 vars["lcclassname"] + "__number_ranges");
857- delete [] values;
858- delete [] sorted_fields;
859
860 vars["n_ranges"] = SimpleItoa(n_ranges);
861 } else {
862diff --git a/protoc-gen-c/c_service.cc b/protoc-gen-c/c_service.cc
863index ee4d4a95..2c3ddcf3 100644
864--- a/protoc-gen-c/c_service.cc
865+++ b/protoc-gen-c/c_service.cc
866@@ -184,19 +184,19 @@ void ServiceGenerator::GenerateInit(google::protobuf::io::Printer* printer)
867 "}\n");
868 }
869
870-struct MethodIndexAndName { unsigned i; const char *name; };
871+struct MethodIndexAndName { unsigned i; compat::StringView name; };
872 static int
873 compare_method_index_and_name_by_name (const void *a, const void *b)
874 {
875 const MethodIndexAndName *ma = (const MethodIndexAndName *) a;
876 const MethodIndexAndName *mb = (const MethodIndexAndName *) b;
877- return strcmp (ma->name, mb->name);
878+ return ma->name.compare(mb->name);
879 }
880
881 void ServiceGenerator::GenerateServiceDescriptor(google::protobuf::io::Printer* printer)
882 {
883 int n_methods = descriptor_->method_count();
884- MethodIndexAndName *mi_array = new MethodIndexAndName[n_methods];
885+ std::vector<MethodIndexAndName> mi_array;
886
887 bool optimize_code_size = descriptor_->file()->options().has_optimize_for() &&
888 descriptor_->file()->options().optimize_for() ==
889@@ -205,7 +205,7 @@ void ServiceGenerator::GenerateServiceDescriptor(google::protobuf::io::Printer*
890 vars_["n_methods"] = SimpleItoa(n_methods);
891 printer->Print(vars_, "static const ProtobufCMethodDescriptor $lcfullname$__method_descriptors[$n_methods$] =\n"
892 "{\n");
893- for (int i = 0; i < n_methods; i++) {
894+ for (unsigned i = 0; i < n_methods; i++) {
895 const google::protobuf::MethodDescriptor* method = descriptor_->method(i);
896 vars_["method"] = method->name();
897 vars_["input_descriptor"] = "&" + FullNameToLower(method->input_type()->full_name(), method->input_type()->file()) + "__descriptor";
898@@ -217,14 +217,15 @@ void ServiceGenerator::GenerateServiceDescriptor(google::protobuf::io::Printer*
899 printer->Print(vars_,
900 " { \"$method$\", $input_descriptor$, $output_descriptor$ },\n");
901 }
902- mi_array[i].i = i;
903- mi_array[i].name = method->name().c_str();
904+ mi_array.push_back({i, method->name()});
905 }
906 printer->Print(vars_, "};\n");
907
908 if (!optimize_code_size) {
909- qsort ((void*)mi_array, n_methods, sizeof (MethodIndexAndName),
910- compare_method_index_and_name_by_name);
911+ qsort(&mi_array[0],
912+ mi_array.size(),
913+ sizeof(MethodIndexAndName),
914+ compare_method_index_and_name_by_name);
915 printer->Print(vars_, "const unsigned $lcfullname$__method_indices_by_name[] = {\n");
916 for (int i = 0; i < n_methods; i++) {
917 vars_["i"] = SimpleItoa(mi_array[i].i);
918@@ -258,8 +259,6 @@ void ServiceGenerator::GenerateServiceDescriptor(google::protobuf::io::Printer*
919 " $lcfullname$__method_indices_by_name\n"
920 "};\n");
921 }
922-
923- delete[] mi_array;
924 }
925
926 void ServiceGenerator::GenerateCallersImplementations(google::protobuf::io::Printer* printer)
927
928From ebeddac1a746393a16d9ba4cf80e3d12c3ab7d7f Mon Sep 17 00:00:00 2001
929From: Robert Edmonds <edmonds@users.noreply.github.com>
930Date: Sat, 8 Feb 2025 20:56:48 -0500
931Subject: [PATCH 07/11] Fix indentation of
932 MessageGenerator::GenerateMessageDescriptor()
933
934---
935 protoc-gen-c/c_message.cc | 321 +++++++++++++++++++-------------------
936 1 file changed, 159 insertions(+), 162 deletions(-)
937
938diff --git a/protoc-gen-c/c_message.cc b/protoc-gen-c/c_message.cc
939index 7252923c..2a3b2a2f 100644
940--- a/protoc-gen-c/c_message.cc
941+++ b/protoc-gen-c/c_message.cc
942@@ -461,199 +461,196 @@ GenerateHelperFunctionDefinitions(google::protobuf::io::Printer* printer,
943
944 void MessageGenerator::
945 GenerateMessageDescriptor(google::protobuf::io::Printer* printer, bool gen_init) {
946- std::map<std::string, std::string> vars;
947- vars["fullname"] = descriptor_->full_name();
948- vars["classname"] = FullNameToC(descriptor_->full_name(), descriptor_->file());
949- vars["lcclassname"] = FullNameToLower(descriptor_->full_name(), descriptor_->file());
950- vars["shortname"] = ToCamel(descriptor_->name());
951- vars["n_fields"] = SimpleItoa(descriptor_->field_count());
952- vars["packagename"] = descriptor_->file()->package();
953-
954- bool optimize_code_size = descriptor_->file()->options().has_optimize_for() &&
955- descriptor_->file()->options().optimize_for() ==
956- google::protobuf::FileOptions_OptimizeMode_CODE_SIZE;
957-
958- const ProtobufCMessageOptions opt =
959- descriptor_->options().GetExtension(pb_c_msg);
960- // Override parent settings, if needed
961- if (opt.has_gen_init_helpers())
962- gen_init = opt.gen_init_helpers();
963-
964- for (int i = 0; i < descriptor_->nested_type_count(); i++) {
965- nested_generators_[i]->GenerateMessageDescriptor(printer, gen_init);
966- }
967+ std::map<std::string, std::string> vars;
968+ vars["fullname"] = descriptor_->full_name();
969+ vars["classname"] = FullNameToC(descriptor_->full_name(), descriptor_->file());
970+ vars["lcclassname"] = FullNameToLower(descriptor_->full_name(), descriptor_->file());
971+ vars["shortname"] = ToCamel(descriptor_->name());
972+ vars["n_fields"] = SimpleItoa(descriptor_->field_count());
973+ vars["packagename"] = descriptor_->file()->package();
974
975- for (int i = 0; i < descriptor_->enum_type_count(); i++) {
976- enum_generators_[i]->GenerateEnumDescriptor(printer);
977- }
978+ bool optimize_code_size = descriptor_->file()->options().has_optimize_for() &&
979+ descriptor_->file()->options().optimize_for() ==
980+ google::protobuf::FileOptions_OptimizeMode_CODE_SIZE;
981
982- for (int i = 0; i < descriptor_->field_count(); i++) {
983- const google::protobuf::FieldDescriptor* fd = descriptor_->field(i);
984- if (fd->has_default_value()) {
985- field_generators_.get(fd).GenerateDefaultValueImplementations(printer);
986- }
987- }
988+ const ProtobufCMessageOptions opt = descriptor_->options().GetExtension(pb_c_msg);
989+ // Override parent settings, if needed
990+ if (opt.has_gen_init_helpers()) {
991+ gen_init = opt.gen_init_helpers();
992+ }
993
994- for (int i = 0; i < descriptor_->field_count(); i++) {
995- const google::protobuf::FieldDescriptor* fd = descriptor_->field(i);
996- const ProtobufCFieldOptions opt = fd->options().GetExtension(pb_c_field);
997- if (fd->has_default_value()) {
998-
999- bool already_defined = false;
1000- vars["name"] = fd->name();
1001- vars["lcname"] = CamelToLower(fd->name());
1002- vars["maybe_static"] = "static ";
1003- vars["field_dv_ctype_suffix"] = "";
1004- vars["default_value"] = field_generators_.get(fd).GetDefaultValue();
1005- switch (fd->cpp_type()) {
1006- case google::protobuf::FieldDescriptor::CPPTYPE_INT32:
1007- vars["field_dv_ctype"] = "int32_t";
1008- break;
1009- case google::protobuf::FieldDescriptor::CPPTYPE_INT64:
1010- vars["field_dv_ctype"] = "int64_t";
1011- break;
1012- case google::protobuf::FieldDescriptor::CPPTYPE_UINT32:
1013- vars["field_dv_ctype"] = "uint32_t";
1014- break;
1015- case google::protobuf::FieldDescriptor::CPPTYPE_UINT64:
1016- vars["field_dv_ctype"] = "uint64_t";
1017- break;
1018- case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT:
1019- vars["field_dv_ctype"] = "float";
1020- break;
1021- case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE:
1022- vars["field_dv_ctype"] = "double";
1023- break;
1024- case google::protobuf::FieldDescriptor::CPPTYPE_BOOL:
1025- vars["field_dv_ctype"] = "protobuf_c_boolean";
1026- break;
1027-
1028- case google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE:
1029- // NOTE: not supported by protobuf
1030- vars["maybe_static"] = "";
1031- vars["field_dv_ctype"] = "{ ... }";
1032- GOOGLE_LOG(FATAL) << "Messages can't have default values!";
1033- break;
1034- case google::protobuf::FieldDescriptor::CPPTYPE_STRING:
1035- if (fd->type() == google::protobuf::FieldDescriptor::TYPE_BYTES || opt.string_as_bytes())
1036- {
1037- vars["field_dv_ctype"] = "ProtobufCBinaryData";
1038- }
1039- else /* STRING type */
1040- {
1041- already_defined = true;
1042- vars["maybe_static"] = "";
1043- vars["field_dv_ctype"] = "char";
1044- vars["field_dv_ctype_suffix"] = "[]";
1045- }
1046- break;
1047- case google::protobuf::FieldDescriptor::CPPTYPE_ENUM:
1048- {
1049- const google::protobuf::EnumValueDescriptor* vd = fd->default_value_enum();
1050- vars["field_dv_ctype"] = FullNameToC(vd->type()->full_name(), vd->type()->file());
1051- break;
1052- }
1053- default:
1054- GOOGLE_LOG(FATAL) << "Unknown CPPTYPE";
1055- break;
1056- }
1057- if (!already_defined)
1058- printer->Print(vars, "$maybe_static$const $field_dv_ctype$ $lcclassname$__$lcname$__default_value$field_dv_ctype_suffix$ = $default_value$;\n");
1059- }
1060- }
1061+ for (int i = 0; i < descriptor_->nested_type_count(); i++) {
1062+ nested_generators_[i]->GenerateMessageDescriptor(printer, gen_init);
1063+ }
1064
1065- if ( descriptor_->field_count() ) {
1066- printer->Print(vars,
1067- "static const ProtobufCFieldDescriptor $lcclassname$__field_descriptors[$n_fields$] =\n"
1068- "{\n");
1069- printer->Indent();
1070+ for (int i = 0; i < descriptor_->enum_type_count(); i++) {
1071+ enum_generators_[i]->GenerateEnumDescriptor(printer);
1072+ }
1073
1074- std::vector<const google::protobuf::FieldDescriptor*> sorted_fields;
1075 for (int i = 0; i < descriptor_->field_count(); i++) {
1076- sorted_fields.push_back(descriptor_->field(i));
1077- }
1078- qsort(&sorted_fields[0], sorted_fields.size(),
1079- sizeof(const google::protobuf::FieldDescriptor*),
1080- compare_pfields_by_number);
1081- for (auto field : sorted_fields) {
1082- field_generators_.get(field).GenerateDescriptorInitializer(printer);
1083+ const google::protobuf::FieldDescriptor* fd = descriptor_->field(i);
1084+ if (fd->has_default_value()) {
1085+ field_generators_.get(fd).GenerateDefaultValueImplementations(printer);
1086+ }
1087 }
1088- printer->Outdent();
1089- printer->Print(vars, "};\n");
1090
1091- if (!optimize_code_size) {
1092- std::vector<NameIndex> field_indices;
1093- for (unsigned i = 0; i < descriptor_->field_count(); i++) {
1094- field_indices.push_back({ .index = i, .name = sorted_fields[i]->name() });
1095+ for (int i = 0; i < descriptor_->field_count(); i++) {
1096+ const google::protobuf::FieldDescriptor* fd = descriptor_->field(i);
1097+ const ProtobufCFieldOptions opt = fd->options().GetExtension(pb_c_field);
1098+ if (fd->has_default_value()) {
1099+ bool already_defined = false;
1100+ vars["name"] = fd->name();
1101+ vars["lcname"] = CamelToLower(fd->name());
1102+ vars["maybe_static"] = "static ";
1103+ vars["field_dv_ctype_suffix"] = "";
1104+ vars["default_value"] = field_generators_.get(fd).GetDefaultValue();
1105+ switch (fd->cpp_type()) {
1106+ case google::protobuf::FieldDescriptor::CPPTYPE_INT32:
1107+ vars["field_dv_ctype"] = "int32_t";
1108+ break;
1109+ case google::protobuf::FieldDescriptor::CPPTYPE_INT64:
1110+ vars["field_dv_ctype"] = "int64_t";
1111+ break;
1112+ case google::protobuf::FieldDescriptor::CPPTYPE_UINT32:
1113+ vars["field_dv_ctype"] = "uint32_t";
1114+ break;
1115+ case google::protobuf::FieldDescriptor::CPPTYPE_UINT64:
1116+ vars["field_dv_ctype"] = "uint64_t";
1117+ break;
1118+ case google::protobuf::FieldDescriptor::CPPTYPE_FLOAT:
1119+ vars["field_dv_ctype"] = "float";
1120+ break;
1121+ case google::protobuf::FieldDescriptor::CPPTYPE_DOUBLE:
1122+ vars["field_dv_ctype"] = "double";
1123+ break;
1124+ case google::protobuf::FieldDescriptor::CPPTYPE_BOOL:
1125+ vars["field_dv_ctype"] = "protobuf_c_boolean";
1126+ break;
1127+ case google::protobuf::FieldDescriptor::CPPTYPE_MESSAGE:
1128+ // NOTE: not supported by protobuf
1129+ vars["maybe_static"] = "";
1130+ vars["field_dv_ctype"] = "{ ... }";
1131+ GOOGLE_LOG(FATAL) << "Messages can't have default values!";
1132+ break;
1133+ case google::protobuf::FieldDescriptor::CPPTYPE_STRING:
1134+ if (fd->type() == google::protobuf::FieldDescriptor::TYPE_BYTES || opt.string_as_bytes()) {
1135+ vars["field_dv_ctype"] = "ProtobufCBinaryData";
1136+ } else {
1137+ /* STRING type */
1138+ already_defined = true;
1139+ vars["maybe_static"] = "";
1140+ vars["field_dv_ctype"] = "char";
1141+ vars["field_dv_ctype_suffix"] = "[]";
1142+ }
1143+ break;
1144+ case google::protobuf::FieldDescriptor::CPPTYPE_ENUM: {
1145+ const google::protobuf::EnumValueDescriptor* vd = fd->default_value_enum();
1146+ vars["field_dv_ctype"] = FullNameToC(vd->type()->full_name(), vd->type()->file());
1147+ break;
1148+ }
1149+ default:
1150+ GOOGLE_LOG(FATAL) << "Unknown CPPTYPE";
1151+ break;
1152+ }
1153+ if (!already_defined) {
1154+ printer->Print(vars, "$maybe_static$const $field_dv_ctype$ $lcclassname$__$lcname$__default_value$field_dv_ctype_suffix$ = $default_value$;\n");
1155+ }
1156 }
1157- qsort(&field_indices[0], field_indices.size(), sizeof(NameIndex),
1158- compare_name_indices_by_name);
1159- printer->Print(vars, "static const unsigned $lcclassname$__field_indices_by_name[] = {\n");
1160+ }
1161+
1162+ if (descriptor_->field_count()) {
1163+ printer->Print(vars,
1164+ "static const ProtobufCFieldDescriptor $lcclassname$__field_descriptors[$n_fields$] =\n"
1165+ "{\n");
1166+ printer->Indent();
1167+
1168+ std::vector<const google::protobuf::FieldDescriptor*> sorted_fields;
1169 for (int i = 0; i < descriptor_->field_count(); i++) {
1170- vars["index"] = SimpleItoa(field_indices[i].index);
1171- vars["name"] = field_indices[i].name;
1172- printer->Print(vars, " $index$, /* field[$index$] = $name$ */\n");
1173+ sorted_fields.push_back(descriptor_->field(i));
1174 }
1175- printer->Print("};\n");
1176- }
1177+ qsort(&sorted_fields[0],
1178+ sorted_fields.size(),
1179+ sizeof(const google::protobuf::FieldDescriptor*),
1180+ compare_pfields_by_number);
1181+ for (auto field : sorted_fields) {
1182+ field_generators_.get(field).GenerateDescriptorInitializer(printer);
1183+ }
1184+ printer->Outdent();
1185+ printer->Print(vars, "};\n");
1186
1187- // create range initializers
1188- std::vector<int> values;
1189- for (int i = 0; i < descriptor_->field_count(); i++) {
1190- values.push_back(sorted_fields[i]->number());
1191- }
1192- int n_ranges = WriteIntRanges(printer,
1193- descriptor_->field_count(), &values[0],
1194- vars["lcclassname"] + "__number_ranges");
1195+ if (!optimize_code_size) {
1196+ std::vector<NameIndex> field_indices;
1197+ for (unsigned i = 0; i < descriptor_->field_count(); i++) {
1198+ field_indices.push_back({ .index = i, .name = sorted_fields[i]->name() });
1199+ }
1200+ qsort(&field_indices[0],
1201+ field_indices.size(),
1202+ sizeof(NameIndex),
1203+ compare_name_indices_by_name);
1204+ printer->Print(vars, "static const unsigned $lcclassname$__field_indices_by_name[] = {\n");
1205+ for (int i = 0; i < descriptor_->field_count(); i++) {
1206+ vars["index"] = SimpleItoa(field_indices[i].index);
1207+ vars["name"] = field_indices[i].name;
1208+ printer->Print(vars, " $index$, /* field[$index$] = $name$ */\n");
1209+ }
1210+ printer->Print("};\n");
1211+ }
1212
1213- vars["n_ranges"] = SimpleItoa(n_ranges);
1214- } else {
1215- /* MS compiler can't handle arrays with zero size and empty
1216- * initialization list. Furthermore it is an extension of GCC only but
1217- * not a standard. */
1218- vars["n_ranges"] = "0";
1219- printer->Print(vars,
1220- "#define $lcclassname$__field_descriptors NULL\n"
1221- "#define $lcclassname$__field_indices_by_name NULL\n"
1222- "#define $lcclassname$__number_ranges NULL\n");
1223+ // create range initializers
1224+ std::vector<int> values;
1225+ for (int i = 0; i < descriptor_->field_count(); i++) {
1226+ values.push_back(sorted_fields[i]->number());
1227 }
1228+ int n_ranges = WriteIntRanges(printer,
1229+ descriptor_->field_count(),
1230+ &values[0],
1231+ vars["lcclassname"] + "__number_ranges");
1232+
1233+ vars["n_ranges"] = SimpleItoa(n_ranges);
1234+ } else {
1235+ /* MS compiler can't handle arrays with zero size and empty
1236+ * initialization list. Furthermore it is an extension of GCC only but
1237+ * not a standard. */
1238+ vars["n_ranges"] = "0";
1239+ printer->Print(vars,
1240+ "#define $lcclassname$__field_descriptors NULL\n"
1241+ "#define $lcclassname$__field_indices_by_name NULL\n"
1242+ "#define $lcclassname$__number_ranges NULL\n");
1243+ }
1244
1245 printer->Print(vars,
1246- "const ProtobufCMessageDescriptor $lcclassname$__descriptor =\n"
1247- "{\n"
1248- " PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,\n");
1249+ "const ProtobufCMessageDescriptor $lcclassname$__descriptor =\n"
1250+ "{\n"
1251+ " PROTOBUF_C__MESSAGE_DESCRIPTOR_MAGIC,\n");
1252 if (optimize_code_size) {
1253 printer->Print(" NULL,NULL,NULL,NULL, /* CODE_SIZE */\n");
1254 } else {
1255 printer->Print(vars,
1256- " \"$fullname$\",\n"
1257- " \"$shortname$\",\n"
1258- " \"$classname$\",\n"
1259- " \"$packagename$\",\n");
1260+ " \"$fullname$\",\n"
1261+ " \"$shortname$\",\n"
1262+ " \"$classname$\",\n"
1263+ " \"$packagename$\",\n");
1264 }
1265 printer->Print(vars,
1266- " sizeof($classname$),\n"
1267- " $n_fields$,\n"
1268- " $lcclassname$__field_descriptors,\n");
1269+ " sizeof($classname$),\n"
1270+ " $n_fields$,\n"
1271+ " $lcclassname$__field_descriptors,\n");
1272 if (optimize_code_size) {
1273 printer->Print(" NULL, /* CODE_SIZE */\n");
1274 } else {
1275- printer->Print(vars,
1276- " $lcclassname$__field_indices_by_name,\n");
1277+ printer->Print(vars, " $lcclassname$__field_indices_by_name,\n");
1278 }
1279 printer->Print(vars,
1280- " $n_ranges$,"
1281- " $lcclassname$__number_ranges,\n");
1282+ " $n_ranges$,"
1283+ " $lcclassname$__number_ranges,\n");
1284 if (gen_init) {
1285- printer->Print(vars,
1286- " (ProtobufCMessageInit) $lcclassname$__init,\n");
1287+ printer->Print(vars, " (ProtobufCMessageInit) $lcclassname$__init,\n");
1288 } else {
1289- printer->Print(vars,
1290- " NULL, /* gen_init_helpers = false */\n");
1291+ printer->Print(vars, " NULL, /* gen_init_helpers = false */\n");
1292 }
1293 printer->Print(vars,
1294- " NULL,NULL,NULL /* reserved[123] */\n"
1295- "};\n");
1296+ " NULL,NULL,NULL /* reserved[123] */\n"
1297+ "};\n");
1298 }
1299
1300 int MessageGenerator::GetOneofUnionOrder(const google::protobuf::FieldDescriptor* fd)
1301
1302From c59b146aee2d97091ca2adeecd3f2741cb7f0082 Mon Sep 17 00:00:00 2001
1303From: Robert Edmonds <edmonds@users.noreply.github.com>
1304Date: Sat, 8 Feb 2025 21:10:37 -0500
1305Subject: [PATCH 08/11] compat: Use absl::string_view instead of
1306 google::protobuf::internal::DescriptorStringView
1307
1308Even though google::protobuf::internal::DescriptorStringView is exposed
1309in public protobuf headers, it's probably not a good idea to rely on an
1310"internal" typedef.
1311
1312According to https://protobuf.dev/news/2024-10-02/#descriptor-apis:
1313
1314 v30 will update return types in descriptor (such as full_name) to be
1315 absl::string_view.
1316
1317So `absl::string_view` is probably the right type to use here.
1318---
1319 protoc-gen-c/compat.h | 6 +++++-
1320 1 file changed, 5 insertions(+), 1 deletion(-)
1321
1322diff --git a/protoc-gen-c/compat.h b/protoc-gen-c/compat.h
1323index fe8041b5..a70cef34 100644
1324--- a/protoc-gen-c/compat.h
1325+++ b/protoc-gen-c/compat.h
1326@@ -37,12 +37,16 @@
1327 # define GOOGLE_LOG ABSL_LOG
1328 #endif
1329
1330+#if GOOGLE_PROTOBUF_VERSION >= 6030000
1331+# include <absl/strings/string_view.h>
1332+#endif
1333+
1334 namespace protobuf_c {
1335
1336 namespace compat {
1337
1338 #if GOOGLE_PROTOBUF_VERSION >= 6030000
1339-typedef google::protobuf::internal::DescriptorStringView StringView;
1340+typedef absl::string_view StringView;
1341 #else
1342 typedef const std::string& StringView;
1343 #endif
1344
1345From 9c56038fd9d3cc2552c297457d7a66efe5cbd2c7 Mon Sep 17 00:00:00 2001
1346From: Robert Edmonds <edmonds@users.noreply.github.com>
1347Date: Sat, 8 Feb 2025 21:37:30 -0500
1348Subject: [PATCH 09/11] Makefile.am: Add compat.h to
1349 protoc_gen_c_protoc_gen_c_SOURCES
1350
1351---
1352 Makefile.am | 1 +
1353 1 file changed, 1 insertion(+)
1354
1355diff --git a/Makefile.am b/Makefile.am
1356index 77aa9d99..26d19f16 100644
1357--- a/Makefile.am
1358+++ b/Makefile.am
1359@@ -102,6 +102,7 @@ protoc_gen_c_protoc_gen_c_SOURCES = \
1360 protoc-gen-c/c_service.h \
1361 protoc-gen-c/c_string_field.cc \
1362 protoc-gen-c/c_string_field.h \
1363+ protoc-gen-c/compat.h \
1364 protobuf-c/protobuf-c.pb.cc \
1365 protobuf-c/protobuf-c.pb.h \
1366 protoc-gen-c/main.cc
1367
1368From 4ebd5cd8238d1f2ac6291b8c8925f34e16ce2123 Mon Sep 17 00:00:00 2001
1369From: Robert Edmonds <edmonds@users.noreply.github.com>
1370Date: Sat, 8 Feb 2025 21:38:07 -0500
1371Subject: [PATCH 10/11] compat: Conditionalize the include of <string>
1372
1373It is only needed on older protobuf versions where absl::string_view is
1374not being used.
1375---
1376 protoc-gen-c/compat.h | 4 ++--
1377 1 file changed, 2 insertions(+), 2 deletions(-)
1378
1379diff --git a/protoc-gen-c/compat.h b/protoc-gen-c/compat.h
1380index a70cef34..f6ace7cb 100644
1381--- a/protoc-gen-c/compat.h
1382+++ b/protoc-gen-c/compat.h
1383@@ -28,8 +28,6 @@
1384 #ifndef PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
1385 #define PROTOBUF_C_PROTOC_GEN_C_COMPAT_H__
1386
1387-#include <string>
1388-
1389 #if GOOGLE_PROTOBUF_VERSION >= 4022000
1390 # define GOOGLE_ARRAYSIZE ABSL_ARRAYSIZE
1391 # define GOOGLE_CHECK_EQ ABSL_CHECK_EQ
1392@@ -39,6 +37,8 @@
1393
1394 #if GOOGLE_PROTOBUF_VERSION >= 6030000
1395 # include <absl/strings/string_view.h>
1396+#else
1397+# include <string>
1398 #endif
1399
1400 namespace protobuf_c {
1401
1402From 9a6b35e1e6956fb5cb044910448049b7a5339244 Mon Sep 17 00:00:00 2001
1403From: Robert Edmonds <edmonds@users.noreply.github.com>
1404Date: Sat, 8 Feb 2025 21:44:42 -0500
1405Subject: [PATCH 11/11] Cater to Microsoft Visual C++
1406
1407Apparently MSVC doesn't support designated initializers for some reason.
1408---
1409 protoc-gen-c/c_enum.cc | 9 ++-------
1410 protoc-gen-c/c_message.cc | 2 +-
1411 2 files changed, 3 insertions(+), 8 deletions(-)
1412
1413diff --git a/protoc-gen-c/c_enum.cc b/protoc-gen-c/c_enum.cc
1414index c7839edd..1940ba9d 100644
1415--- a/protoc-gen-c/c_enum.cc
1416+++ b/protoc-gen-c/c_enum.cc
1417@@ -195,14 +195,9 @@ void EnumGenerator::GenerateEnumDescriptor(google::protobuf::io::Printer* printe
1418 // Sort by name and value, dropping duplicate values if they appear later.
1419 // TODO: use a c++ paradigm for this!
1420 std::vector<ValueIndex> value_index;
1421- for (unsigned j = 0; j < descriptor_->value_count(); j++) {
1422+ for (int j = 0; j < descriptor_->value_count(); j++) {
1423 const google::protobuf::EnumValueDescriptor *vd = descriptor_->value(j);
1424- value_index.push_back({
1425- .value = vd->number(),
1426- .index = j,
1427- .final_index = 0,
1428- .name = vd->name(),
1429- });
1430+ value_index.push_back({ vd->number(), (unsigned)j, 0, vd->name() });
1431 }
1432 qsort(&value_index[0],
1433 value_index.size(),
1434diff --git a/protoc-gen-c/c_message.cc b/protoc-gen-c/c_message.cc
1435index 2a3b2a2f..94889179 100644
1436--- a/protoc-gen-c/c_message.cc
1437+++ b/protoc-gen-c/c_message.cc
1438@@ -581,7 +581,7 @@ GenerateMessageDescriptor(google::protobuf::io::Printer* printer, bool gen_init)
1439 if (!optimize_code_size) {
1440 std::vector<NameIndex> field_indices;
1441 for (unsigned i = 0; i < descriptor_->field_count(); i++) {
1442- field_indices.push_back({ .index = i, .name = sorted_fields[i]->name() });
1443+ field_indices.push_back({ i, sorted_fields[i]->name() });
1444 }
1445 qsort(&field_indices[0],
1446 field_indices.size(),
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.1.bb b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.2.bb
index 30c9e19b16..7fe514fe07 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.1.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf-c_1.5.2.bb
@@ -13,11 +13,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=bd8de4f63e06b1ccc06e9f8dc5b1aa97"
13DEPENDS = "protobuf-native protobuf" 13DEPENDS = "protobuf-native protobuf"
14 14
15SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https \ 15SRC_URI = "git://github.com/protobuf-c/protobuf-c.git;branch=master;protocol=https \
16 file://protobuf-30.patch \
17" 16"
18SRC_URI:append:class-native = " file://0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch" 17SRC_URI:append:class-native = " file://0001-Makefile.am-do-not-compile-the-code-which-was-genera.patch"
19 18
20SRCREV = "185beed28e65494be7505b30c1afeaf199e19b23" 19SRCREV = "4719fdd7760624388c2c5b9d6759eb6a47490626"
21 20
22 21
23inherit autotools pkgconfig 22inherit autotools pkgconfig
diff --git a/meta-oe/recipes-devtools/protobuf/protobuf_6.33.5.bb b/meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb
index 66c9c24473..880dd82b1d 100644
--- a/meta-oe/recipes-devtools/protobuf/protobuf_6.33.5.bb
+++ b/meta-oe/recipes-devtools/protobuf/protobuf_6.33.6.bb
@@ -16,7 +16,7 @@ PROTOC_BRANCH = "${@d.getVar('PV').split('.', 2)[1]}.x"
16DEPENDS = "zlib abseil-cpp jsoncpp" 16DEPENDS = "zlib abseil-cpp jsoncpp"
17DEPENDS:append:class-target = " protobuf-native" 17DEPENDS:append:class-target = " protobuf-native"
18 18
19SRCREV = "b6f9284da830b69be787732ffdaa35049d20a088" 19SRCREV = "6e1998413a5bca7c058b85999667893f167434bc"
20 20
21SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=${PROTOC_BRANCH};protocol=https;tag=${PROTOC_VERSION} \ 21SRC_URI = "git://github.com/protocolbuffers/protobuf.git;branch=${PROTOC_BRANCH};protocol=https;tag=${PROTOC_VERSION} \
22 file://run-ptest \ 22 file://run-ptest \
@@ -29,6 +29,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d\.\d+\.\d+)"
29CVE_PRODUCT = "google:protobuf protobuf:protobuf google-protobuf protobuf-cpp" 29CVE_PRODUCT = "google:protobuf protobuf:protobuf google-protobuf protobuf-cpp"
30 30
31CVE_STATUS[CVE-2026-0994] = "cpe-incorrect: the vulnerability affects only python3-protobuf recipe" 31CVE_STATUS[CVE-2026-0994] = "cpe-incorrect: the vulnerability affects only python3-protobuf recipe"
32CVE_STATUS[CVE-2026-6409] = "cpe-incorrect: the vulnerability affects only the php library"
32 33
33inherit cmake pkgconfig ptest 34inherit cmake pkgconfig ptest
34 35
@@ -53,6 +54,9 @@ LANG_SUPPORT = "cpp ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python', ''
53CXXFLAGS:append:mipsarcho32 = " -latomic" 54CXXFLAGS:append:mipsarcho32 = " -latomic"
54CXXFLAGS:append:riscv32 = " -latomic" 55CXXFLAGS:append:riscv32 = " -latomic"
55 56
57# The ptests are not buildable now that pkgconf is being used, disable until fixed.
58PTEST_ENABLED = "0"
59
56do_compile_ptest() { 60do_compile_ptest() {
57 mkdir -p "${B}/${TEST_SRC_DIR}" 61 mkdir -p "${B}/${TEST_SRC_DIR}"
58 62
diff --git a/meta-oe/recipes-devtools/sip/sip_6.15.1.bb b/meta-oe/recipes-devtools/sip/sip_6.15.3.bb
index b00d5d5e7a..5d6d8c78a6 100644
--- a/meta-oe/recipes-devtools/sip/sip_6.15.1.bb
+++ b/meta-oe/recipes-devtools/sip/sip_6.15.3.bb
@@ -11,7 +11,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=236276327275fdb261636fb40b18d88d"
11inherit pypi python_setuptools_build_meta python3native 11inherit pypi python_setuptools_build_meta python3native
12 12
13PYPI_PACKAGE = "sip" 13PYPI_PACKAGE = "sip"
14SRC_URI[sha256sum] = "dc2e58c1798a74e1b31c28e837339822fe8fa55288ae30e8986eb28100ebca5a" 14SRC_URI[sha256sum] = "bb2516983f9f716d321e5157c00d0de0c12422eba73b8f43a44610a0f6622438"
15 15
16DEPENDS += "python3-setuptools-scm-native" 16DEPENDS += "python3-setuptools-scm-native"
17 17
diff --git a/meta-oe/recipes-devtools/spdm-utils/spdm-utils-crates.inc b/meta-oe/recipes-devtools/spdm-utils/spdm-utils-crates.inc
index 7a2aae9be7..0c3582d53d 100644
--- a/meta-oe/recipes-devtools/spdm-utils/spdm-utils-crates.inc
+++ b/meta-oe/recipes-devtools/spdm-utils/spdm-utils-crates.inc
@@ -2,557 +2,393 @@
2 2
3# from Cargo.lock 3# from Cargo.lock
4SRC_URI += " \ 4SRC_URI += " \
5 crate://crates.io/aho-corasick/1.1.3 \ 5 crate://crates.io/aho-corasick/1.1.4 \
6 crate://crates.io/anstream/0.6.18 \ 6 crate://crates.io/anstream/0.6.21 \
7 crate://crates.io/anstyle/1.0.10 \ 7 crate://crates.io/anstyle/1.0.13 \
8 crate://crates.io/anstyle-parse/0.2.6 \ 8 crate://crates.io/anstyle-parse/0.2.7 \
9 crate://crates.io/anstyle-query/1.1.2 \ 9 crate://crates.io/anstyle-query/1.1.5 \
10 crate://crates.io/anstyle-wincon/3.0.7 \ 10 crate://crates.io/anstyle-wincon/3.0.11 \
11 crate://crates.io/asn1-rs/0.5.2 \ 11 crate://crates.io/asn1-rs/0.5.2 \
12 crate://crates.io/asn1-rs/0.6.2 \ 12 crate://crates.io/asn1-rs/0.6.2 \
13 crate://crates.io/asn1-rs-derive/0.4.0 \ 13 crate://crates.io/asn1-rs-derive/0.4.0 \
14 crate://crates.io/asn1-rs-derive/0.5.1 \ 14 crate://crates.io/asn1-rs-derive/0.5.1 \
15 crate://crates.io/asn1-rs-impl/0.1.0 \ 15 crate://crates.io/asn1-rs-impl/0.1.0 \
16 crate://crates.io/asn1-rs-impl/0.2.0 \ 16 crate://crates.io/asn1-rs-impl/0.2.0 \
17 crate://crates.io/async-attributes/1.1.2 \ 17 crate://crates.io/autocfg/1.5.0 \
18 crate://crates.io/async-channel/1.9.0 \ 18 crate://crates.io/bindgen/0.72.1 \
19 crate://crates.io/async-channel/2.3.1 \
20 crate://crates.io/async-executor/1.13.1 \
21 crate://crates.io/async-global-executor/2.4.1 \
22 crate://crates.io/async-io/2.4.0 \
23 crate://crates.io/async-lock/3.4.0 \
24 crate://crates.io/async-std/1.13.0 \
25 crate://crates.io/async-task/4.7.1 \
26 crate://crates.io/atomic-waker/1.1.2 \
27 crate://crates.io/autocfg/1.4.0 \
28 crate://crates.io/bindgen/0.71.1 \
29 crate://crates.io/bitfield/0.14.0 \ 19 crate://crates.io/bitfield/0.14.0 \
30 crate://crates.io/bitflags/1.3.2 \ 20 crate://crates.io/bitflags/1.3.2 \
31 crate://crates.io/bitflags/2.8.0 \ 21 crate://crates.io/bitflags/2.10.0 \
32 crate://crates.io/block-buffer/0.10.4 \ 22 crate://crates.io/block-buffer/0.10.4 \
33 crate://crates.io/blocking/1.6.1 \ 23 crate://crates.io/byteorder/1.5.0 \
34 crate://crates.io/bumpalo/3.16.0 \ 24 crate://crates.io/bytes/1.11.1 \
35 crate://crates.io/cexpr/0.6.0 \ 25 crate://crates.io/cexpr/0.6.0 \
36 crate://crates.io/cfg-if/1.0.0 \ 26 crate://crates.io/cfg-if/1.0.4 \
37 crate://crates.io/cfg_aliases/0.2.1 \ 27 crate://crates.io/cfg_aliases/0.2.1 \
38 crate://crates.io/clang-sys/1.8.1 \ 28 crate://crates.io/clang-sys/1.8.1 \
39 crate://crates.io/clap/4.5.27 \ 29 crate://crates.io/clap/4.5.57 \
40 crate://crates.io/clap_builder/4.5.27 \ 30 crate://crates.io/clap_builder/4.5.57 \
41 crate://crates.io/clap_derive/4.5.24 \ 31 crate://crates.io/clap_derive/4.5.55 \
42 crate://crates.io/clap_lex/0.7.4 \ 32 crate://crates.io/clap_lex/0.7.7 \
43 crate://crates.io/colorchoice/1.0.3 \ 33 crate://crates.io/colorchoice/1.0.4 \
44 crate://crates.io/colored/2.2.0 \ 34 crate://crates.io/colored/2.2.0 \
45 crate://crates.io/concurrent-queue/2.5.0 \
46 crate://crates.io/core-foundation/0.10.0 \ 35 crate://crates.io/core-foundation/0.10.0 \
47 crate://crates.io/core-foundation-sys/0.8.7 \ 36 crate://crates.io/core-foundation-sys/0.8.7 \
48 crate://crates.io/cpufeatures/0.2.17 \ 37 crate://crates.io/cpufeatures/0.2.17 \
49 crate://crates.io/crossbeam-utils/0.8.21 \ 38 crate://crates.io/crossterm/0.25.0 \
50 crate://crates.io/crunchy/0.2.3 \ 39 crate://crates.io/crossterm_winapi/0.9.1 \
51 crate://crates.io/crypto-common/0.1.6 \ 40 crate://crates.io/crunchy/0.2.4 \
52 crate://crates.io/data-encoding/2.7.0 \ 41 crate://crates.io/crypto-common/0.1.7 \
42 crate://crates.io/data-encoding/2.10.0 \
53 crate://crates.io/der-parser/8.2.0 \ 43 crate://crates.io/der-parser/8.2.0 \
54 crate://crates.io/deranged/0.3.11 \ 44 crate://crates.io/deranged/0.5.5 \
55 crate://crates.io/digest/0.10.7 \ 45 crate://crates.io/digest/0.10.7 \
56 crate://crates.io/displaydoc/0.2.5 \ 46 crate://crates.io/displaydoc/0.2.5 \
57 crate://crates.io/either/1.13.0 \ 47 crate://crates.io/dyn-clone/1.0.20 \
48 crate://crates.io/either/1.15.0 \
58 crate://crates.io/embedded-crc-macros/1.0.0 \ 49 crate://crates.io/embedded-crc-macros/1.0.0 \
59 crate://crates.io/env_logger/0.10.2 \ 50 crate://crates.io/env_logger/0.10.2 \
60 crate://crates.io/errno/0.3.10 \ 51 crate://crates.io/errno/0.3.14 \
61 crate://crates.io/event-listener/2.5.3 \
62 crate://crates.io/event-listener/5.4.0 \
63 crate://crates.io/event-listener-strategy/0.5.3 \
64 crate://crates.io/fastrand/2.3.0 \
65 crate://crates.io/futures/0.3.31 \ 52 crate://crates.io/futures/0.3.31 \
66 crate://crates.io/futures-channel/0.3.31 \ 53 crate://crates.io/futures-channel/0.3.31 \
67 crate://crates.io/futures-core/0.3.31 \ 54 crate://crates.io/futures-core/0.3.31 \
68 crate://crates.io/futures-executor/0.3.31 \ 55 crate://crates.io/futures-executor/0.3.31 \
69 crate://crates.io/futures-io/0.3.31 \ 56 crate://crates.io/futures-io/0.3.31 \
70 crate://crates.io/futures-lite/2.6.0 \
71 crate://crates.io/futures-macro/0.3.31 \ 57 crate://crates.io/futures-macro/0.3.31 \
72 crate://crates.io/futures-sink/0.3.31 \ 58 crate://crates.io/futures-sink/0.3.31 \
73 crate://crates.io/futures-task/0.3.31 \ 59 crate://crates.io/futures-task/0.3.31 \
74 crate://crates.io/futures-util/0.3.31 \ 60 crate://crates.io/futures-util/0.3.31 \
61 crate://crates.io/fuzzy-matcher/0.3.7 \
62 crate://crates.io/fxhash/0.2.1 \
75 crate://crates.io/generic-array/0.14.7 \ 63 crate://crates.io/generic-array/0.14.7 \
76 crate://crates.io/glob/0.3.2 \ 64 crate://crates.io/glob/0.3.3 \
77 crate://crates.io/gloo-timers/0.3.0 \ 65 crate://crates.io/half/2.7.1 \
78 crate://crates.io/half/2.4.1 \
79 crate://crates.io/heck/0.5.0 \ 66 crate://crates.io/heck/0.5.0 \
80 crate://crates.io/hermit-abi/0.4.0 \ 67 crate://crates.io/hermit-abi/0.5.2 \
81 crate://crates.io/home/0.5.11 \ 68 crate://crates.io/home/0.5.12 \
82 crate://crates.io/humantime/2.1.0 \ 69 crate://crates.io/humantime/2.3.0 \
70 crate://crates.io/inquire/0.7.5 \
83 crate://crates.io/io-kit-sys/0.4.1 \ 71 crate://crates.io/io-kit-sys/0.4.1 \
84 crate://crates.io/is-terminal/0.4.15 \ 72 crate://crates.io/is-terminal/0.4.17 \
85 crate://crates.io/is_terminal_polyfill/1.70.1 \ 73 crate://crates.io/is_terminal_polyfill/1.70.2 \
86 crate://crates.io/itertools/0.13.0 \ 74 crate://crates.io/itertools/0.13.0 \
87 crate://crates.io/itoa/1.0.14 \ 75 crate://crates.io/itoa/1.0.17 \
88 crate://crates.io/js-sys/0.3.77 \
89 crate://crates.io/kv-log-macro/1.0.7 \
90 crate://crates.io/lazy_static/1.5.0 \ 76 crate://crates.io/lazy_static/1.5.0 \
91 crate://crates.io/libc/0.2.169 \ 77 crate://crates.io/libc/0.2.180 \
92 crate://crates.io/libloading/0.8.6 \ 78 crate://crates.io/libloading/0.8.9 \
93 crate://crates.io/libmctp/0.2.0 \ 79 crate://crates.io/libmctp/0.2.0 \
94 crate://crates.io/libudev/0.3.0 \ 80 crate://crates.io/libudev/0.3.0 \
95 crate://crates.io/libudev-sys/0.1.4 \ 81 crate://crates.io/libudev-sys/0.1.4 \
96 crate://crates.io/linux-raw-sys/0.4.15 \ 82 crate://crates.io/linux-raw-sys/0.4.15 \
97 crate://crates.io/log/0.4.25 \ 83 crate://crates.io/lock_api/0.4.14 \
98 crate://crates.io/mach2/0.4.2 \ 84 crate://crates.io/log/0.4.29 \
99 crate://crates.io/memchr/2.7.4 \ 85 crate://crates.io/mach2/0.4.3 \
86 crate://crates.io/memchr/2.7.6 \
100 crate://crates.io/memmap2/0.5.10 \ 87 crate://crates.io/memmap2/0.5.10 \
101 crate://crates.io/minicbor/0.25.1 \ 88 crate://crates.io/minicbor/0.25.1 \
102 crate://crates.io/minicbor-derive/0.15.3 \ 89 crate://crates.io/minicbor-derive/0.15.3 \
103 crate://crates.io/minimal-lexical/0.2.1 \ 90 crate://crates.io/minimal-lexical/0.2.1 \
91 crate://crates.io/mio/0.8.11 \
92 crate://crates.io/mio/1.1.1 \
93 crate://crates.io/newline-converter/0.3.0 \
104 crate://crates.io/nix/0.26.4 \ 94 crate://crates.io/nix/0.26.4 \
105 crate://crates.io/nix/0.29.0 \ 95 crate://crates.io/nix/0.29.0 \
106 crate://crates.io/nom/7.1.3 \ 96 crate://crates.io/nom/7.1.3 \
107 crate://crates.io/num-bigint/0.4.6 \ 97 crate://crates.io/num-bigint/0.4.6 \
108 crate://crates.io/num-conv/0.1.0 \ 98 crate://crates.io/num-conv/0.2.0 \
109 crate://crates.io/num-integer/0.1.46 \ 99 crate://crates.io/num-integer/0.1.46 \
110 crate://crates.io/num-traits/0.2.19 \ 100 crate://crates.io/num-traits/0.2.19 \
111 crate://crates.io/oid-registry/0.6.1 \ 101 crate://crates.io/oid-registry/0.6.1 \
112 crate://crates.io/once_cell/1.20.2 \ 102 crate://crates.io/once_cell/1.21.3 \
113 crate://crates.io/parking/2.2.1 \ 103 crate://crates.io/once_cell_polyfill/1.70.2 \
104 crate://crates.io/parking_lot/0.12.5 \
105 crate://crates.io/parking_lot_core/0.9.12 \
114 crate://crates.io/pin-project-lite/0.2.16 \ 106 crate://crates.io/pin-project-lite/0.2.16 \
115 crate://crates.io/pin-utils/0.1.0 \ 107 crate://crates.io/pin-utils/0.1.0 \
116 crate://crates.io/piper/0.2.4 \ 108 crate://crates.io/pkg-config/0.3.32 \
117 crate://crates.io/pkg-config/0.3.31 \
118 crate://crates.io/polling/3.7.4 \
119 crate://crates.io/powerfmt/0.2.0 \ 109 crate://crates.io/powerfmt/0.2.0 \
120 crate://crates.io/prettyplease/0.2.29 \ 110 crate://crates.io/prettyplease/0.2.37 \
121 crate://crates.io/proc-macro2/1.0.93 \ 111 crate://crates.io/proc-macro2/1.0.106 \
122 crate://crates.io/quote/1.0.38 \ 112 crate://crates.io/quote/1.0.40 \
123 crate://crates.io/regex/1.11.1 \ 113 crate://crates.io/redox_syscall/0.5.18 \
124 crate://crates.io/regex-automata/0.4.9 \ 114 crate://crates.io/regex/1.12.3 \
125 crate://crates.io/regex-syntax/0.8.5 \ 115 crate://crates.io/regex-automata/0.4.14 \
126 crate://crates.io/rustc-hash/2.1.0 \ 116 crate://crates.io/regex-syntax/0.8.9 \
117 crate://crates.io/rustc-hash/2.1.1 \
127 crate://crates.io/rusticata-macros/4.1.0 \ 118 crate://crates.io/rusticata-macros/4.1.0 \
128 crate://crates.io/rustix/0.38.44 \ 119 crate://crates.io/rustix/0.38.44 \
129 crate://crates.io/rustversion/1.0.19 \
130 crate://crates.io/scopeguard/1.2.0 \ 120 crate://crates.io/scopeguard/1.2.0 \
131 crate://crates.io/serde/1.0.217 \ 121 crate://crates.io/serde_core/1.0.228 \
132 crate://crates.io/serde_derive/1.0.217 \ 122 crate://crates.io/serde_derive/1.0.228 \
133 crate://crates.io/serialport/4.7.0 \ 123 crate://crates.io/serialport/4.8.1 \
134 crate://crates.io/sha2/0.10.8 \ 124 crate://crates.io/sha2/0.10.9 \
135 crate://crates.io/shlex/1.3.0 \ 125 crate://crates.io/shlex/1.3.0 \
136 crate://crates.io/slab/0.4.9 \ 126 crate://crates.io/signal-hook/0.3.18 \
127 crate://crates.io/signal-hook-mio/0.2.5 \
128 crate://crates.io/signal-hook-registry/1.4.8 \
129 crate://crates.io/slab/0.4.12 \
130 crate://crates.io/smallvec/1.15.1 \
137 crate://crates.io/smbus-pec/1.0.1 \ 131 crate://crates.io/smbus-pec/1.0.1 \
132 crate://crates.io/socket2/0.6.2 \
138 crate://crates.io/strsim/0.11.1 \ 133 crate://crates.io/strsim/0.11.1 \
139 crate://crates.io/syn/1.0.109 \ 134 crate://crates.io/syn/1.0.109 \
140 crate://crates.io/syn/2.0.96 \ 135 crate://crates.io/syn/2.0.114 \
141 crate://crates.io/synstructure/0.12.6 \ 136 crate://crates.io/synstructure/0.12.6 \
142 crate://crates.io/synstructure/0.13.1 \ 137 crate://crates.io/synstructure/0.13.2 \
143 crate://crates.io/termcolor/1.4.1 \ 138 crate://crates.io/termcolor/1.4.1 \
144 crate://crates.io/thiserror/1.0.69 \ 139 crate://crates.io/thiserror/1.0.69 \
140 crate://crates.io/thiserror/2.0.18 \
145 crate://crates.io/thiserror-impl/1.0.69 \ 141 crate://crates.io/thiserror-impl/1.0.69 \
146 crate://crates.io/time/0.3.37 \ 142 crate://crates.io/thiserror-impl/2.0.18 \
147 crate://crates.io/time-core/0.1.2 \ 143 crate://crates.io/thread_local/1.1.9 \
148 crate://crates.io/time-macros/0.2.19 \ 144 crate://crates.io/time/0.3.47 \
149 crate://crates.io/tracing/0.1.41 \ 145 crate://crates.io/time-core/0.1.8 \
150 crate://crates.io/tracing-core/0.1.33 \ 146 crate://crates.io/time-macros/0.2.27 \
151 crate://crates.io/typenum/1.17.0 \ 147 crate://crates.io/tokio/1.49.0 \
152 crate://crates.io/unescaper/0.1.5 \ 148 crate://crates.io/tokio-macros/2.6.0 \
153 crate://crates.io/unicode-ident/1.0.15 \ 149 crate://crates.io/typenum/1.19.0 \
150 crate://crates.io/unescaper/0.1.8 \
151 crate://crates.io/unicode-ident/1.0.22 \
152 crate://crates.io/unicode-segmentation/1.12.0 \
153 crate://crates.io/unicode-width/0.1.14 \
154 crate://crates.io/unicode-xid/0.2.6 \ 154 crate://crates.io/unicode-xid/0.2.6 \
155 crate://crates.io/utf8parse/0.2.2 \ 155 crate://crates.io/utf8parse/0.2.2 \
156 crate://crates.io/value-bag/1.10.0 \
157 crate://crates.io/version_check/0.9.5 \ 156 crate://crates.io/version_check/0.9.5 \
158 crate://crates.io/wasm-bindgen/0.2.100 \ 157 crate://crates.io/wasi/0.11.1+wasi-snapshot-preview1 \
159 crate://crates.io/wasm-bindgen-backend/0.2.100 \
160 crate://crates.io/wasm-bindgen-futures/0.4.50 \
161 crate://crates.io/wasm-bindgen-macro/0.2.100 \
162 crate://crates.io/wasm-bindgen-macro-support/0.2.100 \
163 crate://crates.io/wasm-bindgen-shared/0.2.100 \
164 crate://crates.io/web-sys/0.3.77 \
165 crate://crates.io/which/6.0.3 \ 158 crate://crates.io/which/6.0.3 \
166 crate://crates.io/winapi/0.3.9 \ 159 crate://crates.io/winapi/0.3.9 \
167 crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \ 160 crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
168 crate://crates.io/winapi-util/0.1.9 \ 161 crate://crates.io/winapi-util/0.1.11 \
169 crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \ 162 crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
163 crate://crates.io/windows-link/0.2.1 \
164 crate://crates.io/windows-sys/0.48.0 \
165 crate://crates.io/windows-sys/0.52.0 \
170 crate://crates.io/windows-sys/0.59.0 \ 166 crate://crates.io/windows-sys/0.59.0 \
167 crate://crates.io/windows-sys/0.60.2 \
168 crate://crates.io/windows-sys/0.61.2 \
169 crate://crates.io/windows-targets/0.48.5 \
171 crate://crates.io/windows-targets/0.52.6 \ 170 crate://crates.io/windows-targets/0.52.6 \
171 crate://crates.io/windows-targets/0.53.5 \
172 crate://crates.io/windows_aarch64_gnullvm/0.48.5 \
172 crate://crates.io/windows_aarch64_gnullvm/0.52.6 \ 173 crate://crates.io/windows_aarch64_gnullvm/0.52.6 \
174 crate://crates.io/windows_aarch64_gnullvm/0.53.1 \
175 crate://crates.io/windows_aarch64_msvc/0.48.5 \
173 crate://crates.io/windows_aarch64_msvc/0.52.6 \ 176 crate://crates.io/windows_aarch64_msvc/0.52.6 \
177 crate://crates.io/windows_aarch64_msvc/0.53.1 \
178 crate://crates.io/windows_i686_gnu/0.48.5 \
174 crate://crates.io/windows_i686_gnu/0.52.6 \ 179 crate://crates.io/windows_i686_gnu/0.52.6 \
180 crate://crates.io/windows_i686_gnu/0.53.1 \
175 crate://crates.io/windows_i686_gnullvm/0.52.6 \ 181 crate://crates.io/windows_i686_gnullvm/0.52.6 \
182 crate://crates.io/windows_i686_gnullvm/0.53.1 \
183 crate://crates.io/windows_i686_msvc/0.48.5 \
176 crate://crates.io/windows_i686_msvc/0.52.6 \ 184 crate://crates.io/windows_i686_msvc/0.52.6 \
185 crate://crates.io/windows_i686_msvc/0.53.1 \
186 crate://crates.io/windows_x86_64_gnu/0.48.5 \
177 crate://crates.io/windows_x86_64_gnu/0.52.6 \ 187 crate://crates.io/windows_x86_64_gnu/0.52.6 \
188 crate://crates.io/windows_x86_64_gnu/0.53.1 \
189 crate://crates.io/windows_x86_64_gnullvm/0.48.5 \
178 crate://crates.io/windows_x86_64_gnullvm/0.52.6 \ 190 crate://crates.io/windows_x86_64_gnullvm/0.52.6 \
191 crate://crates.io/windows_x86_64_gnullvm/0.53.1 \
192 crate://crates.io/windows_x86_64_msvc/0.48.5 \
179 crate://crates.io/windows_x86_64_msvc/0.52.6 \ 193 crate://crates.io/windows_x86_64_msvc/0.52.6 \
194 crate://crates.io/windows_x86_64_msvc/0.53.1 \
180 crate://crates.io/winsafe/0.0.19 \ 195 crate://crates.io/winsafe/0.0.19 \
181 crate://crates.io/x509-parser/0.15.1 \ 196 crate://crates.io/x509-parser/0.15.1 \
197 crate://crates.io/zerocopy/0.8.38 \
198 crate://crates.io/zerocopy-derive/0.8.38 \
182" 199"
183 200
184SRC_URI[aho-corasick-1.1.3.sha256sum] = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 201SRC_URI[aho-corasick-1.1.4.sha256sum] = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301"
185SRC_URI[anstream-0.6.18.sha256sum] = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" 202SRC_URI[anstream-0.6.21.sha256sum] = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a"
186SRC_URI[anstyle-1.0.10.sha256sum] = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" 203SRC_URI[anstyle-1.0.13.sha256sum] = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
187SRC_URI[anstyle-parse-0.2.6.sha256sum] = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" 204SRC_URI[anstyle-parse-0.2.7.sha256sum] = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2"
188SRC_URI[anstyle-query-1.1.2.sha256sum] = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" 205SRC_URI[anstyle-query-1.1.5.sha256sum] = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
189SRC_URI[anstyle-wincon-3.0.7.sha256sum] = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" 206SRC_URI[anstyle-wincon-3.0.11.sha256sum] = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
190SRC_URI[asn1-rs-0.5.2.sha256sum] = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" 207SRC_URI[asn1-rs-0.5.2.sha256sum] = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0"
191SRC_URI[asn1-rs-0.6.2.sha256sum] = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048" 208SRC_URI[asn1-rs-0.6.2.sha256sum] = "5493c3bedbacf7fd7382c6346bbd66687d12bbaad3a89a2d2c303ee6cf20b048"
192SRC_URI[asn1-rs-derive-0.4.0.sha256sum] = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" 209SRC_URI[asn1-rs-derive-0.4.0.sha256sum] = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c"
193SRC_URI[asn1-rs-derive-0.5.1.sha256sum] = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490" 210SRC_URI[asn1-rs-derive-0.5.1.sha256sum] = "965c2d33e53cb6b267e148a4cb0760bc01f4904c1cd4bb4002a085bb016d1490"
194SRC_URI[asn1-rs-impl-0.1.0.sha256sum] = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" 211SRC_URI[asn1-rs-impl-0.1.0.sha256sum] = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed"
195SRC_URI[asn1-rs-impl-0.2.0.sha256sum] = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7" 212SRC_URI[asn1-rs-impl-0.2.0.sha256sum] = "7b18050c2cd6fe86c3a76584ef5e0baf286d038cda203eb6223df2cc413565f7"
196SRC_URI[async-attributes-1.1.2.sha256sum] = "a3203e79f4dd9bdda415ed03cf14dae5a2bf775c683a00f94e9cd1faf0f596e5" 213SRC_URI[autocfg-1.5.0.sha256sum] = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
197SRC_URI[async-channel-1.9.0.sha256sum] = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" 214SRC_URI[bindgen-0.72.1.sha256sum] = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
198SRC_URI[async-channel-2.3.1.sha256sum] = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a"
199SRC_URI[async-executor-1.13.1.sha256sum] = "30ca9a001c1e8ba5149f91a74362376cc6bc5b919d92d988668657bd570bdcec"
200SRC_URI[async-global-executor-2.4.1.sha256sum] = "05b1b633a2115cd122d73b955eadd9916c18c8f510ec9cd1686404c60ad1c29c"
201SRC_URI[async-io-2.4.0.sha256sum] = "43a2b323ccce0a1d90b449fd71f2a06ca7faa7c54c2751f06c9bd851fc061059"
202SRC_URI[async-lock-3.4.0.sha256sum] = "ff6e472cdea888a4bd64f342f09b3f50e1886d32afe8df3d663c01140b811b18"
203SRC_URI[async-std-1.13.0.sha256sum] = "c634475f29802fde2b8f0b505b1bd00dfe4df7d4a000f0b36f7671197d5c3615"
204SRC_URI[async-task-4.7.1.sha256sum] = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
205SRC_URI[atomic-waker-1.1.2.sha256sum] = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"
206SRC_URI[autocfg-1.4.0.sha256sum] = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
207SRC_URI[bindgen-0.71.1.sha256sum] = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3"
208SRC_URI[bitfield-0.14.0.sha256sum] = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac" 215SRC_URI[bitfield-0.14.0.sha256sum] = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac"
209SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 216SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
210SRC_URI[bitflags-2.8.0.sha256sum] = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" 217SRC_URI[bitflags-2.10.0.sha256sum] = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
211SRC_URI[block-buffer-0.10.4.sha256sum] = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 218SRC_URI[block-buffer-0.10.4.sha256sum] = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
212SRC_URI[blocking-1.6.1.sha256sum] = "703f41c54fc768e63e091340b424302bb1c29ef4aa0c7f10fe849dfb114d29ea" 219SRC_URI[byteorder-1.5.0.sha256sum] = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
213SRC_URI[bumpalo-3.16.0.sha256sum] = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 220SRC_URI[bytes-1.11.1.sha256sum] = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
214SRC_URI[cexpr-0.6.0.sha256sum] = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" 221SRC_URI[cexpr-0.6.0.sha256sum] = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
215SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 222SRC_URI[cfg-if-1.0.4.sha256sum] = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
216SRC_URI[cfg_aliases-0.2.1.sha256sum] = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 223SRC_URI[cfg_aliases-0.2.1.sha256sum] = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724"
217SRC_URI[clang-sys-1.8.1.sha256sum] = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" 224SRC_URI[clang-sys-1.8.1.sha256sum] = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
218SRC_URI[clap-4.5.27.sha256sum] = "769b0145982b4b48713e01ec42d61614425f27b7058bda7180a3a41f30104796" 225SRC_URI[clap-4.5.57.sha256sum] = "6899ea499e3fb9305a65d5ebf6e3d2248c5fab291f300ad0a704fbe142eae31a"
219SRC_URI[clap_builder-4.5.27.sha256sum] = "1b26884eb4b57140e4d2d93652abfa49498b938b3c9179f9fc487b0acc3edad7" 226SRC_URI[clap_builder-4.5.57.sha256sum] = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238"
220SRC_URI[clap_derive-4.5.24.sha256sum] = "54b755194d6389280185988721fffba69495eed5ee9feeee9a599b53db80318c" 227SRC_URI[clap_derive-4.5.55.sha256sum] = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5"
221SRC_URI[clap_lex-0.7.4.sha256sum] = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" 228SRC_URI[clap_lex-0.7.7.sha256sum] = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"
222SRC_URI[colorchoice-1.0.3.sha256sum] = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" 229SRC_URI[colorchoice-1.0.4.sha256sum] = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
223SRC_URI[colored-2.2.0.sha256sum] = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" 230SRC_URI[colored-2.2.0.sha256sum] = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"
224SRC_URI[concurrent-queue-2.5.0.sha256sum] = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"
225SRC_URI[core-foundation-0.10.0.sha256sum] = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" 231SRC_URI[core-foundation-0.10.0.sha256sum] = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63"
226SRC_URI[core-foundation-sys-0.8.7.sha256sum] = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 232SRC_URI[core-foundation-sys-0.8.7.sha256sum] = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"
227SRC_URI[cpufeatures-0.2.17.sha256sum] = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 233SRC_URI[cpufeatures-0.2.17.sha256sum] = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
228SRC_URI[crossbeam-utils-0.8.21.sha256sum] = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 234SRC_URI[crossterm-0.25.0.sha256sum] = "e64e6c0fbe2c17357405f7c758c1ef960fce08bdfb2c03d88d2a18d7e09c4b67"
229SRC_URI[crunchy-0.2.3.sha256sum] = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" 235SRC_URI[crossterm_winapi-0.9.1.sha256sum] = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b"
230SRC_URI[crypto-common-0.1.6.sha256sum] = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 236SRC_URI[crunchy-0.2.4.sha256sum] = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
231SRC_URI[data-encoding-2.7.0.sha256sum] = "0e60eed09d8c01d3cee5b7d30acb059b76614c918fa0f992e0dd6eeb10daad6f" 237SRC_URI[crypto-common-0.1.7.sha256sum] = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"
238SRC_URI[data-encoding-2.10.0.sha256sum] = "d7a1e2f27636f116493b8b860f5546edb47c8d8f8ea73e1d2a20be88e28d1fea"
232SRC_URI[der-parser-8.2.0.sha256sum] = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" 239SRC_URI[der-parser-8.2.0.sha256sum] = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e"
233SRC_URI[deranged-0.3.11.sha256sum] = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" 240SRC_URI[deranged-0.5.5.sha256sum] = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587"
234SRC_URI[digest-0.10.7.sha256sum] = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 241SRC_URI[digest-0.10.7.sha256sum] = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
235SRC_URI[displaydoc-0.2.5.sha256sum] = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" 242SRC_URI[displaydoc-0.2.5.sha256sum] = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
236SRC_URI[either-1.13.0.sha256sum] = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" 243SRC_URI[dyn-clone-1.0.20.sha256sum] = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"
244SRC_URI[either-1.15.0.sha256sum] = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
237SRC_URI[embedded-crc-macros-1.0.0.sha256sum] = "4f1c75747a43b086df1a87fb2a889590bc0725e0abf54bba6d0c4bf7bd9e762c" 245SRC_URI[embedded-crc-macros-1.0.0.sha256sum] = "4f1c75747a43b086df1a87fb2a889590bc0725e0abf54bba6d0c4bf7bd9e762c"
238SRC_URI[env_logger-0.10.2.sha256sum] = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580" 246SRC_URI[env_logger-0.10.2.sha256sum] = "4cd405aab171cb85d6735e5c8d9db038c17d3ca007a4d2c25f337935c3d90580"
239SRC_URI[errno-0.3.10.sha256sum] = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" 247SRC_URI[errno-0.3.14.sha256sum] = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
240SRC_URI[event-listener-2.5.3.sha256sum] = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0"
241SRC_URI[event-listener-5.4.0.sha256sum] = "3492acde4c3fc54c845eaab3eed8bd00c7a7d881f78bfc801e43a93dec1331ae"
242SRC_URI[event-listener-strategy-0.5.3.sha256sum] = "3c3e4e0dd3673c1139bf041f3008816d9cf2946bbfac2945c09e523b8d7b05b2"
243SRC_URI[fastrand-2.3.0.sha256sum] = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
244SRC_URI[futures-0.3.31.sha256sum] = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" 248SRC_URI[futures-0.3.31.sha256sum] = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876"
245SRC_URI[futures-channel-0.3.31.sha256sum] = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 249SRC_URI[futures-channel-0.3.31.sha256sum] = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10"
246SRC_URI[futures-core-0.3.31.sha256sum] = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 250SRC_URI[futures-core-0.3.31.sha256sum] = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e"
247SRC_URI[futures-executor-0.3.31.sha256sum] = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" 251SRC_URI[futures-executor-0.3.31.sha256sum] = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f"
248SRC_URI[futures-io-0.3.31.sha256sum] = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 252SRC_URI[futures-io-0.3.31.sha256sum] = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6"
249SRC_URI[futures-lite-2.6.0.sha256sum] = "f5edaec856126859abb19ed65f39e90fea3a9574b9707f13539acf4abf7eb532"
250SRC_URI[futures-macro-0.3.31.sha256sum] = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 253SRC_URI[futures-macro-0.3.31.sha256sum] = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
251SRC_URI[futures-sink-0.3.31.sha256sum] = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 254SRC_URI[futures-sink-0.3.31.sha256sum] = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7"
252SRC_URI[futures-task-0.3.31.sha256sum] = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 255SRC_URI[futures-task-0.3.31.sha256sum] = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988"
253SRC_URI[futures-util-0.3.31.sha256sum] = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 256SRC_URI[futures-util-0.3.31.sha256sum] = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81"
257SRC_URI[fuzzy-matcher-0.3.7.sha256sum] = "54614a3312934d066701a80f20f15fa3b56d67ac7722b39eea5b4c9dd1d66c94"
258SRC_URI[fxhash-0.2.1.sha256sum] = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c"
254SRC_URI[generic-array-0.14.7.sha256sum] = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 259SRC_URI[generic-array-0.14.7.sha256sum] = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"
255SRC_URI[glob-0.3.2.sha256sum] = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 260SRC_URI[glob-0.3.3.sha256sum] = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
256SRC_URI[gloo-timers-0.3.0.sha256sum] = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" 261SRC_URI[half-2.7.1.sha256sum] = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"
257SRC_URI[half-2.4.1.sha256sum] = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888"
258SRC_URI[heck-0.5.0.sha256sum] = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 262SRC_URI[heck-0.5.0.sha256sum] = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
259SRC_URI[hermit-abi-0.4.0.sha256sum] = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" 263SRC_URI[hermit-abi-0.5.2.sha256sum] = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"
260SRC_URI[home-0.5.11.sha256sum] = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" 264SRC_URI[home-0.5.12.sha256sum] = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
261SRC_URI[humantime-2.1.0.sha256sum] = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 265SRC_URI[humantime-2.3.0.sha256sum] = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424"
266SRC_URI[inquire-0.7.5.sha256sum] = "0fddf93031af70e75410a2511ec04d49e758ed2f26dad3404a934e0fb45cc12a"
262SRC_URI[io-kit-sys-0.4.1.sha256sum] = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b" 267SRC_URI[io-kit-sys-0.4.1.sha256sum] = "617ee6cf8e3f66f3b4ea67a4058564628cde41901316e19f559e14c7c72c5e7b"
263SRC_URI[is-terminal-0.4.15.sha256sum] = "e19b23d53f35ce9f56aebc7d1bb4e6ac1e9c0db7ac85c8d1760c04379edced37" 268SRC_URI[is-terminal-0.4.17.sha256sum] = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46"
264SRC_URI[is_terminal_polyfill-1.70.1.sha256sum] = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 269SRC_URI[is_terminal_polyfill-1.70.2.sha256sum] = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"
265SRC_URI[itertools-0.13.0.sha256sum] = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" 270SRC_URI[itertools-0.13.0.sha256sum] = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
266SRC_URI[itoa-1.0.14.sha256sum] = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" 271SRC_URI[itoa-1.0.17.sha256sum] = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
267SRC_URI[js-sys-0.3.77.sha256sum] = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f"
268SRC_URI[kv-log-macro-1.0.7.sha256sum] = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f"
269SRC_URI[lazy_static-1.5.0.sha256sum] = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 272SRC_URI[lazy_static-1.5.0.sha256sum] = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
270SRC_URI[libc-0.2.169.sha256sum] = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" 273SRC_URI[libc-0.2.180.sha256sum] = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
271SRC_URI[libloading-0.8.6.sha256sum] = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" 274SRC_URI[libloading-0.8.9.sha256sum] = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
272SRC_URI[libmctp-0.2.0.sha256sum] = "0d077261b65cfe16a3d490243354fbaec3f22e5bcad546d21394105ab836d1d0" 275SRC_URI[libmctp-0.2.0.sha256sum] = "0d077261b65cfe16a3d490243354fbaec3f22e5bcad546d21394105ab836d1d0"
273SRC_URI[libudev-0.3.0.sha256sum] = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0" 276SRC_URI[libudev-0.3.0.sha256sum] = "78b324152da65df7bb95acfcaab55e3097ceaab02fb19b228a9eb74d55f135e0"
274SRC_URI[libudev-sys-0.1.4.sha256sum] = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324" 277SRC_URI[libudev-sys-0.1.4.sha256sum] = "3c8469b4a23b962c1396b9b451dda50ef5b283e8dd309d69033475fa9b334324"
275SRC_URI[linux-raw-sys-0.4.15.sha256sum] = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" 278SRC_URI[linux-raw-sys-0.4.15.sha256sum] = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
276SRC_URI[log-0.4.25.sha256sum] = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" 279SRC_URI[lock_api-0.4.14.sha256sum] = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
277SRC_URI[mach2-0.4.2.sha256sum] = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" 280SRC_URI[log-0.4.29.sha256sum] = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
278SRC_URI[memchr-2.7.4.sha256sum] = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 281SRC_URI[mach2-0.4.3.sha256sum] = "d640282b302c0bb0a2a8e0233ead9035e3bed871f0b7e81fe4a1ec829765db44"
282SRC_URI[memchr-2.7.6.sha256sum] = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
279SRC_URI[memmap2-0.5.10.sha256sum] = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" 283SRC_URI[memmap2-0.5.10.sha256sum] = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327"
280SRC_URI[minicbor-0.25.1.sha256sum] = "c0452a60c1863c1f50b5f77cd295e8d2786849f35883f0b9e18e7e6e1b5691b0" 284SRC_URI[minicbor-0.25.1.sha256sum] = "c0452a60c1863c1f50b5f77cd295e8d2786849f35883f0b9e18e7e6e1b5691b0"
281SRC_URI[minicbor-derive-0.15.3.sha256sum] = "bd2209fff77f705b00c737016a48e73733d7fbccb8b007194db148f03561fb70" 285SRC_URI[minicbor-derive-0.15.3.sha256sum] = "bd2209fff77f705b00c737016a48e73733d7fbccb8b007194db148f03561fb70"
282SRC_URI[minimal-lexical-0.2.1.sha256sum] = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 286SRC_URI[minimal-lexical-0.2.1.sha256sum] = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
287SRC_URI[mio-0.8.11.sha256sum] = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c"
288SRC_URI[mio-1.1.1.sha256sum] = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
289SRC_URI[newline-converter-0.3.0.sha256sum] = "47b6b097ecb1cbfed438542d16e84fd7ad9b0c76c8a65b7f9039212a3d14dc7f"
283SRC_URI[nix-0.26.4.sha256sum] = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" 290SRC_URI[nix-0.26.4.sha256sum] = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b"
284SRC_URI[nix-0.29.0.sha256sum] = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" 291SRC_URI[nix-0.29.0.sha256sum] = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46"
285SRC_URI[nom-7.1.3.sha256sum] = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" 292SRC_URI[nom-7.1.3.sha256sum] = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
286SRC_URI[num-bigint-0.4.6.sha256sum] = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 293SRC_URI[num-bigint-0.4.6.sha256sum] = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9"
287SRC_URI[num-conv-0.1.0.sha256sum] = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 294SRC_URI[num-conv-0.2.0.sha256sum] = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050"
288SRC_URI[num-integer-0.1.46.sha256sum] = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 295SRC_URI[num-integer-0.1.46.sha256sum] = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f"
289SRC_URI[num-traits-0.2.19.sha256sum] = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 296SRC_URI[num-traits-0.2.19.sha256sum] = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
290SRC_URI[oid-registry-0.6.1.sha256sum] = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" 297SRC_URI[oid-registry-0.6.1.sha256sum] = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff"
291SRC_URI[once_cell-1.20.2.sha256sum] = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" 298SRC_URI[once_cell-1.21.3.sha256sum] = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
292SRC_URI[parking-2.2.1.sha256sum] = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" 299SRC_URI[once_cell_polyfill-1.70.2.sha256sum] = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"
300SRC_URI[parking_lot-0.12.5.sha256sum] = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
301SRC_URI[parking_lot_core-0.9.12.sha256sum] = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
293SRC_URI[pin-project-lite-0.2.16.sha256sum] = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 302SRC_URI[pin-project-lite-0.2.16.sha256sum] = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
294SRC_URI[pin-utils-0.1.0.sha256sum] = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 303SRC_URI[pin-utils-0.1.0.sha256sum] = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184"
295SRC_URI[piper-0.2.4.sha256sum] = "96c8c490f422ef9a4efd2cb5b42b76c8613d7e7dfc1caf667b8a3350a5acc066" 304SRC_URI[pkg-config-0.3.32.sha256sum] = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c"
296SRC_URI[pkg-config-0.3.31.sha256sum] = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2"
297SRC_URI[polling-3.7.4.sha256sum] = "a604568c3202727d1507653cb121dbd627a58684eb09a820fd746bee38b4442f"
298SRC_URI[powerfmt-0.2.0.sha256sum] = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 305SRC_URI[powerfmt-0.2.0.sha256sum] = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"
299SRC_URI[prettyplease-0.2.29.sha256sum] = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac" 306SRC_URI[prettyplease-0.2.37.sha256sum] = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
300SRC_URI[proc-macro2-1.0.93.sha256sum] = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" 307SRC_URI[proc-macro2-1.0.106.sha256sum] = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
301SRC_URI[quote-1.0.38.sha256sum] = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" 308SRC_URI[quote-1.0.40.sha256sum] = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
302SRC_URI[regex-1.11.1.sha256sum] = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 309SRC_URI[redox_syscall-0.5.18.sha256sum] = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
303SRC_URI[regex-automata-0.4.9.sha256sum] = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 310SRC_URI[regex-1.12.3.sha256sum] = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
304SRC_URI[regex-syntax-0.8.5.sha256sum] = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 311SRC_URI[regex-automata-0.4.14.sha256sum] = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
305SRC_URI[rustc-hash-2.1.0.sha256sum] = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497" 312SRC_URI[regex-syntax-0.8.9.sha256sum] = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
313SRC_URI[rustc-hash-2.1.1.sha256sum] = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
306SRC_URI[rusticata-macros-4.1.0.sha256sum] = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" 314SRC_URI[rusticata-macros-4.1.0.sha256sum] = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632"
307SRC_URI[rustix-0.38.44.sha256sum] = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" 315SRC_URI[rustix-0.38.44.sha256sum] = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
308SRC_URI[rustversion-1.0.19.sha256sum] = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
309SRC_URI[scopeguard-1.2.0.sha256sum] = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 316SRC_URI[scopeguard-1.2.0.sha256sum] = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
310SRC_URI[serde-1.0.217.sha256sum] = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" 317SRC_URI[serde_core-1.0.228.sha256sum] = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
311SRC_URI[serde_derive-1.0.217.sha256sum] = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" 318SRC_URI[serde_derive-1.0.228.sha256sum] = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
312SRC_URI[serialport-4.7.0.sha256sum] = "5ecfc4858c2266c7695d8b8460bbd612fa81bd2e250f5f0dd16195e4b4f8b3d8" 319SRC_URI[serialport-4.8.1.sha256sum] = "21f60a586160667241d7702c420fc223939fb3c0bb8d3fac84f78768e8970dee"
313SRC_URI[sha2-0.10.8.sha256sum] = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 320SRC_URI[sha2-0.10.9.sha256sum] = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
314SRC_URI[shlex-1.3.0.sha256sum] = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 321SRC_URI[shlex-1.3.0.sha256sum] = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
315SRC_URI[slab-0.4.9.sha256sum] = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 322SRC_URI[signal-hook-0.3.18.sha256sum] = "d881a16cf4426aa584979d30bd82cb33429027e42122b169753d6ef1085ed6e2"
323SRC_URI[signal-hook-mio-0.2.5.sha256sum] = "b75a19a7a740b25bc7944bdee6172368f988763b744e3d4dfe753f6b4ece40cc"
324SRC_URI[signal-hook-registry-1.4.8.sha256sum] = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"
325SRC_URI[slab-0.4.12.sha256sum] = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
326SRC_URI[smallvec-1.15.1.sha256sum] = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
316SRC_URI[smbus-pec-1.0.1.sha256sum] = "ca0763a680cd5d72b28f7bfc8a054c117d8841380a6ad4f72f05bd2a34217d3e" 327SRC_URI[smbus-pec-1.0.1.sha256sum] = "ca0763a680cd5d72b28f7bfc8a054c117d8841380a6ad4f72f05bd2a34217d3e"
328SRC_URI[socket2-0.6.2.sha256sum] = "86f4aa3ad99f2088c990dfa82d367e19cb29268ed67c574d10d0a4bfe71f07e0"
317SRC_URI[strsim-0.11.1.sha256sum] = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 329SRC_URI[strsim-0.11.1.sha256sum] = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
318SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 330SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
319SRC_URI[syn-2.0.96.sha256sum] = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" 331SRC_URI[syn-2.0.114.sha256sum] = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
320SRC_URI[synstructure-0.12.6.sha256sum] = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" 332SRC_URI[synstructure-0.12.6.sha256sum] = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f"
321SRC_URI[synstructure-0.13.1.sha256sum] = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 333SRC_URI[synstructure-0.13.2.sha256sum] = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"
322SRC_URI[termcolor-1.4.1.sha256sum] = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 334SRC_URI[termcolor-1.4.1.sha256sum] = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
323SRC_URI[thiserror-1.0.69.sha256sum] = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 335SRC_URI[thiserror-1.0.69.sha256sum] = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
336SRC_URI[thiserror-2.0.18.sha256sum] = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
324SRC_URI[thiserror-impl-1.0.69.sha256sum] = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 337SRC_URI[thiserror-impl-1.0.69.sha256sum] = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
325SRC_URI[time-0.3.37.sha256sum] = "35e7868883861bd0e56d9ac6efcaaca0d6d5d82a2a7ec8209ff492c07cf37b21" 338SRC_URI[thiserror-impl-2.0.18.sha256sum] = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
326SRC_URI[time-core-0.1.2.sha256sum] = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 339SRC_URI[thread_local-1.1.9.sha256sum] = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185"
327SRC_URI[time-macros-0.2.19.sha256sum] = "2834e6017e3e5e4b9834939793b282bc03b37a3336245fa820e35e233e2a85de" 340SRC_URI[time-0.3.47.sha256sum] = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c"
328SRC_URI[tracing-0.1.41.sha256sum] = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 341SRC_URI[time-core-0.1.8.sha256sum] = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca"
329SRC_URI[tracing-core-0.1.33.sha256sum] = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 342SRC_URI[time-macros-0.2.27.sha256sum] = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215"
330SRC_URI[typenum-1.17.0.sha256sum] = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 343SRC_URI[tokio-1.49.0.sha256sum] = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86"
331SRC_URI[unescaper-0.1.5.sha256sum] = "c878a167baa8afd137494101a688ef8c67125089ff2249284bd2b5f9bfedb815" 344SRC_URI[tokio-macros-2.6.0.sha256sum] = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5"
332SRC_URI[unicode-ident-1.0.15.sha256sum] = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243" 345SRC_URI[typenum-1.19.0.sha256sum] = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
346SRC_URI[unescaper-0.1.8.sha256sum] = "4064ed685c487dbc25bd3f0e9548f2e34bab9d18cefc700f9ec2dba74ba1138e"
347SRC_URI[unicode-ident-1.0.22.sha256sum] = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
348SRC_URI[unicode-segmentation-1.12.0.sha256sum] = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493"
349SRC_URI[unicode-width-0.1.14.sha256sum] = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af"
333SRC_URI[unicode-xid-0.2.6.sha256sum] = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 350SRC_URI[unicode-xid-0.2.6.sha256sum] = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
334SRC_URI[utf8parse-0.2.2.sha256sum] = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 351SRC_URI[utf8parse-0.2.2.sha256sum] = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
335SRC_URI[value-bag-1.10.0.sha256sum] = "3ef4c4aa54d5d05a279399bfa921ec387b7aba77caf7a682ae8d86785b8fdad2"
336SRC_URI[version_check-0.9.5.sha256sum] = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 352SRC_URI[version_check-0.9.5.sha256sum] = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
337SRC_URI[wasm-bindgen-0.2.100.sha256sum] = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 353SRC_URI[wasi-0.11.1+wasi-snapshot-preview1.sha256sum] = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
338SRC_URI[wasm-bindgen-backend-0.2.100.sha256sum] = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
339SRC_URI[wasm-bindgen-futures-0.4.50.sha256sum] = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"
340SRC_URI[wasm-bindgen-macro-0.2.100.sha256sum] = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
341SRC_URI[wasm-bindgen-macro-support-0.2.100.sha256sum] = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
342SRC_URI[wasm-bindgen-shared-0.2.100.sha256sum] = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
343SRC_URI[web-sys-0.3.77.sha256sum] = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"
344SRC_URI[which-6.0.3.sha256sum] = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f" 354SRC_URI[which-6.0.3.sha256sum] = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f"
345SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 355SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
346SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 356SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
347SRC_URI[winapi-util-0.1.9.sha256sum] = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" 357SRC_URI[winapi-util-0.1.11.sha256sum] = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
348SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 358SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
359SRC_URI[windows-link-0.2.1.sha256sum] = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
360SRC_URI[windows-sys-0.48.0.sha256sum] = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9"
361SRC_URI[windows-sys-0.52.0.sha256sum] = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
349SRC_URI[windows-sys-0.59.0.sha256sum] = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 362SRC_URI[windows-sys-0.59.0.sha256sum] = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
363SRC_URI[windows-sys-0.60.2.sha256sum] = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
364SRC_URI[windows-sys-0.61.2.sha256sum] = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
365SRC_URI[windows-targets-0.48.5.sha256sum] = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c"
350SRC_URI[windows-targets-0.52.6.sha256sum] = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 366SRC_URI[windows-targets-0.52.6.sha256sum] = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
367SRC_URI[windows-targets-0.53.5.sha256sum] = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
368SRC_URI[windows_aarch64_gnullvm-0.48.5.sha256sum] = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8"
351SRC_URI[windows_aarch64_gnullvm-0.52.6.sha256sum] = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 369SRC_URI[windows_aarch64_gnullvm-0.52.6.sha256sum] = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
370SRC_URI[windows_aarch64_gnullvm-0.53.1.sha256sum] = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
371SRC_URI[windows_aarch64_msvc-0.48.5.sha256sum] = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc"
352SRC_URI[windows_aarch64_msvc-0.52.6.sha256sum] = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 372SRC_URI[windows_aarch64_msvc-0.52.6.sha256sum] = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
373SRC_URI[windows_aarch64_msvc-0.53.1.sha256sum] = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
374SRC_URI[windows_i686_gnu-0.48.5.sha256sum] = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e"
353SRC_URI[windows_i686_gnu-0.52.6.sha256sum] = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 375SRC_URI[windows_i686_gnu-0.52.6.sha256sum] = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
376SRC_URI[windows_i686_gnu-0.53.1.sha256sum] = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
354SRC_URI[windows_i686_gnullvm-0.52.6.sha256sum] = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 377SRC_URI[windows_i686_gnullvm-0.52.6.sha256sum] = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
378SRC_URI[windows_i686_gnullvm-0.53.1.sha256sum] = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
379SRC_URI[windows_i686_msvc-0.48.5.sha256sum] = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406"
355SRC_URI[windows_i686_msvc-0.52.6.sha256sum] = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 380SRC_URI[windows_i686_msvc-0.52.6.sha256sum] = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
381SRC_URI[windows_i686_msvc-0.53.1.sha256sum] = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
382SRC_URI[windows_x86_64_gnu-0.48.5.sha256sum] = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e"
356SRC_URI[windows_x86_64_gnu-0.52.6.sha256sum] = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 383SRC_URI[windows_x86_64_gnu-0.52.6.sha256sum] = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
384SRC_URI[windows_x86_64_gnu-0.53.1.sha256sum] = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
385SRC_URI[windows_x86_64_gnullvm-0.48.5.sha256sum] = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc"
357SRC_URI[windows_x86_64_gnullvm-0.52.6.sha256sum] = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 386SRC_URI[windows_x86_64_gnullvm-0.52.6.sha256sum] = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
387SRC_URI[windows_x86_64_gnullvm-0.53.1.sha256sum] = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
388SRC_URI[windows_x86_64_msvc-0.48.5.sha256sum] = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
358SRC_URI[windows_x86_64_msvc-0.52.6.sha256sum] = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 389SRC_URI[windows_x86_64_msvc-0.52.6.sha256sum] = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
390SRC_URI[windows_x86_64_msvc-0.53.1.sha256sum] = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
359SRC_URI[winsafe-0.0.19.sha256sum] = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904" 391SRC_URI[winsafe-0.0.19.sha256sum] = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904"
360SRC_URI[x509-parser-0.15.1.sha256sum] = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da" 392SRC_URI[x509-parser-0.15.1.sha256sum] = "7069fba5b66b9193bd2c5d3d4ff12b839118f6bcbef5328efafafb5395cf63da"
361# from tock-responder/Cargo.lock 393SRC_URI[zerocopy-0.8.38.sha256sum] = "57cf3aa6855b23711ee9852dfc97dfaa51c45feaba5b645d0c777414d494a961"
362SRC_URI += " \ 394SRC_URI[zerocopy-derive-0.8.38.sha256sum] = "8a616990af1a287837c4fe6596ad77ef57948f787e46ce28e166facc0cc1cb75"
363 crate://crates.io/aho-corasick/1.1.3 \
364 crate://crates.io/atty/0.2.14 \
365 crate://crates.io/autocfg/1.4.0 \
366 crate://crates.io/bindgen/0.71.1 \
367 crate://crates.io/bitfield/0.14.0 \
368 crate://crates.io/bitflags/1.3.2 \
369 crate://crates.io/bitflags/2.8.0 \
370 crate://crates.io/byteorder/0.5.3 \
371 crate://crates.io/cexpr/0.6.0 \
372 crate://crates.io/cfg-if/1.0.0 \
373 crate://crates.io/clang-sys/1.8.1 \
374 crate://crates.io/clap/3.2.25 \
375 crate://crates.io/clap_derive/3.2.25 \
376 crate://crates.io/clap_lex/0.2.4 \
377 crate://crates.io/critical-section/1.2.0 \
378 crate://crates.io/either/1.13.0 \
379 crate://crates.io/elf/0.0.10 \
380 crate://crates.io/embedded-alloc/0.5.1 \
381 crate://crates.io/embedded-crc-macros/1.0.0 \
382 crate://crates.io/errno/0.3.10 \
383 crate://crates.io/glob/0.3.2 \
384 crate://crates.io/hashbrown/0.12.3 \
385 crate://crates.io/heck/0.4.1 \
386 crate://crates.io/hermit-abi/0.1.19 \
387 crate://crates.io/home/0.5.11 \
388 crate://crates.io/indexmap/1.9.3 \
389 crate://crates.io/itertools/0.13.0 \
390 crate://crates.io/libc/0.2.169 \
391 crate://crates.io/libloading/0.8.6 \
392 crate://crates.io/libm/0.2.11 \
393 crate://crates.io/libmctp/0.2.0 \
394 crate://crates.io/linked_list_allocator/0.10.5 \
395 crate://crates.io/linux-raw-sys/0.4.15 \
396 crate://crates.io/log/0.4.25 \
397 crate://crates.io/memchr/2.7.4 \
398 crate://crates.io/minimal-lexical/0.2.1 \
399 crate://crates.io/nom/7.1.3 \
400 crate://crates.io/numtoa/0.1.0 \
401 crate://crates.io/once_cell/1.20.2 \
402 crate://crates.io/os_str_bytes/6.6.1 \
403 crate://crates.io/portable-atomic/1.10.0 \
404 crate://crates.io/prettyplease/0.2.29 \
405 crate://crates.io/proc-macro-error/1.0.4 \
406 crate://crates.io/proc-macro-error-attr/1.0.4 \
407 crate://crates.io/proc-macro2/1.0.93 \
408 crate://crates.io/quote/1.0.38 \
409 crate://crates.io/redox_syscall/0.2.16 \
410 crate://crates.io/redox_termios/0.1.3 \
411 crate://crates.io/regex/1.11.1 \
412 crate://crates.io/regex-automata/0.4.9 \
413 crate://crates.io/regex-syntax/0.8.5 \
414 crate://crates.io/rustc-hash/2.1.0 \
415 crate://crates.io/rustix/0.38.44 \
416 crate://crates.io/shlex/1.3.0 \
417 crate://crates.io/smbus-pec/1.0.1 \
418 crate://crates.io/strsim/0.10.0 \
419 crate://crates.io/syn/1.0.109 \
420 crate://crates.io/syn/2.0.96 \
421 crate://crates.io/termcolor/1.4.1 \
422 crate://crates.io/termion/1.5.6 \
423 crate://crates.io/textwrap/0.16.1 \
424 crate://crates.io/unicode-ident/1.0.15 \
425 crate://crates.io/version_check/0.9.5 \
426 crate://crates.io/which/6.0.3 \
427 crate://crates.io/winapi/0.3.9 \
428 crate://crates.io/winapi-i686-pc-windows-gnu/0.4.0 \
429 crate://crates.io/winapi-util/0.1.9 \
430 crate://crates.io/winapi-x86_64-pc-windows-gnu/0.4.0 \
431 crate://crates.io/windows-sys/0.59.0 \
432 crate://crates.io/windows-targets/0.52.6 \
433 crate://crates.io/windows_aarch64_gnullvm/0.52.6 \
434 crate://crates.io/windows_aarch64_msvc/0.52.6 \
435 crate://crates.io/windows_i686_gnu/0.52.6 \
436 crate://crates.io/windows_i686_gnullvm/0.52.6 \
437 crate://crates.io/windows_i686_msvc/0.52.6 \
438 crate://crates.io/windows_x86_64_gnu/0.52.6 \
439 crate://crates.io/windows_x86_64_gnullvm/0.52.6 \
440 crate://crates.io/windows_x86_64_msvc/0.52.6 \
441 crate://crates.io/winsafe/0.0.19 \
442"
443
444SRC_URI[aho-corasick-1.1.3.sha256sum] = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
445SRC_URI[atty-0.2.14.sha256sum] = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
446SRC_URI[autocfg-1.4.0.sha256sum] = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26"
447SRC_URI[bindgen-0.71.1.sha256sum] = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3"
448SRC_URI[bitfield-0.14.0.sha256sum] = "2d7e60934ceec538daadb9d8432424ed043a904d8e0243f3c6446bce549a46ac"
449SRC_URI[bitflags-1.3.2.sha256sum] = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
450SRC_URI[bitflags-2.8.0.sha256sum] = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36"
451SRC_URI[byteorder-0.5.3.sha256sum] = "0fc10e8cc6b2580fda3f36eb6dc5316657f812a3df879a44a66fc9f0fdbc4855"
452SRC_URI[cexpr-0.6.0.sha256sum] = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
453SRC_URI[cfg-if-1.0.0.sha256sum] = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
454SRC_URI[clang-sys-1.8.1.sha256sum] = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
455SRC_URI[clap-3.2.25.sha256sum] = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
456SRC_URI[clap_derive-3.2.25.sha256sum] = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008"
457SRC_URI[clap_lex-0.2.4.sha256sum] = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
458SRC_URI[critical-section-1.2.0.sha256sum] = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
459SRC_URI[either-1.13.0.sha256sum] = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0"
460SRC_URI[elf-0.0.10.sha256sum] = "4841de15dbe0e49b9b62a417589299e3be0d557e0900d36acb87e6dae47197f5"
461SRC_URI[embedded-alloc-0.5.1.sha256sum] = "ddae17915accbac2cfbc64ea0ae6e3b330e6ea124ba108dada63646fd3c6f815"
462SRC_URI[embedded-crc-macros-1.0.0.sha256sum] = "4f1c75747a43b086df1a87fb2a889590bc0725e0abf54bba6d0c4bf7bd9e762c"
463SRC_URI[errno-0.3.10.sha256sum] = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d"
464SRC_URI[glob-0.3.2.sha256sum] = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
465SRC_URI[hashbrown-0.12.3.sha256sum] = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
466SRC_URI[heck-0.4.1.sha256sum] = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
467SRC_URI[hermit-abi-0.1.19.sha256sum] = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33"
468SRC_URI[home-0.5.11.sha256sum] = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf"
469SRC_URI[indexmap-1.9.3.sha256sum] = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
470SRC_URI[itertools-0.13.0.sha256sum] = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
471SRC_URI[libc-0.2.169.sha256sum] = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a"
472SRC_URI[libloading-0.8.6.sha256sum] = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34"
473SRC_URI[libm-0.2.11.sha256sum] = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa"
474SRC_URI[libmctp-0.2.0.sha256sum] = "0d077261b65cfe16a3d490243354fbaec3f22e5bcad546d21394105ab836d1d0"
475SRC_URI[linked_list_allocator-0.10.5.sha256sum] = "9afa463f5405ee81cdb9cc2baf37e08ec7e4c8209442b5d72c04cfb2cd6e6286"
476SRC_URI[linux-raw-sys-0.4.15.sha256sum] = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
477SRC_URI[log-0.4.25.sha256sum] = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f"
478SRC_URI[memchr-2.7.4.sha256sum] = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3"
479SRC_URI[minimal-lexical-0.2.1.sha256sum] = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
480SRC_URI[nom-7.1.3.sha256sum] = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
481SRC_URI[numtoa-0.1.0.sha256sum] = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef"
482SRC_URI[once_cell-1.20.2.sha256sum] = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775"
483SRC_URI[os_str_bytes-6.6.1.sha256sum] = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1"
484SRC_URI[portable-atomic-1.10.0.sha256sum] = "280dc24453071f1b63954171985a0b0d30058d287960968b9b2aca264c8d4ee6"
485SRC_URI[prettyplease-0.2.29.sha256sum] = "6924ced06e1f7dfe3fa48d57b9f74f55d8915f5036121bef647ef4b204895fac"
486SRC_URI[proc-macro-error-1.0.4.sha256sum] = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
487SRC_URI[proc-macro-error-attr-1.0.4.sha256sum] = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
488SRC_URI[proc-macro2-1.0.93.sha256sum] = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99"
489SRC_URI[quote-1.0.38.sha256sum] = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
490SRC_URI[redox_syscall-0.2.16.sha256sum] = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a"
491SRC_URI[redox_termios-0.1.3.sha256sum] = "20145670ba436b55d91fc92d25e71160fbfbdd57831631c8d7d36377a476f1cb"
492SRC_URI[regex-1.11.1.sha256sum] = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
493SRC_URI[regex-automata-0.4.9.sha256sum] = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
494SRC_URI[regex-syntax-0.8.5.sha256sum] = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
495SRC_URI[rustc-hash-2.1.0.sha256sum] = "c7fb8039b3032c191086b10f11f319a6e99e1e82889c5cc6046f515c9db1d497"
496SRC_URI[rustix-0.38.44.sha256sum] = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"
497SRC_URI[shlex-1.3.0.sha256sum] = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
498SRC_URI[smbus-pec-1.0.1.sha256sum] = "ca0763a680cd5d72b28f7bfc8a054c117d8841380a6ad4f72f05bd2a34217d3e"
499SRC_URI[strsim-0.10.0.sha256sum] = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
500SRC_URI[syn-1.0.109.sha256sum] = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
501SRC_URI[syn-2.0.96.sha256sum] = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80"
502SRC_URI[termcolor-1.4.1.sha256sum] = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"
503SRC_URI[termion-1.5.6.sha256sum] = "077185e2eac69c3f8379a4298e1e07cd36beb962290d4a51199acf0fdc10607e"
504SRC_URI[textwrap-0.16.1.sha256sum] = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9"
505SRC_URI[unicode-ident-1.0.15.sha256sum] = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243"
506SRC_URI[version_check-0.9.5.sha256sum] = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
507SRC_URI[which-6.0.3.sha256sum] = "b4ee928febd44d98f2f459a4a79bd4d928591333a494a10a868418ac1b39cf1f"
508SRC_URI[winapi-0.3.9.sha256sum] = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
509SRC_URI[winapi-i686-pc-windows-gnu-0.4.0.sha256sum] = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
510SRC_URI[winapi-util-0.1.9.sha256sum] = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb"
511SRC_URI[winapi-x86_64-pc-windows-gnu-0.4.0.sha256sum] = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
512SRC_URI[windows-sys-0.59.0.sha256sum] = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"
513SRC_URI[windows-targets-0.52.6.sha256sum] = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
514SRC_URI[windows_aarch64_gnullvm-0.52.6.sha256sum] = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
515SRC_URI[windows_aarch64_msvc-0.52.6.sha256sum] = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
516SRC_URI[windows_i686_gnu-0.52.6.sha256sum] = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
517SRC_URI[windows_i686_gnullvm-0.52.6.sha256sum] = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
518SRC_URI[windows_i686_msvc-0.52.6.sha256sum] = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
519SRC_URI[windows_x86_64_gnu-0.52.6.sha256sum] = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
520SRC_URI[windows_x86_64_gnullvm-0.52.6.sha256sum] = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
521SRC_URI[windows_x86_64_msvc-0.52.6.sha256sum] = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
522SRC_URI[winsafe-0.0.19.sha256sum] = "d135d17ab770252ad95e9a872d365cf3090e3be864a34ab46f48555993efc904"
523SRC_URI[clap-4.5.26.sha256sum] = "a8eb5e908ef3a6efbe1ed62520fb7287959888c88485abe072543190ecc66783"
524SRC_URI[clap_builder-4.5.26.sha256sum] = "96b01801b5fc6a0a232407abc821660c9c6d25a1cafc0d4f85f29fb8d9afc121"
525SRC_URI[cpufeatures-0.2.16.sha256sum] = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3"
526SRC_URI[crunchy-0.2.2.sha256sum] = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7"
527SRC_URI[is-terminal-0.4.13.sha256sum] = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b"
528SRC_URI[rustix-0.38.43.sha256sum] = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6"
529SRC_URI[unicode-ident-1.0.14.sha256sum] = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83"
530SRC_URI[windows-sys-0.52.0.sha256sum] = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
531SRC_URI[autocfg-1.3.0.sha256sum] = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0"
532SRC_URI[bindgen-0.63.0.sha256sum] = "36d860121800b2a9a94f9b5604b332d5cffb234ce17609ea479d723dbc9d3885"
533SRC_URI[bitflags-2.6.0.sha256sum] = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de"
534SRC_URI[critical-section-1.1.2.sha256sum] = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216"
535SRC_URI[errno-0.3.9.sha256sum] = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba"
536SRC_URI[glob-0.3.1.sha256sum] = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
537SRC_URI[home-0.5.9.sha256sum] = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5"
538SRC_URI[lazycell-1.3.0.sha256sum] = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
539SRC_URI[libc-0.2.155.sha256sum] = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c"
540SRC_URI[libloading-0.8.5.sha256sum] = "4979f22fdb869068da03c9f7528f8297c6fd2606bc3a4affe42e6a823fdb8da4"
541SRC_URI[libm-0.2.8.sha256sum] = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058"
542SRC_URI[linux-raw-sys-0.4.14.sha256sum] = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
543SRC_URI[log-0.4.22.sha256sum] = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24"
544SRC_URI[once_cell-1.19.0.sha256sum] = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
545SRC_URI[peeking_take_while-0.1.2.sha256sum] = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
546SRC_URI[portable-atomic-1.7.0.sha256sum] = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265"
547SRC_URI[proc-macro2-1.0.86.sha256sum] = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
548SRC_URI[quote-1.0.36.sha256sum] = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
549SRC_URI[regex-1.10.5.sha256sum] = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f"
550SRC_URI[regex-automata-0.4.7.sha256sum] = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df"
551SRC_URI[regex-syntax-0.8.4.sha256sum] = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b"
552SRC_URI[rustc-hash-1.1.0.sha256sum] = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
553SRC_URI[rustix-0.38.34.sha256sum] = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f"
554SRC_URI[unicode-ident-1.0.12.sha256sum] = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
555SRC_URI[which-4.4.2.sha256sum] = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7"
556SRC_URI[which-6.0.2.sha256sum] = "3d9c5ed668ee1f17edb3b627225343d210006a90bb1e3745ce1f30b1fb115075"
557SRC_URI[winapi-util-0.1.8.sha256sum] = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b"
558SRC_URI[windows-sys-0.52.0.sha256sum] = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
diff --git a/meta-oe/recipes-devtools/spdm-utils/spdm-utils_0.7.2.bb b/meta-oe/recipes-devtools/spdm-utils/spdm-utils_0.7.2.bb
index 5c5022d9c0..6b7c46ed3a 100644
--- a/meta-oe/recipes-devtools/spdm-utils/spdm-utils_0.7.2.bb
+++ b/meta-oe/recipes-devtools/spdm-utils/spdm-utils_0.7.2.bb
@@ -15,7 +15,9 @@ SRC_URI += "git://github.com/westerndigitalcorporation/spdm-utils.git;protocol=h
15 15
16include spdm-utils-crates.inc 16include spdm-utils-crates.inc
17 17
18SRCREV = "f67ac9e00b79f603ecbbd29928a4ecc3dec5abd5" 18SRCREV = "8805327c9ac0d354c6ef891ccdd0527bbecf80e0"
19
20PV .= "+git"
19 21
20DEPENDS += "libspdm udev clang-native bindgen-cli-native pciutils" 22DEPENDS += "libspdm udev clang-native bindgen-cli-native pciutils"
21 23
diff --git a/meta-oe/recipes-devtools/xerces-c/xerces-c_3.3.0.bb b/meta-oe/recipes-devtools/xerces-c/xerces-c_3.3.0.bb
index 102e329878..0a3fbf5b93 100644
--- a/meta-oe/recipes-devtools/xerces-c/xerces-c_3.3.0.bb
+++ b/meta-oe/recipes-devtools/xerces-c/xerces-c_3.3.0.bb
@@ -9,7 +9,7 @@ SECTION = "libs"
9LICENSE = "Apache-2.0" 9LICENSE = "Apache-2.0"
10LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57" 10LIC_FILES_CHKSUM = "file://LICENSE;md5=3b83ef96387f14655fc854ddc3c6bd57"
11 11
12CVE_PRODUCT = "xerces-c\+\+" 12CVE_PRODUCT = "xerces-c++"
13 13
14SRC_URI = "http://archive.apache.org/dist/xerces/c/3/sources/${BP}.tar.bz2 \ 14SRC_URI = "http://archive.apache.org/dist/xerces/c/3/sources/${BP}.tar.bz2 \
15 file://0001-aclocal.m4-don-t-use-full-path-of-with_curl-in-xerce.patch \ 15 file://0001-aclocal.m4-don-t-use-full-path-of-with_curl-in-xerce.patch \